Altova Mailing List Archives


Re: [xml-dev] having problems with the "|" in field's element inthe xs:key el ement

From: ht@------.--.--.-- (----- -. --------)
To: "Chiusano Joseph" <chiusano_joseph@---.--->
Date: 5/22/2003 10:31:00 AM
"Chiusano Joseph" <chiusano_joseph@b...> writes:

> Please help me out here - from Schema Part 1:
> 
> "{fields} specifies XPath expressions relative to each element selected
> by a {selector}. This must identify a single node (element or attribute)
> whose content or value, which must be of a simple type, is used in the
> constraint. It is possible to specify an ordered list of {fields}s, to
> cater to multi-field keys, keyrefs, and uniqueness constraints"
> 
> ALSO
> 
> "{fields} 
> A non-empty list of restricted XPath ([XPath]) expressions."
> 
> Clicking on [XPath] above yields a URL to the XPath 1.0 spec.
> 
> Please confirm what I may be missing.

You're not missing anything -- Jeff missed one production, namely:

  [Field] ::= Path ( '|' Path )*

> Jeff Lowery wrote:
> > 
> > > From: Chiusano Joseph [mailto:chiusano_joseph@b...]
> > 
> > > The use of the "|" (union) operator is valid in the xs:field
> > > element, as
> > > the contents of this field must be a valid XPath expression
> > > (and "|" is
> > > a component of a valid XPath expression).
> > 
> > Joseph,  XPaths are restricted in XML Schema:
> > 
> > Path   ::=   ('.//')? ( Step '/' )* ( Step | '@' NameTest )
> > 
> > Step   ::=   '.' | NameTest
> > 
> > NameTest   ::=   QName | '*' | NCName ':' '*'
> > 
> > The only ORs I see here are the BNF ORs.

-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                      Half-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@c...
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.