The NIST XML Schema test suite for built-in simple datatypes.

September 25, 2001

(This file is included with the downloadable release).

The tests consist of a number of XML instance documents, each of which contains a legal value of a datatype derived from one of the built-in simple datatypes, as restricted by one of its applicable facets. The types contained in the instance documents are each derived in an accompanying schema document, which is referenced in the instance document.

The testing procedure thus consists of parsing the instance documents.
 

Accessing the tests

The tests can be accessed in a number of ways:
  1. Parse the master XML document,  NISTXMLSchemaTestSuite.xml. This file comprises various elements which describe the test suite, as well as a set of <LINK> elements. Each <LINK> element contains an href attribute and a name attribute. The href attribute contains the URI of an XML document containing tests specific to the type named in the name attribute. Parse the file whose location is given in the href attribute. Within a single element, <NISTXMLSchemaTypeTests>, this document contains a named <Type> element, which in turn contains a named <Facet> element corresponding to each applicable constraining facet for the type. For each facet, <Schema> elements identify test schemas via their href attribute, and <Instance> elements identify test instance documents via their href attributes;
  2. For type-specific testing, parse the XML document <typename>.xml, where <typename> is the name of the XML type as it appears in the Recommendation and is case sensitive (e.g. anyURI.xml, nonPositiveInteger.xml). These documents are the type-specific documents mentioned above: the test files can be accessed by following the URI given in the href attribute of each <Instance> element;
  3. To access the tests directly, parse all files with names fitting the wildcard pattern NISTXML-*xml .