[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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>
RE: RE: RE: RE: unique question

> 
> 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
http://www.saxonica.com/
Received on Thursday, 15 February 2007 10:30:54 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.