[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Uniqueness

From: Michael Kay <mike@saxonica.com>
Date: Thu, 17 Jan 2008 09:08:44 -0000
To: "'Dutta, Abhijit'" <abhijit.dutta@logicacmg.com>, <xmlschema-dev@w3.org>
Message-ID: <005001c858e8$90544d40$6501a8c0@turtle>
RE: Uniqueness
 

Is there a way in XSD to specify that the name and index will be unique for
a set of fields? If so, could you please give an example..

 

You can use xs:unique. But exactly how you use it depends on having a
clearer specification. Are you saying "name must be unique and index must
also be unique", or are you saying "the combination of name and index must
be unique" (the second option would allow two things to have the same name
provided they have a different index).

 

Also, uniqueness applies within some scope - typically there is some element
E within which each child/descendant element F has a unique value for V. You
need to tell us something about E, because that is where you define the
constraint.

 

Michael Kay

http://www.saxonica.com/
Received on Thursday, 17 January 2008 09:09:08 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.