W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2001

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

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 19 Jun 2001 12:29:50 +0100
To: vdv@dyomedea.com
Cc: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>, David Fallside <fallside@us.ibm.com>
Message-ID: <f5bwv68btch.fsf@cogsci.ed.ac.uk>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:21 GMT