This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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.
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.
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.