Automatic XML Schema/DTD generation?

Would it be possible to generate (most of) the XML Schema and/or DTD for the
DOM test suite automatically from the XML representation of the DOM
specifications?

For example, instead of having to type in something like this...

<xsd:element name="replaceChild" substitutionGroup="DOMFunction">
	<xsd:annotation>
		<xsd:appinfo>
			<annot:function featureOf="Node" return="Node"/>
		</xsd:appinfo>
	</xsd:annotation>
	<xsd:complexType>
		<xsd:complexContent>
			<xsd:extension base="NodeFunction">
				<xsd:attribute name="newChild" type="variable" use="required"/>
				<xsd:attribute name="oldChild" type="variable" use="optional"/>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
</xsd:element>

... or something like this...

<!ELEMENT replaceChild (#PCDATA)>
<!ATTLIST replaceChild
	oldChild CDATA #REQUIRED
	newChild CDATA #REQUIRED
	returnType CDATA #FIXED "Node"
	variable CDATA #REQUIRED
	DOMException (NONE | HIERARCHY_REQUEST_ERR | WRONG_DOCUMENT_ERR |
NO_MODIFICATION_ALLOWED_ERR | NOT_FOUND_ERR) "NONE"
>

... it would be really nice if some tool could generate it from the
information in the DOM specification.

Regards, Freek
---
Freek de Bruijn
Software Engineer
X-Hive Corporation
e-mail: freek@x-hive.com
phone: +31 10 7108629
http://www.x-hive.com/

Received on Tuesday, 29 May 2001 10:23:21 UTC