Re: Semantic of the unique/key/keyref constraints.

ht@cogsci.ed.ac.uk (Henry S. Thompson) writes:

> I think you're right, this example is bogus (the complete schemas are
> all OK, but this out-of-line example is wrong).  It's clearly _part_
> elements that are (meant to be) unique, so the 'selector' should be
> "r:regions/r:zip/r:part".  If they're just supposed to be unique
> within a single _occurrence_ of the <zip> elt, then all that's needed
> is a single "field='@number'".  If they're supposed to be unique
> across multiple <zip>s, then as it stands with the restricted XPath
> expression subset the REC allows, I don't think you can do it.

I wasn't completely clear here.  The simple alternative offered above
requires <part> to be unique wrt @number throughout the
<purchaseReport>.  This means they're unique across multiple zips,
_whether or not_ the zips are different.  It's _allowing_ the same
part number under different zips that can't be accommodated by the REC 
as it stands.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/

Received on Tuesday, 19 June 2001 07:29:49 UTC