W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2005

Case-insensitive xs:unique?

From: Threetwosevensixseven <32767@despammed.com>
Date: Sun, 22 May 2005 00:57:38 +0100
Message-Id: <22A6431C-029B-4F0F-87B5-E808DABAC980@despammed.com>
To: xmlschema-dev@w3.org

I have this in my schema file:

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

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

and this in my instance document:



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

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  
Received on Sunday, 22 May 2005 10:12:26 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:08 UTC