SV: Automatic XML Schema/DTD generation?

Hi Freek

It hasn't been discussed extensively in the DOM TS mailing list, but is
something I have in mind. I look forward to discussing this on the list, as
it would mean

1. less cofusion over semantics
2. correct tests from phase 1
3. we can point to the right part of the spec, since the spec generated the
test

However, we need to have more granularity in the DOM Specification format,
which is being looked into.

/Dimitris

-----Ursprungligt meddelande-----
Från: Freek de Bruijn [mailto:freek@x-hive.com]
Skickat: den 29 maj 2001 16:23
Till: DOM TS
Ämne: 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:39:57 UTC