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

RE: Proposal for categorizing

From: Arnold, Curt <Curt.Arnold@hyprotech.com>
Date: Wed, 13 Jun 2001 14:09:49 -0600
Message-ID: <B2C1451A181BD411B88A00E018C1C19C08ACFC@thor.aeathtl.com>
To: "'www-dom-ts@w3.org'" <www-dom-ts@w3.org>
What is currently in the schema is the ability to state as the immediate child of the <test> element as series of implementation conditionals that all must be true for the test to be appropriate.  For
example, if you have a test that requires DOM Level 2, an binding that uses signed numbers and an implementation that expand entity references, you could state that with:

<test name="mySampleTest">
	<hasFeature feature="Core" version="2.0"/>
	<signed/>
	<!--  not sure of the exact name, follows JAXP's naming  -->
	<expandsEntityReferences/>
	<!--  body of test follows    -->
</test>

These conditionals would result in a static method that could get called to determine if the test should be instantiated, something like:

static bool isApplicable(DocumentBuilderFactory* factory,DOMImplementation impl) {
	bool isApplicable = true;
	isApplicable &= impl.hasFeature("Core","2.0");
	//
	//   Java bindings are always signed	
	isApplicable &= true;
	isApplicable &= factory.expandsEntityReferences();
	return isApplicable;
}

If that method return false, then the test would not be added to the list of tests to be run for that particular implementation.

There isn't an equivalent of an explicit resultTesting attribute, however
you could infer it by looking at the presence of specific types of 
assertions in the test.

There is also a <metadata/> element that could contain arbitrary information
that is not essential to running the tests (such as authorship and
references to specific parts of the DOM spec) that we haven't fleshed
out yet.
Received on Wednesday, 13 June 2001 16:09:58 GMT

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