- From: Rajesh Seenichamy <rseenichamy@csc.com>
- Date: Mon, 18 Sep 2006 21:26:51 +0000
- To: www-xml-schema-comments@w3.org
- Message-Id: <2FE9BAA0-7EA0-4242-8655-825323E60F97@csc.com>
Is there a way to specify the unique constraints on attribute names on element nodes? For an example, see the following schema: <xsd:element name="Category" minOccurs="0" maxOccurs="unbounded"> <xsd:annotation> <xsd:documentation>Logger Category</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:attribute name="Name" use="required" xdb:SQLType="VARCHAR"/> <xsd:attribute name="Level" use="required" xdb:SQLType="INTEGER"/> </xsd:complexType> </xsd:element> And instance for the above schema can be something like this: <Category Name="TestNode1" Level="DEBUG"/> <Category Name="TestNode1" Level="INFO"/> <Category Name="TestNode2" Level="FATAL"/> My question is that the category name "TestNode1" has been repeated twice in the above example. So is there a way that we can specify in the XML Schema that only one unique value of the category name can be present in an instance instead of allowing multiple same category name. Please exemplify. Thanks ! Rajesh ----------- Rajesh Seenichamy RSeenichamy@CSC.COM Rajesh.Seenichamy@gmail.com ------------------------------------------------------------------------ ------------------------------------------------------------------------ -------------------------------- This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ------------------------------------------------------------------------ ------------------------------------------------------------------------ --------------------------------
Received on Thursday, 21 September 2006 23:43:14 UTC