Description
The fn:QName function takes a namespace URI and a qualified (optionally prefixed) name as arguments, and constructs a QName value from them. If $paramQName is prefixed, that prefix is retained in the resulting xs:QName value. Unlike the xs:QName constructor, the fn:QName function does not require a literal argument. Therefore, the name could be the result of a dynamically evaluated expression.
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 |
$paramURI |
xs:string? |
$paramQName |
xs:string |
return value |
xs:QName |
ExamplesXPath Example | Results |
---|
QName('http://datypic.com/prod','product') |
A QName whose namespace is http://datypic.com/prod , whose prefix is empty, and whose local part is product |
QName('http://datypic.com/prod',
'pre:product') |
A QName whose namespace is http://datypic.com/prod , whose prefix is pre , and whose local part is product |
QName('', 'product') |
A QName whose namespace is empty, whose prefix is empty, and whose local part is product |
QName('', 'pre:product') |
Error FOCA0002 |
See AlsoHistory |
Recommended Reading:
|