xsl:namespace

Creates a namespace node.

Category: instruction
Content: sequence-constructor
Permitted parent elements: any XSLT element whose content model is sequence-constructor; any literal result element

Attributes

name

{ ncname }

Defines the name of the namespace node (that is, the namespace prefix).

select?

expression

The string value of the namespace node (that is, the namespace URI) may be given either by a select attribute, or by an enclosed sequence constructor.

Saxon availability

Available in XSLT 2.0 and later versions. Available in all Saxon editions. Available for all platforms.

Details

The semantics parallel xsl:attribute which creates attribute nodes.

It is rarely necessary to use this instruction explicitly. The only cases it is needed are where the namespaces to be included in the result document are not known statically, and are not present in the source document.

Links to W3C specifications

XSLT 2.0 Specification

XSLT 3.0 Specification

See also

xsl:attribute

xsl:element