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

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 UTC