Description
The fn:namespace-uri-from-QName function returns the namespace part of an xs:QName . If you want to retrieve the namespace of an element or attribute name, you should consider using the fn:namespace-uri function instead; you cannot pass element or attribute nodes directly to this function.
This description is © Copyright 2007, Priscilla Walmsley. It is excerpted from the book XQuery by Priscilla Walmsley, O'Reilly, 2007. For a complete explanation of this function, please refer to Appendix A of the book. Arguments and Return TypeName | Type |
$arg |
xs:QName? |
return value |
xs:anyURI? |
ExamplesXPath Example | Results |
---|
namespace-uri-from-QName(
QName ('http://datypic.com/pre', 'prefixed')) |
http://datypic.com/pre |
namespace-uri-from-QName(
QName ('', 'unprefixed')) |
zero-length xs:anyURI value |
namespace-uri-from-QName( () ) |
() |
See AlsoHistory |
Recommended Reading:
|