A RESTful browser for eXist Java-Based Function Modules


http://www.w3.org/2005/xpath-functions
A module with the XQuery/XPath Core Library Functions

resolve-QName($qname as xs:string?, $element as element()) xs:QName
Returns an xs:QName value (that is, an expanded-QName) by taking an xs:string that has the lexical form of an xs:QName (a string in the form "prefix:local-name" or "local-name") and resolving it using the in-scope namespaces for a given element.
If $qname does not have the correct lexical form for xs:QName an error is raised [err:FOCA0002].
If $qname is the empty sequence, returns the empty sequence.
More specifically, the function searches the namespace bindings of $element for a binding whose name matches the prefix of $qname, or the zero-length string if it has no prefix, and constructs an expanded-QName whose local name is taken from the supplied $qname, and whose namespace URI is taken from the string value of the namespace binding.
If the $qname has a prefix and if there is no namespace binding for $element that matches this prefix, then an error is raised [err:FONS0004].
If the $qname has no prefix, and there is no namespace binding for $element corresponding to the default (unnamed) namespace, then the resulting expanded-QName has no namespace part.
The prefix (or absence of a prefix) in the supplied $qname argument is retained in the returned expanded-QName.
$qnameThe QName name
$elementThe element

Returns the QName of $element with lexical form $qname
Return to list of all modules