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="."/>
>  <accession>P12345</accession>
>  <accession>P23456</accession>
>  <accession>P34567</accession>
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.


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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:05 UTC