Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Case-insensitive xs:unique?

From: Threetwosevensixseven <32767@---------.--->
To: xmlschema-dev@--.---
Date: 5/22/2005 1:58:00 AM
I have this in my schema file:

<xs:element name="ListOfNames">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="CaseInsensitiveName"
       minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
   </xs:complexType>
   <xs:unique name="UniqueNames">
     <xs:selector xpath="CaseInsensitiveName"/>
     <xs:field xpath="text(.)"/>
   </xs:unique>
</xs:element>

<xs:element name="CaseInsensitiveName">
   <xs:simpleType>
     <xs:restriction base="xs:string">
       <xs:minLength value="1"/>
       <xs:maxLength value="24"/>
     </xs:restriction>
   </xs:simpleType>
</xs:element>


and this in my instance document:

<ListOfNames>
   <CaseInsensitiveName>John</CaseInsensitiveName>
   <CaseInsensitiveName>Fred</CaseInsensitiveName>
   <CaseInsensitiveName>fred</CaseInsensitiveName>
</ListOfNames>

Using:

xmlns:xs="http://www.w3.org/2001/XMLSchema" and
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

This validates, unless I add a second "Fred" when the case-sensitive  
unique constraint kicks in.

But is there a way to make the unique constraint case-insensitive, so  
that the example above is invalid because both "Fred" and "fred" are  
present?


From 32767@d... Sun May 22 10:21:44 2005
Received: from lisa.w3.org ([1


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent