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: Dare Obasanjo <dareo@microsoft.com>
Date: Mon, 22 Jul 2002 15:51:43 -0700
Message-ID: <8BD7226E07DDFF49AF5EF4030ACE0B7E06621E22@red-msg-06.redmond.corp.microsoft.com>
To: <daniel@veillard.com>, "Stanley Guan" <stanley.guan@oracle.com>
Cc: <xmlschema-dev@w3.org>


> -----Original Message-----
> From: Daniel Veillard [mailto:daniel@veillard.com] 
> Sent: Monday, July 22, 2002 3:10 PM
> To: Stanley Guan
> Cc: xmlschema-dev@w3.org
> Subject: Re: Is default namespace also applicable to the 
> QName in the XPath spec.?
> 
> > 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.

You assume correctly. According to the REC 

	Schema Component Constraint: Selector Value OK 

	All of the following must be true:
	1. The {selector} must be a valid XPath expression, as defined
in [XPath]. 

-- 
PITHY WORDS OF WISDOM 
Going the speed of light is bad for your age.

This posting is provided "AS IS" with no warranties, and confers no
rights. 
Received on Monday, 22 July 2002 18:52:15 UTC

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