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

Re: Question about uniqueness

From: Eric Jain <Eric.Jain@isb-sib.ch>
Date: Wed, 11 Sep 2002 10:20:35 +0200
Message-ID: <006401c2596c$1a9f4220$2fd721c0@caliente>
To: "Eddie Robertsson" <erobertsson@allette.com.au>
Cc: <xmlschema-dev@w3.org>

> 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 GMT

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