Re: Question about uniqueness

> If your instance document use a default namespace and the element names
> you use for uniqueness are qualified then the tools are wrong.

SQC, XSV, MSXML, Oracle, and Sun's MSV all agree that the following is
valid, and complain if entryKey is duplicated:


<swissprot
 xmlns="urn:org:expasy:models"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="urn:org:expasy:models swissprot.xsd"
>
 <entry key="P30089"/>
 <entry key="P30090"/>
</swissprot>


<xsd:schema
 xmlns="urn:org:expasy:models"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 targetNamespace="urn:org:expasy:models"
 elementFormDefault="qualified"
>
 ...
 <xsd:key name="entryKey">
  <xsd:selector xpath="entry"/>
  <xsd:field xpath="@key"/>
 </xsd:key>
 ...
</xsd:schema>


--
Eric Jain

Received on Wednesday, 11 September 2002 04:20:20 UTC