error in DTD for schemas

I have found an error in the non-normative DTD for schemas that is in Part 1
[1].

In the schema for schemas, the extension element (children of simpleContent
and complexContent) is declared to be of a type that is an extension of a
complexType named annotated (which allows an annotation child).  Thus, the
following schema-fragment should be legal:

	<xs:complexType name='base'>
		<xs:sequence>
			<xs:element name='e1' type='string'/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name='extension'>
		<xs:complexContent>
			<xs:extension base='base'>
				<annotation>
					<documentation>
						blah, blah, blah
					</documentation>
				</annotation>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

However, the DTD for schemas contains an error, such that if the above
fragment is validated against the DTD for schemas it will fail (xsv does
this DTD validation check as an early step in its schema validation
process). 

The error is that the does not allow the optional annotation child of
extension:

	<!ELEMENT %extension; (%particleAndAttrs;)>

Which should be

	<!ELEMENT %extension; ((%annotation;)?, %particleAndAttrs;)>

Note: this error occurs in both the text of the DTD that appears in Appendix
G [2] and in the DTD that is linked to from the document header [3].

pvb

References
[1] http://www.w3.org/TR/xmlschema-1
[2] http://www.w3.org/TR/xmlschema-1/#nonnormative-schemaDTD
[3] http://www.w3.org/2001/XMLSchema.dtd

Received on Wednesday, 25 July 2001 16:09:05 UTC