namespace-uri-from-QName function

The fn:namespace-uri-from-QName function returns the namespace URI part of an xs:QName value.

Syntax

Read syntax diagramSkip visual syntax diagramfn:namespace-uri-from-QName( qualified-name)
qualified-name
The qualified name from which the namespace URI part is to be retrieved.

qualified-name has the xs:QName data type, or is an empty sequence.

Returned value

If qualified-name is not the empty sequence, the value that is returned is an xs:string value that is the namespace URI part of qualified-name. If qualified-name is not in a namespace, a string of length 0 is returned. If qualified-name is the empty sequence, the empty sequence is returned.

Example

This function returns the string value "http://www.mycompany.com":
fn:namespace-uri-from-QName(fn:QName("http://www.mycompany.com", "comp:employee"))