Schema + DTD

I've updated my schema and the generated DTD and documentation.  You can either download a zip file (http://home.houston.rr.com/curta/domtest/domtest.zip about 1.5 MB) or  just the schema (http://home.houston.rr.com/curta/domtest/domtest.xsd), DTD (http://home.houston.rr.com/curta/domtest/domtest.dtd) or browse the documentation (http://home.houston.rr.com/curta/domtest/domtest.html)

I've also put up a sample (http://home.houston.rr.com/curta/domtest/sample.xml) that has both a fairly simple test (attrParentNodeNull) and complex test (nodeListTraverseList).

Since the last iteration, I've added elements for Events, MutationEvents and Ranges, added <signed> so that you can indicate that a test depends on having signed integers (like those that pass -1 to substringData).

My current thought is that all "variable" used in a test should be explicitly declared using a <declare> element.  My previous example did not declare its variables.  Explicit declaration of variables should eventually help diagnose use of variable names when string literals were intended.  I assume forgetting the quotation marks around string literals will be one of the most common coding errors.  If you intend to pass a string literal to a function, the corresponding attribute should have double quotes within the single quotes used to delimit the attribute.

I've also added explicit declaration at the top of the suite of all documents used in the tests.  The <load> element, which loads a document as part of a test, now refers back the to <document> element and can also get the expected document element tag name from the document element.  This is useful to minimize the number of places changes have to be made to use the tests on the Adobe SVG viewer which requires the document element to be <svg>.

I had stated that the schema adhered to the Nov 2000 candidate recommendation.  I haven't checked with this exact version, but a previous version was also valid against the final recommendation with only a change of the schema namespace (from ../10/2000/XMLSchema to .../2001/XMLSchema) according the the XSV service.

I think the schema is stable enough to start writing tests.  I've spent a decent amount of time with the existing NIST DOM tests making sure they handle legal alternatives such as expanding entities and should be able to convert those fairly easily.  Therefore, I'd suggest starting with new tests like the namespace ones to see what I may have overlooked.

p.s. Working in a text view seems to be better than working in a grid view with schema/dtd aware editors.

Received on Sunday, 20 May 2001 19:46:20 UTC