- From: Steen Lehmann <slehmann@silverstream.com>
- Date: Wed, 10 Oct 2001 19:40:39 +0200
- To: "'Eric van der Vlist'" <vdv@dyomedea.com>, "'Gary Robertson'" <gazinyork@hotmail.com>
- Cc: <xmlschema-dev@w3.org>
Hi, Just a comment on the restriced XPath syntax in XML Schema: > -----Original Message----- > From: xmlschema-dev-request@w3.org > [mailto:xmlschema-dev-request@w3.org] On Behalf Of Eric van der Vlist > Sent: 10. oktober 2001 16:54 > To: Gary Robertson > Cc: xmlschema-dev@w3.org > Subject: Re: Illegal use of unique? I need it. Microsoft > supports it. Alternatives? [...] > > <xs:unique name="StateNamesUniqueWithinAnObject"> > > <xs:selector xpath="../State"/> > > <xs:field xpath="@name"/> > > </xs:unique> > > </xs:element> > > </xs:sequence> > > </xs:extension> > > </xs:complexContent> > > </xs:complexType> > > > > However, note use of parent node syntax (..) in the > selector xpath. Is > > this illegal? > > > Yes. Actually this is not legal as far as I can tell. The selector XPath syntax is defined as follows (from XML Schema Part 1): [1] Selector ::= Path ( '|' Path )* [2] Path ::= ('.//')? Step ( '/' Step )* [3] Step ::= '.' | NameTest [4] NameTest ::= QName | '*' | NCName ':' '*' As you can see there is no way the Selector can begin with '..' -- Steen slehmann@silverstream.com
Received on Wednesday, 10 October 2001 13:38:01 UTC