source: trunk/QA/xmlconf/eduni/errata-4e/testcases.dtd @ 450

Last change on this file since 450 was 450, checked in by cameron, 9 years ago

Include xmlconf

File size: 5.7 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3    @(#)testcases.dtd   1.6 99/01/21
4    Original version copyright 1998 by Sun Microsystems, Inc.
5    All Rights Reserved.
6    Modifications copyright 1999 by OASIS.
7
8    1999-06-09 00:20
9
10    DTD describing a database of XML tests.
11
12    NOTE:  the OASIS/NIST test effort also has a DTD for its test
13    environment, but that DTD is not yet suited for automated test
14    processing.  (Among other issues, it doesn't record information
15    putting any test case into the test matrix.)  If that gets fixed,
16    it may be useful to switch over to that DTD.
17-->
18
19<!--
20    The root element of the whole collection is TESTSUITE.  While not
21    very different from TESTCASES, it must be distinguished due to
22    improper processing by IE5.
23-->
24<!ELEMENT TESTSUITE ( TESTCASES+ )>
25<!ATTLIST TESTSUITE 
26    PROFILE     CDATA           #IMPLIED
27    >
28
29<!--
30    The root element of a collection should be "TESTCASES".  It groups
31    a set of tests in a particular "PROFILE", which is descriptive.  For
32    example, a "Japanese" profile might group tests with documents
33    in standard Japanese encodings, using Japanese characters used
34    inside names and name tokens as well as inside text.  Or the
35    profile might be associated with the test supplier.
36-->
37
38<!ELEMENT TESTCASES (TEST|TESTCASES)*>
39<!ATTLIST TESTCASES
40    xml:base    CDATA           #IMPLIED
41    PROFILE     CDATA           #IMPLIED
42    >
43
44<!--
45    The body of each TEST element is its description, used
46    to evaluate the diagnostic produced on negative tests.
47    People will generally read this to evaluate whether the
48    test failed for the correct reason.
49
50    The type of (external) ENTITIES required affect the results
51    permitted for certain types of nonvalidating parsers.  In
52    some cases, errors (even well-formedness errors) can't be seen
53    without reading external parameter or general entities.
54
55    Each test has a unique ID used in diagnostics.
56
57    Tests with an OUTPUT attribute do dual duty:  not only must parsers
58    accept the test, but the data they report must also have "Second
59    Canonical Form" as found in the specified output file.  (This is
60    what James Clark titled "Canonical XML", with the addition of the
61    NOTATION declarations that all XML parsers are required to report.)
62
63    The OUTPUT3 attribute is like OUTPUT, but when sent through a
64    validating parser the data reported must have the "Third Canonical
65    Form" as found in the specified output file.  (This is Second
66    Canonical form, with declarations of unparsed ENTITY values and
67    with all ignorable whitespace removed.)
68
69    The canonical forms are changed slightly for output files corresponding
70    to XML 1.1 input files.  They start with an XML declaration specifying the
71    version number, and use character references for all C0 and C1 controls.
72    The grammars are changed as follows:
73
74
75    CanonXML    ::= '<?xml version="1.1">' Pi* element Pi*
76    CanonXML2   ::= '<?xml version="1.1">' DTD2? Pi* element Pi*
77    CanonXML3   ::= '<?xml version="1.1">' DTD3? Pi* element Pi*
78    C0          ::= (Unicode characters #x1-#x1F)
79    C1          ::= (Unicode characters #x7F-#x9F)
80    EscapedC0   ::= (Decimal references to C0 characters, &#1; - &#31;)
81    EscapedC1   ::= (Decimal references to C1 characters, &#127; - &#159;)
82    Datachar    ::= '&amp;' | '&lt;' | '&gt;' | '&quot;'
83                  | EscapedC0 | EscapedC1
84                  | (Char - ('&' | '<' | '>' | '"' | C0 | C1))
85
86
87    where Char is the XML 1.1 rather than 1.0 production of that name.
88 
89
90    Tests apply to one or more particular SECTIONS.
91
92    Each test has a TYPE:
93    * All parsers must accept "valid" testcases.
94    * Nonvalidating parsers must also accept "invalid" testcases,
95      but validating ones must reject them.
96    * No parser should accept a "not-wf" testcase unless it's a
97      nonvalidating parser and the test contains external entities
98      that the parser doesn't read.
99    * Parsers are not required to report "errors".
100
101    Each test is in a particular XML document, with a URI.  If these
102    tests are accessed over a network, the path will be relative to
103    the base URI of the document holding the testcase.
104
105    Tests which apply only to certain versions of XML list those versions
106    in the VERSION attribute.  An absent VERSION implies that the test
107    applies to all versions.  Parsers should not run tests for versions
108    they do not support.
109
110    Tests which apply only to certain editions of XML list those editions
111    in the EDITION attribute.  An absent EDITION implies that the test
112    applies to all editions.  Parsers should not run tests for editions
113    they do not support.  VERSION should have a single value if
114    EDITION has a value.
115
116    Parsers should enable namespace processing except for tests marked
117    with NAMESPACES="no".  These are tests that use colons in ways
118    inconsistent with the Namespaces spec.
119-->
120
121<!ELEMENT TEST (#PCDATA | EM | B)*>
122
123
124<!ATTLIST TEST
125    ENTITIES            (both|none|parameter|general)   "none"
126    ID                  ID                              #REQUIRED
127    OUTPUT              CDATA                           #IMPLIED
128    OUTPUT3             CDATA                           #IMPLIED
129    SECTIONS            CDATA                           #REQUIRED
130    RECOMMENDATION      (XML1.0|XML1.1|NS1.0|NS1.1|
131                         XML1.0-errata2e|XML1.0-errata3e|XML1.0-errata4e|
132                         NS1.0-errata1e)        "XML1.0"
133    TYPE                (valid|invalid|not-wf|error)    #REQUIRED
134    VERSION             NMTOKENS                        #IMPLIED
135    EDITION             NMTOKENS                        #IMPLIED
136    URI                 CDATA                           #REQUIRED
137    NAMESPACE           (yes|no)                        "yes"
138    >
139
140<!--
141    Really basic HTML font tweaks, to support highlighting
142    some aspects of test descriptions ...
143    EM == emphasis (e.g. italics, fun colors)
144    B == bold
145-->
146<!ELEMENT EM (#PCDATA | B)*>
147<!ELEMENT B (#PCDATA | EM)*>
Note: See TracBrowser for help on using the repository browser.