Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Redefine question >Thread Next - Re: Uniqueness and case sensitivity Uniqueness and case sensitivityTo: xmlschema-dev@--.--- Date: 4/9/2004 9:58:00 AM
Given the following XML segment:
<foos>
<foo id="1490" name="myName"/>
<foo id="9091" name="myNAME"/>
</foos>
shouldn't a uniqueness constraint:
<xsd:element name="foos">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="foo" type="foo_type" maxOccurs="unbounde=
d"/>
</xsd:sequence>
</xsd:complexType>
<xsd:unique name="name_id">
<xsd:selector xpath="foo"/>
<xsd:field xpath="@name"/>
</xsd:unique>
</xsd:element>
throw an error? According to XML Schema Part 1: Structures:
4.1 *If *the {identity-constraint category}
<http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#identity-constraint_=
name>
is /unique/, *then *no two members of the =B7qualified node set=B7
<http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-qns> have
=B7key-sequences=B7
<http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-ks> whose
members are pairwise equal, as defined by Equal
<http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes#equal> in
[XML Schemas: Datatypes]
<http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#ref-xsp2>.
where Equal is:
4.2.1 equal
Every =B7value space=B7
<http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#dt-val=
ue-space>
supports the notion of equality, with the following rules:
* for any /a/ and /b/ in the =B7value space=B7
<http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#=
dt-value-space>,
either /a/ is equal to /b/, denoted /a = b/, or /a/ is not equal
to /b/, denoted /a != b/
* there is no pair /a/ and /b/ from the =B7value space=B7
<http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#=
dt-value-space>
such that both /a = b/ and /a != b/
* for all /a/ in the =B7value space=B7
<http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#=
dt-value-space>,
/a = a/
* for any /a/ and /b/ in the =B7value space=B7
<http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#=
dt-value-space>,
/a = b/ if and only if /b = a/
* for any /a/, /b/ and /c/ in the =B7value space=B7
<http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#=
dt-value-space>,
if /a = b/ and /b = c/, then /a = c/
* for any /a/ and /b/ in the =B7value space=B7
<http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#=
dt-value-space>
if /a = b/, then /a/ and /b/ cannot be distinguished (i.e.,
equality is identity)
Shouldn't unique be case-sensitive?
Thanks,
Jeff Dahl
From gaytri_v@y... Sat Apr 10 07:14:15 2004
Return-Path: <gaytri_v@y...>
X-Original-To: xmlsch | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
