2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
7
<<<<<<< conformance.xsl
8
Original version copyright 1999 by Sun Microsystems, Inc.
10
Modifications copyright 1999 by OASIS.
11
Modifications copyright 2001 by OASIS.
12
Modifications copyright 2002 by W3C.
14
XSL Stylesheet for documenting XML conformance tests.
15
Tested against LOTUS Xalan processor.
18
XSL 2001-03-15 Stylesheet for documenting XML conformance tests.
20
This expects to be run on a document matching the DTD that Sun
21
defined for merging collections of self-descriptive XML tests.
23
Since all those collections will have (by design) the same test
24
architecture, this includes boilerplate describing that design,
25
to be used by all test documentation.
28
- Sorting is a bit odd; section numbers can are like "3.3.3"
29
rather than straight numbers, so numeric sort can't work,
30
and yet neither does text sort (2.12 should be after 2.2).
34
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
35
<xsl:output method="html" indent="yes"/>
37
<!-- ROOT: write an HTML wrapper -->
38
<xsl:template match="/TESTSUITE">
39
<!-- XHTML namespace -->
41
<html xmlns="http://www.w3.org/1999/xhtml"><head>
42
<title> XML Conformance Tests </title>
43
<meta http-equiv="Content-Type"
44
content="text/html;charset=utf-8"/>
45
<style type="text/css">
47
tr.premiere { background-color: #BEDCE6; }
49
th { text-align: left; vertical-align: top }
51
.editor { color: red; }
53
.countdown { color: white; background-color: red; }
55
blockquote, q { font-family: Arial, Helvetica, sans-serif; }
57
.quote { font-family: Arial, Helvetica, sans-serif; }
59
pre.quote { margin-left: 2.5em; }
61
ol.quote { font-family: Arial, Helvetica, sans-serif; margin-left: 3em; }
63
.diff-add { background-color: yellow; }
65
.diff-chg { background-color: lime; }
67
.diff-del { text-decoration: line-through; }
71
</head><body bgcolor='#ffffff'>
72
<p><a href="http://www.w3.org/"><img src="http://xw2k.sdct.itl.nist.gov/martinez/xmlts/2001/XML-Test-Suite/xmlconf/files/w3c_home.gif"
74
alt="W3C" height="48" width="72" border="0"/></a><a href="http://www.w3.org/Architecture/"
76
rel="in-domain"><img src="http://xw2k.sdct.itl.nist.gov/martinez/xmlts/2001/XML-Test-Suite/xmlconf/files/arquitecture.bmp" alt="Architecture Domain" border="0"/></a> <a
78
href="../" rel="in-area"> XML</a> | <a href="/Member/#confidential">Member-Confidential!</a></p>
80
<h1 align="center">XML 1.0 (Second Edition) errata 20020320,</h1>
81
<h1 align="center">W3C Conformance Test Suite 20020606</h1> <dl>
84
<dt><b>This version:</b></dt>
86
<li><p><a href="xmlconf-20020606.htm">
87
http://www.w3.org/XML/Test/xmlconf-20020606.htm</a>
88
(<a href="xmlconf-20020606.xml">XML</a>)</p>
93
<dt><b>Current Version:</b></dt>
96
<li><p><a href="xmlconf-20020606.xml">
97
http://www.w3.org/XML/Test/xmlconf-20020606.xml</a></p></li>
101
<dt><b>Previous Version:</b></dt>
104
<li><p><a href="http://www.oasis-open.org/committees/xml-conformance/suite-v1se/xmlconf-20010315.htm">
105
http://www.oasis-open.org/committees/xml-conformance/suite-v1se/xmlconf-20010315.htm</a>
106
(<a href="http://www.oasis-open.org/committees/xml-conformance/suite-v1se/xmlconf-20010315.xml">XML</a>)</p></li>
110
<dt><b>Test Archive:</b></dt>
112
<li><p><a href="xmlts20020606.zip">http://www.w3.org/XML/Test/xmlts20020606.zip</a>
114
<li><p><a href="xmlts20020606.tar">http://www.w3.org/XML/Test/xmlts20020606.tar</a>
118
<dt><b>W3C XML Core Working Group:</b></dt>
119
<dd><ul><li><p><a href="http://www.w3.org/XML/Group/Core">http://www.w3.org/XML/Group/Core</a>
122
<dt><b>Comments:</b></dt>
123
<dd><ul><li>Sandra I. Martinez, NIST <a href="mailto:public-xml-testsuite@w3.org"> public-xml-testsuite@w3.org</a>
129
<h2>Table of Contents</h2>
131
<li><a href="#intro">Introduction</a></li>
132
<li><a href="#matrix">Test Matrix</a></li>
134
<li ><a href="#binary">Binary Tests</a></li>
135
<li><a href="#output">Output Tests</a></li>
137
<li><a href="#listings">Test Case Descriptions</a></li>
139
<li><a href="#valid">Valid Documents</a></li>
140
<li><a href="#invalid">Invalid Documents</a></li>
141
<li><a href="#not-wf">Not-WF Documents</a></li>
142
<li><a href="#error">Optional Errors</a></li>
144
<li><a href="#contrib">Contributors</a></li>
147
<h2>1. Introduction </h2>
149
The tests described in this document provide an initial set of metrics to determine how well a
150
particular implementation conforms to the
151
<a href="http://www.w3.org/TR/REC-xml">W3C XML 1.0 (Second Edition) Recommendation</a>.
152
The XML Conformance Test Suite is intended
153
to complement the W3C XML 1.0 (Second Edition) Recommendation. All interpretations
154
of this Recommendation are subject to confirmation by the
155
<a href="http://www.w3.org/XML/">
159
Conformance tests can be used by developers, content creators, and
160
users alike to increase their level of confidence in product quality. In
161
circumstances where interoperability is necessary, these tests can also
162
be used to determine that differing implementations support the same set
165
<p>The XML Test Suite was transferred from OASIS to W3C and is being augmented to reflect the
166
current work of the W3C XML Core Working Group, including
167
<a href="http://www.w3.org/XML/Group/2002/02/xml10-test-suite-issues">resolved issues</a> related to the
168
Recommendation and published Errata. This report provides supporting documentation for all the tests included in
169
the test suite. Sources from which these tests have been collected
171
<xsl:for-each select="TESTCASES">
172
<xsl:value-of select="@PROFILE"/>
173
<xsl:text>; </xsl:text>
178
<h2>2. Test Matrix </h2>
180
<p> Two basic types of test are presented here. These are
181
respectively <em><a href="#binary">Binary Tests</a></em>
182
and <em><a href="#output">Output Tests</a></em>. </p>
185
<h3>2.1 Binary Tests </h3>
187
<p> <em>Binary</em> conformance tests are documents which
188
are grouped into one of four categories. Given a document
189
in a given category, each kind of XML parser must treat it
190
consistently and either accept it (a <em>positive test</em>)
191
or reject it (a <em>negative test</em>). It is in that sense
192
that the tests are termed "binary". The XML 1.0 (Second Edition) Recommendation
193
talks in terms of two types of XML processor:
194
<em>validating</em> ones, and <em>nonvalidating</em> ones.
195
There are two differences between these types of processors: </p>
198
<li> Validating processors check special productions that
199
nonvalidating parsers don't, called <em>validity
200
constraints</em>. (Both must check a basic set of productions,
201
requiring XML documents to be <em>well formed</em>.) </li>
203
<li> Nonvalidating processors are permitted to not
204
include <em>external entities</em>, such as files with
205
text. Accordingly, they may not report errors which
206
would have been detected had those entities been read.</li>
209
<p> There are two types of such entity, <em>parameter
210
entities</em> holding definitions which affect validation
211
and other processing; and <em>general entities</em> which
212
hold marked up text. It will be appreciated that there are
213
then five kinds of XML processor: validating processors,
214
and four kinds of nonvalidating processor based on the
215
combinations of external entity which they include.</p>
218
<table border="1" bgcolor="#ffffff" cellpadding="4">
221
<b>Basic XML Parsing Test Matrix</b><br/>
222
Test Document Type v. Parser Type
225
<tr bgcolor="#ffffcc">
226
<th widthH="5%" rowspan="2"><xsl:text> </xsl:text></th>
227
<th widthH="20%" colspan="2">Nonvalidating</th>
228
<th widthH="5%" rowspan="2">Validating</th>
231
<tr bgcolor="#ffffcc">
232
<th>External Entities<br/>Ignored (3 cases)</th>
233
<th>External Entities<br/>Read</th>
237
<th bgcolor="#ffffcc">Valid Documents</th>
238
<td align="center"><b>accept</b></td>
239
<td align="center"><b>accept</b></td>
240
<td align="center"><b>accept</b></td>
244
<th bgcolor="#ffffcc">Invalid Documents</th>
245
<td align="center"><b>accept</b></td>
246
<td align="center"><b>accept</b></td>
247
<td align="center">reject</td>
251
<th bgcolor="#ffffcc">Non-WF Documents</th>
252
<td align="center">reject</td>
253
<td align="center">reject</td>
254
<td align="center">reject</td>
258
<th bgcolor="#ffffcc">WF Errors tied<br/>
259
to External Entity</th>
260
<td align="center"><b>accept</b><br/>(varies)</td>
261
<td align="center">reject</td>
262
<td align="center">reject</td>
266
<th bgcolor="#ffffcc">Documents with<br/> Optional Errors</th>
267
<td align="center">(not specified)</td>
268
<td align="center">(not specified)</td>
269
<td align="center">(not specified)</td>
275
<p> At this time, the XML community primarily uses parsers
276
which are in the rightmost two columns of this table, calling
277
them <em>Well Formed XML Parsers</em> (or "WF Parsers") and
278
<em>Validating XML Parsers</em>. A second test matrix
279
could be defined to address the variations in the types of
280
of XML processor which do not read all external entities.
281
That additional matrix is not provided here at this time. </p>
285
<h3>2.2 Output Tests</h3>
287
<p> The XML 1.0 (Second Edition) Recommendation places a number of requirements
288
on XML processors, to ensure that they report information to
289
applications as needed. Such requirements are testable.
290
Validating processors are required to report slightly more
291
information than nonvalidating ones, so some tests will
292
require separate output files. Some of the information that
293
must be reported will not be reportable without reading all
294
the external entities in a particular test. Many of the tests for
295
valid documents are paired with an output file as the canonical
296
representation of the input file, to ensure that the XML
297
processor provides the correct information. </p>
300
<h2>3. Test Case Descriptions</h2>
302
<p> This section of this report contains descriptions of test
303
cases, each of which fits into the categories noted above.
304
Each test case includes a document of one of the types in the
305
binary test matrix above (e.g. valid or invalid documents).
308
<p> In some cases, an <a href="#output">output file </a>, as
309
described in Section 2.2, will also be associated with
310
a valid document, which is used for output testing. If such
311
a file exists, it will be noted at the end of the description
312
of the input document. </p>
314
<p> The description for each test case is presented as a two
315
part table. The right part describes what the test does.
316
This description is intended to have enough detail to evaluate
317
diagnostic messages. The left part includes: <ul>
319
<li> An entry describing the <em>Sections and/or Rules</em>
320
from the <a href="http://www.w3.org/TR/2000/REC-xml-20001006">
321
XML 1.0 (Second Edition) Recommendation</a> which this case excercises.</li>
323
<li> The unique <em>Test ID</em> within a given <em>Collection</em>
326
<li> The <em>Collection</em> from which this test originated.
327
Given the <em>Test ID</em> and the <em>Collection</em>, each
328
test can be uniquely identified.</li>
330
<li> Some tests may have a field identifying the kinds of
331
external <em>Entities</em> a nonvalidating processor must
332
include (parameter, general, or both) to be able to
333
detect any errors in that test case. </li>
338
<h3>3.1 Valid XML Documents</h3>
340
<p> All conforming <em> XML 1.0 Processors </em> are
341
<b>required</b> to accept valid documents, reporting no
342
errors. In this section of this test report are found
343
descriptions of test cases which fit into this category. </p>
345
<xsl:apply-templates select="//TEST[@TYPE='valid']">
346
<xsl:sort select="@SECTIONS"/>
347
</xsl:apply-templates>
350
<h3>3.2 Invalid XML Documents</h3>
352
<p> All conforming XML 1.0 <em> Validating Processors </em>
353
are <b>required</b> to report recoverable errors in the case
354
of documents which are <em>Invalid</em>. Such errors are
355
violations of some <em>validity constraint (VC)</em>. </p>
357
<p> If a validating processor does not report an error when
358
given one of these test cases, or if the error reported is
359
a fatal error, it is not conformant. If the error reported
360
does not correspond to the problem listed in this test
361
description, that could also be a conformance problem; it
362
might instead be a faulty diagnostic. </p>
364
<p> All conforming XML 1.0 <em> Nonvalidating Processors </em>
365
should accept these documents, reporting no errors. </p>
367
<xsl:apply-templates select="//TEST[@TYPE='invalid']">
368
<xsl:sort select="@SECTIONS"/>
369
</xsl:apply-templates>
372
<h3>3.3 Documents that are Not Well Formed</h3>
374
<p> All conforming XML 1.0 Processors are <b>required</b> to
375
report fatal errors in the case of documents which are not
376
<em>Well Formed</em>. Such errors are basically of two types:
377
<em>(a)</em> the document violates the XML grammar; or else
378
<em>(b)</em> it violates a <em>well formedness constraint
379
(WFC)</em>. There is a single <em>exception to that
380
requirement</em>: nonvalidating processors which do not read
381
certain types of external entities are not required to detect
382
(and hence report) these errors. </p>
384
<p> If a processor does not report a fatal error when given
385
one of these test cases, it is not conformant. If the error
386
reported does not correspond to the problem listed in this
387
test description, that could also be a conformance problem;
388
it might instead be a faulty diagnostic. </p>
390
<xsl:apply-templates select="//TEST[@TYPE='not-wf']">
391
<xsl:sort select="@SECTIONS"/>
392
</xsl:apply-templates>
395
<h3>3.4 XML Documents with Optional Errors</h3>
397
<p> Conforming XML 1.0 Processors are permitted to ignore
398
certain errors, or to report them at user option. In this
399
section of this test report are found descriptions of
400
test cases which fit into this category. </p>
402
<p> Processor behavior on such test cases does not affect
403
conformance to the XML 1.0 (Second Edition) Recommendation, except as noted. </p>
405
<xsl:apply-templates select="//TEST[@TYPE='error']">
406
<xsl:sort select="@SECTIONS"/>
407
</xsl:apply-templates>
410
<h3>4. Contributors (Non-normative)</h3>
412
<p> A team of volunteer members have participated in the
413
development of this work. Contributions have come from:
416
<li>Murry Altheim, Sun Microsystems</li>
417
<li>Mary Brady, NIST</li>
418
<li>Tim Boland, NIST</li>
419
<li>David Brownell, Sun Microsystems</li>
421
<li>Karin Donker, IBM</li>
422
<li>Irina Golfman, Inera Incorporated</li>
423
<li>Tony Graham, Mulberry Technologies</li>
424
<li>G. Ken Holman, Crane Softwrights Ltd</li>
425
<li>Alex Milowski, Veo Systems, Inc</li>
426
<li>Makota Murata, Fuji Xerox</li>
427
<li>Miles O'Reilly, Microstar Software, Ltd</li>
428
<li>Matt Timmermans, Microstar Software, Ltd</li>
429
<li>Richard Rivello, NIST</li>
430
<li>Lynne Rosenthal, NIST</li>
431
<li>Brian Schellar, Chrystal Software</li>
432
<li>Bill Smith, Sun Microsystems</li>
433
<li>Trevor Veary, Software AG</li>
434
<li>Richard Tobin, University of Edinburgh</li>
435
<li>Jonathan Marsh, Microsoft </li>
436
<li>Daniel Veillard, Imaq</li>
437
<li>Jonathan Marsh, Microsoft</li>
438
<li>Paul Grosso, Arbortext</li>
446
<xsl:template match="TEST">
449
<td width='40%'><table bgcolor='#eeeeff'
450
border='1' width='100%' height="100%">
452
<td width='50%'><b>Sections [Rules]:</b></td>
453
<td bgcolor='#ffffcc'>
454
<xsl:value-of select="@SECTIONS"/></td>
457
<td width='50%'><b>Test ID:</b></td>
458
<td bgcolor='#ffffcc'>
459
<xsl:value-of select="@ID"/></td>
461
<xsl:if test="not ( @ENTITIES = 'none')
462
and ( @TYPE = 'not-wf' )">
464
<td width='50%'><b>Entities:</b></td>
465
<td bgcolor='#ffffcc'><font color='blue'>
466
<xsl:value-of select="@ENTITIES"/>
470
<xsl:if test="../@PROFILE">
472
<td width='50%'><b>Collection:</b></td>
473
<td bgcolor='#ffffcc'>
474
<xsl:value-of select="../@PROFILE"/>
479
<td bgcolor='#ccffff'>
481
<xsl:apply-templates/></p>
482
<xsl:if test="@OUTPUT | @OUTPUT3">
483
<p>There is an output test associated with this
491
<!-- XT takes 'B|EM' and xsl:copy, IE5b2 doesn't -->
492
<xsl:template match="EM">
493
<em><xsl:apply-templates/></em>
495
<xsl:template match="B">
496
<b><xsl:apply-templates/></b>