W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2002

Re: Is default namespace also applicable to the QName in the XPath spec.?

From: Jeni Tennison <jeni@jenitennison.com>
Date: Tue, 23 Jul 2002 09:26:09 +0100
Message-ID: <1621456896686.20020723092609@jenitennison.com>
To: xmlschema-dev@w3.org
CC: Stanley Guan <stanley.guan@oracle.com>

Daniel Veillard wrote:
>> If there is a default namespace (same as the namespace
>> what prefix myNS mapped to) in scope, can we
>> simplify the above statement to be:
>>    <xsd:selector xpath=".//t/row"/>?
> I hope the answer is no, because XPath-1.0 states explicitely that a
> non-qualified name in an XPath step can only match nodes without a
> namespace (i.e. this won't select elements in the default
> namespace). I assume/hope XML Schemas is compatible at that level.

It's perhaps worth noting that XPath 2.0 has the "default namespace
for element and type names" as part of the static context, and thus
settable by the host language. A future version of XML Schema that
used XPath 2.0 could easily state that the default namespace for
element (and type) names was the same as the target namespace of the
schema. Whether this would be desirable in the face of unqualified
locally declared elements is another matter...



Jeni Tennison
Received on Tuesday, 23 July 2002 04:26:10 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:57 UTC