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

id attribute of schema elements in Microsoft test suite

From: Stefan Wachter <Stefan.Wachter@gmx.de>
Date: Thu, 1 Aug 2002 12:58:35 -0400 (EDT)
To: xmlschema-dev@w3.org
Message-ID: <6086.1028221077@www4.gmx.net>




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 GMT

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