W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2007

RE: RE: RE: RE: unique question

From: Michael Kay <mike@saxonica.com>
Date: Thu, 15 Feb 2007 10:30:40 -0000
To: "'Markus Gamperl'" <markus.gamperl@gmx.at>, <xmlschema-dev@w3.org>
Message-ID: <009d01c750ec$56fbe080$6401a8c0@turtle>

> But why isn't the default namespace enough within xs:unique? 
> Is this the definition of xs:unique? What's the sense of the 
> default namespace...

For better or worse, the XPath 1.0 specification states that an unprefixed
name in a path expression represents a name in no namespace, regardless of
any default namespace that might be in scope.

The original motivation for this, I think, was the scenario where XPath is
embedded within XSLT and the default namespace for the source document is
different from that for the result document. But like everything else to do
with namespaces, it has tripped a lot of people up over the years.

XPath 2.0 makes the default namespace for unprefixed element names something
that can be defined in the context, so XML Schema could, if it wished, say
that it is taken from the default namespace of the enclosing element.

Michael Kay
Received on Thursday, 15 February 2007 10:30:54 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:11 UTC