Chapter 5. Conclusion

5.1. XML conformance of the parser

The validating XML parser of the Haskell XML Toolbox was elaborately tested with the XML Test Suites (XML TS) from the W3C [WWW02].

These XML TS consist of over 2000 test files for the XML 1.0 specification [WWW01] and an associated test report. The test report contains background information on conformance testing for XML as well as test descriptions for each of the test files.

The test suite consists of two basic test types: Binary Tests and Output Tests. Binary conformance tests are documents that should be accepted or rejected by the parser. Output tests are tests for valid documents which are paired with a reference file as the canonical representation [WWW03] of the input file. By comparing the output of the XML parser with the reference file, it can be ensured that the parser provides the correct information.

There exist four different tests cases:

Valid Documents

The XML parser is required to accept these documents. For most test cases a reference file exists.

Invalid documents

A validating XML parser has to report a violation of some validity constraint. The reported error must meet the test case description.

Not well-formed documents

An XML parser has to report a fatal error. The reported error must meet the test case description.

Optional errors

An XML parser is permitted to ignore these errors, or to report them. If an error is reported, the error message must meet the test case description.

By using these tests, it could be ensured that the validating XML parser of the Haskell XML Toolbox covers most aspects of the XML 1.0 specification [WWW01]. Because the XML TS is not complete, it is not possible to claim conformance with the specification itself, but only with the XML TS. At the moment the parser passes about 95% of these test cases, see Section A.2 for further details.