Re: Question about uniqueness

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 UTC