This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
References to named things in XQuery (variables, functions, types etc.) are defined in XQueryX as xs:QName. This means that the namespace binding to resolve these names has to be declared in the XQueryX document at BOTH the XML level as at the XQueryX level. It would be better to keep these separate, so that the namespace bindings that apply to these named items come solely from the XQueryX level. We note that the examples are therefore actually incorrect, because, for example, the function 'doc' is not in no namespace, but in the default function namespace, whose prefix has not been declared at the XML level. Also, because of the asymmetry in XQuery in how unprefixed variables and functions are interpreted, XML level namespace resolution will do the wrong thing for variables if the XQueryX document has a default namespace. (On behalf of XML Schema WG)
A new XQueryX schema has been created that defines names to be of type xqx:Qname instead of xs:Qname. The xqx:QName type represents names in the form of two strings: a prefix and a local name part. The use of this new type removes any possible relationship between the namespace prefix of a QName and any namespace declaration done in an XQueryX document at the "XML level". Instead, there are relationships only with namespaces declared at the "XQuery level" in the XQuery expression captured by the XQueryX document. Please let us know if this response is satisfactory. If not, please respond to this message, explaining your concerns. Jim Melton On behalf of the XML Query Working Group