Skip to content

xsl:namespace

Creates a namespace node.

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

  • 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.

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.

See also

Comments