W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2004

Re: Uniqueness and case sensitivity

From: Jeff Dahl <jddahl@micron.com>
Date: Mon, 12 Apr 2004 08:13:28 -0600
Message-ID: <407AA408.7070401@micron.com>
To: Xan Gregg <xan.gregg@jmp.com>
Cc: xmlschema-dev@w3.org

Xan Gregg wrote:

>> Given the following XML segment:
>>
>> <foos>
>>    <foo id="1490" name="myName"/>
>>    <foo id="9091" name="myNAME"/>
>> </foos>
>>
>> shouldn't a uniqueness constraint:
>>
>>    <xsd:element name="foos">
>>    <xsd:complexType>
>>        <xsd:sequence>
>>        <xsd:element name="foo" type="foo_type" maxOccurs="unbounded"/>
>>        </xsd:sequence>
>>    </xsd:complexType>
>>    <xsd:unique name="name_id">
>>        <xsd:selector xpath="foo"/>
>>        <xsd:field xpath="@name"/>
>>    </xsd:unique>
>>    </xsd:element>
>>
>> throw an error?  ...
>> Shouldn't unique be case-sensitive?
>
>
> Yes, and I don't see any other problems with your example.  Are you 
> sure your processor enforces identity constraints?

Using the sample program, sax.Counter, of Xerces 2.6.2 with the flags, 
-v -s -f -np, will throw:
'Duplicate unique value [myNAME] declared for identity constraint of 
element "foos".'
when the case is the same.

-Jeff Dahl
Received on Monday, 12 April 2004 10:14:19 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:11 UTC