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 1273 - [XPath] Binding for xml: in static/dynamic contexts
Summary: [XPath] Binding for xml: in static/dynamic contexts
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 2.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Don Chamberlin
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-26 14:25 UTC by Norman Walsh
Modified: 2005-06-10 19:07 UTC (History)
0 users

See Also:


Attachments

Description Norman Walsh 2005-04-26 14:25:05 UTC
In the course of discussing the xml:id attribute in the Core WG, the issue of
the namespace binding for the xml: prefix has come up. In particular, if

  //*[@xml:id]

can every fail to match an xml:id attribute because some API has setup the
namespace binding for the "xml" prefix in some odd way. Or if

  //*[@foo:id]

can ever match an xml:id attribute because some API has setup the namespace
binding for the "foo" prefix to be the XML Namespace.

I think it would be valuable to state that the xml: prefix is always bound,
that it is an error for the prefix xml: to be bound to another namespace,
or for any other prefix to be bound to the XML Namespace in either the
static or dynamic contexts at any time.

Apologies if we already say this, but I didn't find it in the XPath spec.
Comment 1 Michael Rys 2005-04-26 15:28:14 UTC
This is described in XQuery in section 4.12 (there is even an error 
http://www.w3.org/TR/xquery/#ERRXQST0070 that guards xml.

I assume that since XPath does not bind namespaces itself, depends on the 
calling environment to provide such restrictions.
Comment 2 Don Chamberlin 2005-06-10 19:07:30 UTC
Norm,
On May 16, the Query and XSLT working groups accepted your suggestion. Error 
message XQST0070 has been expanded to include the case when a prefix other than 
xml is bound to the namespace URI associated with xml. Also, the following 
consistency constraint has been added to Section 2.2.5 of the XPath and XQuery 
documents:

"In the statically known namespaces, the prefix xml must not be bound to any 
namespace URI other than http://www.w3.org/XML/1998/namespace, and no prefix 
other than xml may be bound to this namespace URI."

Since you were a participant in this discussion, I will mark this comment as 
Fixed and Closed.