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

> -----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