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: Daniel Veillard <daniel@veillard.com>
Date: Tue, 23 Jul 2002 00:10:13 +0200
To: Stanley Guan <stanley.guan@oracle.com>
Cc: xmlschema-dev@w3.org
Message-ID: <20020723001013.A27995@daniel.veillard.com>

On Mon, Jul 22, 2002 at 03:00:05PM -0700, Stanley Guan wrote:
> Hi,
> 
> Given a statement like the following:
> 
>   <xsd:selector xpath=".//myNS:t/myNS:row"/>
> 
> 
> 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.

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
Received on Monday, 22 July 2002 18:10:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:04 UTC