id attribute of schema elements in Microsoft test suite

Dear all,

when testing my parser against the Microsoft test suite the following two
tests failed: attgA008.xsd and stA003.xsd. The essence of these tests is that
the two schema document of these tests are composed by including and importing
other schema documents. There are schema components in the included /
imported schema documents that have the same id for example the stA003.xsd includes
the file stA003b.xsd:

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<xsd:include schemaLocation="stA003b.xsd"/>
	<xsd:simpleType id="foo123" name="fooString">
		<xsd:restriction base="xsd:string">
			<xsd:length value="4"/>
		</xsd:restriction>
	</xsd:simpleType>
</xsd:schema>

stA003b.xsd:
==========

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<xsd:simpleType id="foo123" name="dup_id">
		<xsd:restriction base="xsd:string">
			<xsd:length value="4"/>
		</xsd:restriction>
	</xsd:simpleType>
</xsd:schema>

Both schema document have an element with the same id, namely "foo123".

Is this really an error? Normally an ID attribute enforces identity only in
one instance document. Is there a special behaviour of the id attribute of
schema elements?

Thanks for your attention,
Stefan

Received on Friday, 2 August 2002 05:57:55 UTC