W3C home > Mailing lists > Public > www-dom-ts@w3.org > November 2001

DOMTestCase, JUnitRunner, AvalonRunner

From: Philippe Le Hegaret <plh@w3.org>
Date: Mon, 26 Nov 2001 11:24:05 -0500
Message-ID: <3C026CA5.128B30DC@w3.org>
To: www-dom-ts@w3.org

I noticed that DOMTestCase [1] is using JAXP to load a Document in memory. This
method simplifies the bootstrap of the DOM but:

- it requires the DOM implementation to support JAXP in order to run the Test
Suite. Not all DOM implementation are supporting JAXP. The Batik
DOM implementation does not [2] implement this API.

- DOM Level 3 will use its own way to bootstrap a DOM implementation.

So, I propose a change in the bootstrapping process. Try DOM Level 3
bootstrapping first (option 1), then JAXP (option 2), and if everything failed,
try to bootstrap it based on the content of the properties
"org.w3c.dom.DOMImplementation" and "org.w3c.dom.Document" (option 3). This
requires to embed a full SAX2 parser in the distribution to build the tree
ourself. "org.w3c.dom.Document" will be used to bootstrap a DOM Level 1 only
implementation. It might fail if the implementation does not support
newInstance() on the class implementing the Document interface and, in that
case, you will be really force to change the DOM Test Suite in order to run it.

Also, from DOMTestDocumentBuilderFactory [3]:
        mutator.invoke(factory,new Object[] { new Boolean(value) } );

It doesn't check if the factory was able to support the requested feature. In
other words, we have no garantee that the DOM tree is wrong due to a DOM
implementation bug or if the underlying XML parser does not support the
requested feature. So, if the DOM Level 3 bootstrap or the JAXP bootstrap do
not support the features we are looking for, we can (should?) fallback to
option 3.

If no objection, I'm happy to change the current bootstrapping.

JUnitRunner [4] and AvalonRunner [5] test the features before running the test
suite. Some features are missing, incorrects, or mislabeled. The following
proposed change contains all W3C recommended features (from DOM, SVG, MathML
and SMIL Animation recommendations). I didn't touch the DOM Level 3 features
yet since we are still adding/changing them.

printFeature(domimpl,"DOM Level 1","XML", "xml","1.0");
printFeature(domimpl,"DOM Level 2","CORE","core","2.0");
printFeature(domimpl,"DOM Level 2 XML","XML","xml","2.0");
printFeature(domimpl,"DOM Level 2 HTML", "HTML" , "html" , "2.0");
printFeature(domimpl,"DOM Level 2 Views", "VIEWS" , "views" , "2.0");
printFeature(domimpl,"DOM Level 2 Style Sheets",
 "STYLESHEETS" , "stylesheets" , "2.0");
printFeature(domimpl,"DOM Level 2 CSS", "CSS" , "css" , "2.0");
printFeature(domimpl,"DOM Level 2 CSS2", "CSS2" , "css2" , "2.0");
printFeature(domimpl,"DOM Level 2 Events","EVENTS","events","2.0");
printFeature(domimpl,"DOM Level 2 User Interface Events",
 "UIEVENTS","uievents","2.0");
printFeature(domimpl,"DOM Level 2 Mouse Events",
 "MOUSEEVENTS","mouseevents","2.0");
printFeature(domimpl,"DOM Level 2 Mutation Events",
 "MUTATIONEVENTS","mutationevents","2.0");
printFeature(domimpl,"DOM Level 2 HTML Events","HTMLEVENTS","htmlevents","2.0");
printFeature(domimpl,"DOM Level 2 Traversal","TRAVERSAL","traversal","2.0");
printFeature(domimpl,"DOM Level 2 Range","RANGE","range","2.0");
printFeature(domimpl,"DOM Level 3","CORE","core","3.0");
printFeature(domimpl,"DOM Level 3 XML","XML","xml","3.0");
printFeature(domimpl,"DOM Level 3 Core","CORE","core","3.0");
printFeature(domimpl,"DOM Level 3 XPath", "XPATH", "xpath", "3.0");
printFeature(domimpl,"SVG Version 1.0",
 "org.w3c.dom.svg", "org.w3c.dom.svg", "1.0");
printFeature(domimpl,"SVG Version 1.0 Static",
 "org.w3c.dom.svg.static", "org.w3c.dom.svg.static", "1.0");
printFeature(domimpl,"SVG Version 1.0 Dynamic",
 "org.w3c.dom.svg.dynamic", "org.w3c.dom.svg.dynamic", "1.0");
printFeature(domimpl,"SVG Version 1.0 Animation",
 "org.w3c.dom.svg.animation", "org.w3c.dom.svg.animation", "1.0");
printFeature(domimpl,"SVG Version 1.0 (full support)",
 "org.w3c.dom.svg.all", "org.w3c.dom.svg.all", "1.0");
printFeature(domimpl,"SMIL Animation", "TIMECONTROL", "timecontrol", null);
printFeature(domimpl,"MathML Version 2.0",
 "org.w3c.dom.mathml", "org.w3c.dom.mathml", null);

Again, I'm happy to do the commit (if so, i'll probably put these information
in a separate file).


Regards,

Philippe


[1] http://dev.w3.org/cvsweb/2001/DOM-Test-Suite/java/org/w3c/domts/DOMTestCase.java
[2] http://xml.apache.org/batik/index.html
[3] http://dev.w3.org/cvsweb/2001/DOM-Test-Suite/java/org/w3c/domts/DOMTestDocumentBuilderFactory.java
[4] http://dev.w3.org/cvsweb/2001/DOM-Test-Suite/java/junit/org/w3c/domts/JUnitRunner.java
[5] http://dev.w3.org/cvsweb/2001/DOM-Test-Suite/java/avalon/org/w3c/domts/AvalonRunner.java
Received on Monday, 26 November 2001 11:23:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 6 April 2009 12:58:45 GMT