W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2002

Re: Question about uniqueness

From: Eddie Robertsson <erobertsson@allette.com.au>
Date: Thu, 12 Sep 2002 09:29:45 +1000
Message-ID: <3D7FD1E9.9090208@allette.com.au>
To: Eric Jain <Eric.Jain@isb-sib.ch>
CC: xmlschema-dev@w3.org

Hi Eric,

>You're right, I have now prefixed all my XPaths. On the other hand MSXML now
>(unjustly) complains about duplicate key sequences for constraints that
>contain a field that evaluates to the current node (dot), but this is
>probably a bug as well?
>
><xsd:unique name="uniqueAccession">
> <xsd:selector xpath="expasy:accession"/>
> <xsd:field xpath="."/>
></xsd:unique>
>
><accessions>
>  <accession>P12345</accession>
>  <accession>P23456</accession>
>  <accession>P34567</accession>
></accessions>
>
I'm not sure I understand what you mean here. If the two or more 
"accession" elements would have the same text content then it _does_ 
violate the unique constraint if it was declared in the element 
declaration for the "accessions" element.

The identity constraint in this case makes sure that each "accession" 
element's text value is unique within the context of the "accessions" 
element. Maybe I missunderstand your concern but it seems MSXML is correct.

Cheers,
/Eddie

>
>
>--
>Eric Jain
>
>  
>
Received on Wednesday, 11 September 2002 19:30:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:34 GMT