W3C home > Mailing lists > Public > public-qt-comments@w3.org > January 2003

RE: XPath 1.0 & 2.0 vs default namespace bindings

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Fri, 24 Jan 2003 14:58:43 +0100
Message-ID: <DFF2AC9E3583D511A21F0008C7E621060453DF9E@daemsg02.software-ag.de>
To: Mike Brown <mike@skew.org>, public-qt-comments@w3.org

> Sorry to flog this dead horse, but Namespaces in XML says, in 
> its errata,
> 
>   The prefix xmlns is used only to declare namespace bindings 
> and is by 
>   definition bound to the namespace name 
> http://www.w3.org/2000/xmlns/.

The original namespaces spec said the opposite: "the prefix xmlns is not
bound to any namespace name".

Perhaps when the spec was changed by this "erratum", a corresponding erratum
should have been issued to XPath saying that this change did not imply that
there was a namespace node for "xmlns". Unfortunately, errata issued by one
WG are not reviewed by other WGs, as they probably should be.
> 
> 1. Should XPath 1.0 
> implementations expose this binding as a namespace node?

No, it shouldn't. The prefix "xmlns" is not an inscope namespace in the
normal sense - it cannot be used in the prefix of element or attribute names
or (I believe) in QNames-in-content.
> 
> 2. Should XPath 2.0 implementations that choose to expose the 
> namespace axis do likewise? I assume the answer is "no" 
> because XQuery 1.0 and XPath 2.0 Data Model (current WD) 
> says, in section 4.3.1,
> 
>   No namespace node may have the name "xmlns". 
> 
> It's not clear to me whether the intent really is to ignore 
> that binding. Or the 'xml' prefix binding, for that matter. 
> Is there or is there not a 
> namespace node for the 'xml' prefix, and for the 'xmlns' prefix?

The XPath 2.0 data model gives implementors (or higher-level specs)
discretion over which namespace nodes will be present. In XSLT, the
intention is to have no change from 1.0 in this respect - which means there
is a namespace node for "xml", there is none for "xmlns". In XQuery, the
namespace axis is not exposed so it doesn't make too much difference, but
once we have sorted out all the other namespace issues in XQuery we probably
need to check that the specs are clear on this point.
> 
> 3. The new XPath specs might also want to reflect and/or 
> reiterate the fact that Namespaces in XML says that the bindings of
> 
>   prefix 'xml' to 'http://www.w3.org/XML/1998/namespace'
>   and
>   prefix 'xmlns' to 'http://www.w3.org/2000/xmlns/'
> 
> are unchangeable; one cannot bind those URIs to other 
> prefixes, or those 
> prefixes to other URIs.
> 
Yes, I think this has already been picked up.

Michael Kay
Received on Friday, 24 January 2003 10:43:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:23 GMT