contentType attribute on test and suite

I wanted to give a little heads up on a change that I commit at least by the end of the weekend.

As discussed earlier, browsers are able to have distinct DOM implementations for different types of content, that is XML, HTML and SVG.  The same tests can be applicable to multiple types of content, so you want to be able to "reuse" a test in multiple contexts.

How I'm intending to address this is to add an optional contentType attribute to the <suite> and <test> whose value is a contentType of "text/xml", "text/html" or "image/xml+svg".  The value would propagate from the enclosing suite and if it was never specified, it would default to "text/xml"

How this would work for the HTML tests is that there would be two distinct "alltests" suite definitions, one that specifies "text/xml" and another that specifies "text/html".  The tests would not specify a contentType or an extension on the URI's in the <load> instructions.  If the test loaded "anchor" when running in the xhtml suite, anchor.xml would be loaded using the XHTML DOM implementation.  When running in the html suite, anchor.html would be loaded.

If the contentType is unsupported by an implementation (for example, if the test specified "text/html" with an XML parser), the test would be omitted.

Received on Thursday, 6 December 2001 11:32:08 UTC