saxon:namespace-node

Creates a namespace node.

namespace-node($prefix as xs:string, $uri as xs:string) ➔ namespace-node()

Arguments

 

$prefix

xs:string

The namespace prefix

 

$uri

xs:string

The namespace URI

Result

namespace-node()

Namespace

http://saxon.sf.net/

Saxon availability

Requires Saxon-PE or Saxon-EE.

Notes on the Saxon implementation

Available since Saxon 8.1. This extension is obsolescent, as the functionality is available from Saxon 9.2 onwards using the syntax appearing in the XQuery 3.0 specification.

Details

This function creates a new parentless namespace node. The first argument gives the name of the namespace node (that is, the namespace prefix), while the second gives the namespace URI. The prefix may be "" to create a default namespace; otherwise it must be a valid NCName. The URI must not be the empty string.

The function serves the same role in XQuery as the xsl:namespace instruction in XSLT 2.0: it allows a namespace in the result document to be computed dynamically.