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:




Jeni Tennison
Received on Wednesday, 19 December 2001 13:59:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:56 UTC