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

Is this test case invalid (implicit derivation from ur-type / attribute wildcards)

From: Stefan Wachter <Stefan.Wachter@gmx.de>
Date: Thu, 15 Aug 2002 11:19:47 +0200 (MEST)
To: xmlschema-dev@w3.org
Message-ID: <31633.1029403187@www7.gmx.net>

Hi all,

in the Sun test suite there is a schema (xsd002.xsd) that derives types
implicitly from the ur-type:

	<xsd:element name="root">
		<xsd:complexType>
			<xsd:choice maxOccurs="unbounded">
				<xsd:element name="foo" />
				<xsd:element name="bar" form="qualified" />
				<xsd:element name="zot" form="unqualified" />
			</xsd:choice>
		</xsd:complexType>
	</xsd:element>

In the instance document the element "zot" has attributes:

<f:root xmlns:f="http://foo.com">
	<foo>
		<this />
		<contents />
		should not be
		validated
		<because it="is ur-type" />
	</foo>
	<f:bar />
	<zot attributes="are" also="ignored">
		when using <ur><type/></ur>
	</zot>
</f:root>

I think that this test case is incorrect because an implicit derivation is a
short-hand for restricting the ur-type. Though the ur-type has an attribute
wildcard (namely <anyAttribute/>) this wildcard is not inherited by complex
type restrictions.

Is my interpretation right, i.e. is the test case invalid?

Thanks for your attention,
--Stefan
Received on Thursday, 15 August 2002 05:20:19 GMT

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