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

referencing wildcard content

From: Stefan Wachter <Stefan.Wachter@gmx.de>
Date: Fri, 15 Nov 2002 15:39:41 +0100 (MET)
To: xmlschema-dev@w3.org
Message-ID: <16871.1037371181@www8.gmx.net>

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:


<root xmlns="http://www.publishing.org">
				<b id="id1">
					<b id="id2" />


<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	<xsd:element name="root">
				<!-- define keys in this element -->
				<xsd:element name="keys">
							<xsd:any processContents="skip" maxOccurs="unbounded" />
				<!-- define keyrefs in this element -->
				<xsd:element name="keyref" maxOccurs="unbounded" minOccurs="0"
type="xsd:string" />
		<!-- 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:keyref name="trickeyRef" refer="trickyKey">
			<xsd:selector xpath=".//x:keyref|.//x:keyref|./x:keyref|./x:keyref" />
			<!-- should be considered equal to "." -->
			<xsd:field    xpath=".|.|." />

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,

Received on Friday, 15 November 2002 09:40:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:07 UTC