ISO IEC 13673 pdf download – Information technology — Document processing and related communication — Conformance testing for Standard Generalized Markup Language (SGML) systems
5.2 The role of SGML in a tested system The way a test suite is used depends on whether the tested system processes existing SGML docu- ments, or produces SGML documents. 5.2.1 Systems that read SGML A system that acts upon existing SGML documents is tested by examining the results it produces from every test in a comprehensive test suite. However, the variation in SGML systems means these results may take any number of forms. As a result, there is no unique method for determining whether a tested system correctly processes a test case. The remainder of this subsubclause discusses various methods for evaluating test suite results produced by a system that processes SGML docu- ments. Of these methods, RAST provides the most information and should be used whenever possible.
5.2.1.1 Evaluating with RAST RAST (see clause 1 4) is a simple SGML applica- tion designed to validate a parser’s recognition of the Element Structure Information Set (ESIS). ESIS (see annex A) is the information exchanged by a parser and other components of a program that implements a structure-controlled application. RAST reflects the ESIS of an SGML document with a minimal amount of additional information in such a way that the results it produces from two SGML documents using the same concrete syntax will be the same if and only if the two documents have the same ESIS. An SGML system that supports RAST is easily tested by machine comparison of RAST results to known correct RAST output for every document in a test suite. NOTE – There is no requirement that an SGML sys- tem support RAST. However, it should be easy to implement RAST with any general-purpose SGML system that provides a software-development envi- ronment for building SGML applications.
5.2.1.2 Comparing with equivalent documents An SGML system that does not support RAST can be tested to some extent through a structure-con- trolled application with the following properties: – The application is not restricted to one or more specified document type definitions;
– The application’s output is machine-readable (for example, it is a computer file rather than printed paper or sound). Such applications include, for example, one that counts the number of elements in a document or one that produces a vocabulary list of the unique words that occur within the content of a document. The test procedure involves comparing the appli- cation’s output on sets of equivalent, but not identical, SGML documents. Identical output must be produced for such documents. This criterion alone cannot demonstrate a system’s conform- ance to ISO 8879. For example, the criterion is satisfied by a system that produces identical output for all documents, equivalent or not. More informa- tion is obtained if the application produces different results for documents that are not equivalent. Note, however, that the simple word-list application just described does not meet this stricter constraint, since there could be documents with very different element structure that use the same vocabulary.
NOTE – Implementors of test suites that consist of sets of equivalent documents should verify that mem- bers of each set are indeed equivalent by confirming that RAST produces the same output for every mem- ber in the set.
5.2.1.3 Evaluation through error recognition The correctness of a validating SGML parser can, in large measure, be demonstrated if the parser
a) reports erroneous SGML documents to be invalid and
b) reports valid documents to be con- forming. This type of testing can be done regardless of how errors are reported (possibilities include visual and auditory signals as well as error messages). However, some aspects of SGML parsing
– for instance, significance of record ends and correct interpretation of default attribute values
– do not affect whether the document is valid and hence cannot be tested in this way. Comprehen- sive testing of markup minimization in this manner is also difficult. Furthermore, a system that reports an erroneous document to be in error need not be conforming; the system may have accepted the erroneous construct and misinterpreted some cor- rect markup.
5.2.1.4 Other forms of evaluation Knowledge of particular applications can be used to design system-specific methods of reporting all or part of the ESIS information in a document. The reported information is an indication of the con- formance of the tested system’s parser to ISO 8879.
ISO IEC 13673 pdf download – Information technology — Document processing and related communication — Conformance testing for Standard Generalized Markup Language (SGML) systems
