- From: Colin Mackenzie <colin@elecmc.com>
- Date: Fri, 14 Jun 2002 10:40:43 +0100
- To: "Jeni Tennison" <jeni@jenitennison.com>, <xmlschema-dev@w3.org>
yes I did mean union, and as you point out the attribute should have been in
the field xpath (it was a contived example)
thanks Jeni,
Colin
-----Original Message-----
From: Jeni Tennison [mailto:jeni@jenitennison.com]
Sent: 14 June 2002 10:31
To: xmlschema-dev@w3.org; Colin Mackenzie
Subject: Re: use of "or" in keyref selector
Hi Colin,
> Can anyone confirm whether or not it is valid to specify an "or" for
> a selector in a keyref.
You mean union ("or" in XPath is 'or', "union" is '|'). And yes, it is
valid. The BNF for selectors is:
[1] Selector ::= Path ( '|' Path )*
[2] Path ::= ('.//')? Step ( '/' Step )*
[3] Step ::= '.' | NameTest
[4] NameTest ::= QName | '*' | NCName ':' '*'
As you can see, the selector can be made up of several paths,
separated by the union operator ('|').
The BNF for fields is the same except that the Paths can point to
attributes:
[5] Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest )
See http://www.w3.org/TR/xmlschema-1/#coss-identity-constraint.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
Received on Friday, 14 June 2002 05:40:30 UTC