[RSS 0.91]
Thursday 30 December, 2010
#DOM Conformance Tests

Over the past few days, I've been working on Arabica's DOM conformance. Until now, it's been based entirely on my reading or not of the relevant W3C Recommendations. I've always been pretty confident is was correct, but a recent bit of undirected Googling reminded me of the W3C DOM Conformance Test Suites and I thought "why not".

The W3C tests are defined in XML and then transformed to code using XSLT. It comes with stylesheets to generated Java JUnit tests and Javascript JSUnit tests. Monkeying up something to generated Arabica-style CppUnit code only took a few minutes, and getting that code compiling and running only took a little bit longer than that. Embarrasingly, some of the existing DOM code didn't compile and nobody had ever noticed. Interrogating a doctype for its entities just isn't that common, I guess.

With that done, and to my relief, nearly all of the 500 odd tests in the Level 1 Core suite passed first time. Most of those that didn't relied on loading an external DTD, and those that remained were primarily around the behaviour of entity references and child nodes of attributes. Good to have it all fixed though.

Thanks to those who put these tests together. It must have really rather tedious, but all the tests I've looked at in any detail have been good and sensible.

Will move onto Level 2 Core in due course, but got a hankering to wrestle some more of Arabica's XSLT engine to the floor.


[Add a comment]

SourceForge Project Page

Jez Higgins