Re: Uniqueness question

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 UTC