- From: Stefan Wachter <Stefan.Wachter@gmx.de>
- Date: Fri, 15 Nov 2002 15:39:41 +0100 (MET)
- To: xmlschema-dev@w3.org
Hi all. According to a recent discussion in this list on the equality of values I think that the test case idc006.nogen.v00 of the SUN schema test suite is incorrect. The test case consists of the following instance and schema document: instance: <root xmlns="http://www.publishing.org"> <keys> <a> <a> <b id="id1"> <b id="id2" /> </b> </a> </a> </keys> <keyref>id1</keyref> <keyref>id2</keyref> </root> schema: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.publishing.org" xmlns="http://www.publishing.org" xmlns:x="http://www.publishing.org" elementFormDefault="qualified"> <xsd:element name="root"> <xsd:complexType> <xsd:sequence> <!-- define keys in this element --> <xsd:element name="keys"> <xsd:complexType> <xsd:sequence> <xsd:any processContents="skip" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> </xsd:element> <!-- define keyrefs in this element --> <xsd:element name="keyref" maxOccurs="unbounded" minOccurs="0" type="xsd:string" /> </xsd:sequence> </xsd:complexType> <!-- corrected: no default namespace in XPath --> <xsd:key name="trickyKey"> <xsd:selector xpath=".//x:keys/x:a/*/x:b|.//x:keys/x:a/*/*/x:b" /> <xsd:field xpath="@id" /> </xsd:key> <xsd:keyref name="trickeyRef" refer="trickyKey"> <xsd:selector xpath=".//x:keyref|.//x:keyref|./x:keyref|./x:keyref" /> <!-- should be considered equal to "." --> <xsd:field xpath=".|.|." /> </xsd:keyref> </xsd:element> </xsd:schema> To summarize: The "keys" element of the instance document is indexed two times using the two "id" attributes of the nested "b" elements. No type info is available for the "id" attributes. Therefore the "anySimpleType" should be assumed. (?) The "keyref" elements are of type string. A value of type string can never be equal to a value of type "anySimpleType". Therefore the keyref constraint is not satisfied. Can anyone verify my assumption? Thanks for your attention, --Stefan
Received on Friday, 15 November 2002 09:40:13 UTC