fn:namespace-uri
Returns the namespace URI part of the name of $arg
, as an
xs:anyURI
value.
Signatures
fn:namespace-uri() as xs:anyURI
fn:namespace-uri($arg as node()?) as xs:anyURI
Properties
The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.
The one-argument form of this function is deterministic, context-independent, and focus-independent.
Rules
If the argument is omitted, it defaults to the context node (.
). The
behavior of the function if the argument is omitted is exactly the same as if the
context item had been passed as the argument.
If the node identified by $arg
is neither an element nor an attribute node,
or if it is an element or attribute node whose expanded-QName (as determined by the
dm:node-name
accessor in the node-name Accessor)
is in no namespace, then the function returns the zero-length xs:anyURI
value.
Otherwise, the result will be the namespace URI part of the expanded-QName of the
node
identified by $arg
, as determined by the dm:node-name
accessor
defined in node-name Accessor), returned as an
xs:anyURI
value.
Error Conditions
The following errors may be raised when $arg
is omitted:
If the context item is absent, dynamic error [ERRXPDY0002]
If the context item is not a node, type error [ERRXPTY0004].