This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 1404 - Namespaces in XQueryX
Summary: Namespaces in XQueryX
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQueryX 1.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows 2000
: P2 normal
Target Milestone: ---
Assignee: Jim Melton
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on: 1286
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-13 17:18 UTC by Mary Holstege
Modified: 2005-08-08 23:16 UTC (History)
0 users

See Also:


Attachments

Description Mary Holstege 2005-05-13 17:18:01 UTC
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)
Comment 1 Jim Melton 2005-06-27 20:11:08 UTC
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