Syntax specific and syntax agnostic tests

All the tests in the CVS depending on loading either staff.xml or staffNS.xml and therefore have a prerequiste of an implementation of DOM that supports reading XML documents.  Unfortunately, it is not possible to run the same tests on an HTML DOM implementation since it is not possible to create a logically equivalent HTML version of staff.xml.  It is possible to run most tests on an SVG DOM implementation since if the document element is changed from <staff> to <svg:svg>, an SVG implementation will see all the inner content as metadata of a empty drawing.  (Whether rightly on wrongly, Adobe's SVG implementation will refuse to load a document whose document element isn't svg)

That said, we should have on deck a large body of HTML DOM tests from NIST.  Those that do not require HTML specific interfaces should be generally applicable to any DOM implementation, provided that you create equivalent XML, WML. SVG, et al documents and the proper document is loaded in response to the <load> instruction.

That said before the HTML tests are introduced, the existing tests in level1/core and level2/core should have qualifiers added that indicate that they have a prerequisite of an XML DOM or SVG DOM implementation (that can be added with a regexp replacement in just a few minutes).

Since XML implementations do not add any interfaces beyond core, the only test in level1/xml should fail if hasFeature("XML","1.0") is false.

The "HTML" tests should be divided into two groups.  Those that depend on HTML specific interfaces should go into level2/html and those that do not should go into level2/core.  For those in level2/core, we should create a logically equivalent XML, SVG, WML et al source document and have those tests run in any processor that supports "Core".  The implementation of behind <load> would need to be enhanced so that it picks the appropriate file, what I was thinking was that if you had

<load var="doc" href='"testdoc"'/>

that it would load testdoc.xml, testdoc.html, testdoc.svg, testdoc.wml as appropriate.

Any thoughts on when the HTML tests will be read to be committed?

Received on Saturday, 17 November 2001 14:54:37 UTC