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

Re: Uniqueness question

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 19 Dec 2001 18:58:58 +0000
Message-ID: <11327018049.20011219185858@jenitennison.com>
To: "Arigapudi, Shyam" <Shyam.Arigapudi@ugs.com>
CC: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Hi Shyam,

> If I use ID for type then it checks for uniqueness at all places.
> What I want is uniqueness with a sequence of elements. So, if I have
> another type (totally different that has sequence of totally
> different elements) I would like to reuse the ID. Is this possible
> or is there something I can use?

The identity constraints xs:unique and xs:key might meet your
requirements. You define an identity constraint within a particular
element, and its scope is then limited to that element.

Have a look at the XML Schema Primer Section 5 for some examples:

  http://www.w3.org/TR/xmlschema-0/#quartelyReport

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Wednesday, 19 December 2001 13:59:00 GMT

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