template.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. <!DOCTYPE html PUBLIC
  2. "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "doc/xhtml1-transitional.dtd">
  4. <!--
  5. #
  6. # $Id: template.xml,v 1.3 2000/07/15 19:12:14 dbrownell Exp $
  7. #
  8. # Copyright (c) 1999-2000 by David Brownell. All Rights Reserved.
  9. #
  10. # This program is free software; you may use, copy, modify, and
  11. # redistribute it under the terms of the LICENSE with which it was
  12. # originally distributed.
  13. #
  14. # This program is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. # LICENSE for more details.
  18. #
  19. -->
  20. <!--
  21. This document is a template for the output of a test report.
  22. It uses processing instructions to flag where the certain
  23. types of test reporting data should be placed. That's in
  24. roughly three categories:
  25. - Report identification ... identifying the XML processor,
  26. when the test was run, and so on. These are integrated
  27. using processing instructions
  28. <?run-id VALUE?>
  29. where VALUE is "name", "date", "type", "general-entities",
  30. "parameter-entities", and some other values.
  31. - Tests which always mean the same thing ... for example,
  32. all processors must accept all valid documents, reject
  33. everything that isn't well-formed, and may handle "optional"
  34. errors in a variety of manners.
  35. <?table valid?> or <?table not-wf?> etc
  36. The "table" PI causes a set of table rows to be emitted.
  37. - The "invalid" test cases are interpreted differently
  38. depending on whether the processor validates or not;
  39. this requires a conditional feature, and also calls for
  40. the table to be generated differently.
  41. <?if validating?> or <?if nonvalidating?>
  42. <?table invalid positive?>
  43. <?table invalid negative?>
  44. <?endif?>
  45. As a positive test, results without a diagnostic are not
  46. printed; as a negative test, they are printed (so diagnostics
  47. can be analyzed).
  48. NOTE: if/endif do not nest!! They must have the same
  49. parent node !!
  50. The intent of the template is to let the boilerplate change
  51. more readily, including organization of the report. Some
  52. parts of the report are not readily changed; these include
  53. some table style features that don't appear to be controllable
  54. through the style sheet, column ordering, and labels for the
  55. diagnostics which are constructed by the test harness.
  56. Also, do try to make sure that this template remains valid
  57. to the "transitional" level of XHTML. The use of "bgcolor"
  58. attributes and "center" tags are the main reasons this isn't
  59. "strict" (HTML 4.0). Perhaps one could trust CSS that far,
  60. but not all browsers handle CSS, even that well.
  61. -->
  62. <html xmlns="http://www.w3.org/1999/xhtml"><head>
  63. <title><?run-id name?> XML <?run-id type?> Processor</title>
  64. <meta http-equiv="Content-Type" content="text/html; CHARSET=utf-8"/>
  65. </head><body bgcolor="#eeeeff">
  66. <h1>XML Processor Conformance Report:<br/>
  67. <em><?run-id name?></em></h1>
  68. <p> This document is the output of an
  69. <a href="http://xmlconf.sourceforge.net/">XML test harness</a>.
  70. It reports on the conformance of the following
  71. XML 1.0 processor configuration: </p>
  72. <center><table bgcolor="#ffffff" cellpadding="4" border="1">
  73. <tr>
  74. <td bgcolor="#ffffcc">XML Processor</td>
  75. <td><?run-id description?></td>
  76. </tr>
  77. <tr>
  78. <td bgcolor="#ffffcc">Parser Class</td>
  79. <td><?run-id name?></td>
  80. </tr>
  81. <tr>
  82. <td bgcolor="#ffffcc">Processing Mode</td>
  83. <td><?run-id type?></td>
  84. </tr>
  85. <tr>
  86. <td bgcolor="#ffffcc">General Entities</td>
  87. <td><?run-id general-entities?></td>
  88. </tr>
  89. <tr>
  90. <td bgcolor="#ffffcc">Parameter Entities</td>
  91. <td><?run-id parameter-entities?></td>
  92. </tr>
  93. </table></center>
  94. <p> The results were as reported through the parser's API to
  95. this particular test harness and execution environment: </p>
  96. <center><table bgcolor="#ffffff" cellpadding="4" border="1">
  97. <tr>
  98. <td bgcolor="#ffffcc">Test Run Date</td>
  99. <td><?run-id date?></td>
  100. </tr>
  101. <tr>
  102. <td bgcolor="#ffffcc">Harness and Version</td>
  103. <td><?run-id harness?><br/><?run-id version?></td>
  104. </tr>
  105. <tr>
  106. <td bgcolor="#ffffcc">Runtime Environment</td>
  107. <td><?run-id java?></td>
  108. </tr>
  109. <tr>
  110. <td bgcolor="#ffffcc">Host OS Info</td>
  111. <td><?run-id os?></td>
  112. </tr>
  113. <tr>
  114. <td bgcolor="#ffffcc">Suite of Testcases</td>
  115. <td><?run-id testsuite?></td>
  116. </tr>
  117. </table></center>
  118. <p> An summary of test results follows. To know the actual test status,
  119. <b>someone must examine the result of each passed negative test</b>
  120. (and informative test) to make sure it failed for the right reason.
  121. That examination may cause the counts of failed tests to increase
  122. (and passed tests to decrease), changing a provisional "conforms" status
  123. to a "does not conform". </p>
  124. <center><table bgcolor="#ffffff" cellpadding="4" border="1">
  125. <tr>
  126. <td bgcolor="#ffffcc">Status</td>
  127. <td><?run-id status?></td>
  128. </tr>
  129. <tr>
  130. <td bgcolor="#ffffcc">Total Passed Tests (provisional)</td>
  131. <td><?run-id passed?></td>
  132. </tr>
  133. <tr>
  134. <td bgcolor="#ffffcc">Passed Negative Tests (provisional)</td>
  135. <td><?run-id passed-negative?></td>
  136. </tr>
  137. <tr>
  138. <td bgcolor="#ffffcc">Failed Tests (provisional)</td>
  139. <td><?run-id failed?></td>
  140. </tr>
  141. <tr>
  142. <td bgcolor="#ffffcc">Tests Skipped</td>
  143. <td><?run-id skipped?></td>
  144. </tr>
  145. </table></center>
  146. <p> Sections of this report are:
  147. <a href="#explanation">Explanation of Tables</a>;
  148. <a href="#positive">Positive Tests</a>, cases where this processor should
  149. report no errors;
  150. <a href="#negative">Negative Tests</a>, documents for which this processor
  151. must report the known errors; and
  152. <a href="#optional">Informative Tests</a>, documents with errors which
  153. processors are not required to report. </p>
  154. <p> <em> <b>NOTE:</b> The OASIS/NIST test suite is currently in draft state,
  155. and can't actually be used without modifications to the configuration file,
  156. which is used both to generate the test documentation published at the
  157. OASIS/NIST site and to operate this test harness. In some cases, test
  158. cases may need to be reclassified; this would affect results attributed
  159. to parsers. Accordingly, treat these results as preliminary.</em></p>
  160. <hr/><h2><a name="explanation">
  161. Explanation of Tables
  162. </a></h2>
  163. <p>Sections presenting test results are composed largely of tables, with
  164. explanations focussing on exactly what those tables indicate. Diagnostics
  165. for failed tests are presented in italics, with a cherry colored background,
  166. to highlight the result. Diagnostics for succesful tests should as a rule
  167. only exist for negative tests. Initial parenthesized comments typically
  168. come from the test harness. </p>
  169. <p> Some such comments indicate the reporting category defined in the XML
  170. specification. Some low-fidelity processor APIs don't expose recoverable
  171. errors, which can make validation work awkward.</p>
  172. <dl>
  173. <dt><b>(fatal)</b></dt>
  174. <dd>The diagnostic was reported as a fatal error. Such errors are
  175. primarily well-formedness errors, such as the violation of XML 1.0
  176. syntax rules or of well formedness constraints.
  177. <em>In some underfeatured parser APIs, this may be the
  178. only kind of error that gets reported.</em>
  179. </dd>
  180. <dt><b>(error)</b></dt>
  181. <dd>The diagnostic was reported as a recoverable error. Such
  182. errors primarily used to report validation errors, which are all
  183. violations of validity constraints, but some other errors are also
  184. classed as nonfatal.</dd>
  185. <dt><b>(warning)</b></dt>
  186. <dd>The diagnostic was reported as a warning; warnings are purely
  187. informative and may be emitted in a number of cases identified by
  188. the XML 1.0 specification (as well as in other cases).</dd>
  189. </dl>
  190. <p> Other such comments may indicate other categories of conformance issue.
  191. For example, some errors relate to problematic implementation of SAX;
  192. and in exceptional cases, the harness can be forced to report a failure
  193. on some test. </p>
  194. <dl>
  195. <dt><b>(thrown <em>classname</em>) ... abnormal</b></dt>
  196. <dd>The named exception was directly thrown. <em>If the exception
  197. is a SAXException (or a subclass thereof) this suggests an error in
  198. the parser</em> (violating the SAX API specification) since it should
  199. normally have used the SAX ErrorHandler instead.</dd>
  200. <dt><b>(odd <em>classname</em>) ... abnormal</b></dt>
  201. <dd> After the identified exception was reported through the
  202. ErrorHandler, an exception of the named class was thrown directly.
  203. <em>This suggests an error in the parser</em>, since the parser
  204. either failed to continue after an error (or warning) which is
  205. required to be continuable, or else it did not pass the exception
  206. thrown by the application back to the application. </dd>
  207. <dt><b>(EXCEPTION - DIRECTED FAILURE) ... abnormal</b></dt>
  208. <dd> This test case was explicitly failed by the test operator;
  209. the test was not run. This may be done in the case of parsers with
  210. severe bugs which completely prevented handling the test case,
  211. typically because the parser seems to "hang" by entering an
  212. infinite loop.</dd>
  213. </dl>
  214. <p> In all cases, negative tests that appear to pass (diagnostics presented
  215. with a white background) must be individually examined in the report below.
  216. The diagnostic provided by the processor must correspond to the description
  217. of the test provided; if the processor does not report the matching error,
  218. the seeming "pass" is in fact an error of a type the test harness could
  219. not detect or report. That error is either a conformance bug, or an error
  220. in the diagnostic being produced; or, rarely, both.</p>
  221. <?if nonvalidating?>
  222. <p> Nonvalidating processors may skip some tests if the tests require
  223. processing a class of external entities (general, parameter, or both)
  224. which that processor is known not to handle. If processor handling of
  225. entities is not known, all such tests are skipped, in order to prevent
  226. misreporting. </p>
  227. <?endif?>
  228. <hr/><h2><a name="positive">
  229. Positive Tests
  230. </a> </h2>
  231. <p> All conformant XML 1.0 processors must accept "valid" input documents
  232. without reporting any errors, and moreover must report the correct output
  233. data to the application when processing those documents. Nonvalidating
  234. processors
  235. <?if nonvalidating?>
  236. <em>(such as this one)</em>
  237. <?endif?>
  238. must also accept "invalid" input documents without reporting any errors.
  239. These are called "Positive Tests" because they ensure that the processor
  240. just "does the right thing" without reporting any problems. </p>
  241. <p> In the interest of brevity, the only tests listed here are those which
  242. produce diagnostics of some kind, such as test failures. In some cases,
  243. warnings may be reported when processing these documents, but these do not
  244. indicate failures.</p>
  245. <p> No interpretation of these results is necessary; every "error" or
  246. "fatal" message presented here is an XML conformance failure. Maintainers
  247. of an XML processor will generally want to fix their software so that it
  248. conforms fully to the XML specification. </p>
  249. <h3> Valid Documents </h3>
  250. <p> All XML processors must accept all valid documents. This group
  251. of tests must accordingly produce no test failures. </p>
  252. <table id="valid" width="100%" bgcolor="#ffffff" cellpadding="4" border="1">
  253. <tr>
  254. <td bgcolor="#ffffcc">Section and [Rules]</td>
  255. <td bgcolor="#ffffcc">Test ID</td>
  256. <td bgcolor="#ffffcc">Description</td>
  257. <td bgcolor="#ffffcc">Diagnostic</td>
  258. </tr>
  259. <?table valid?>
  260. </table>
  261. <h3> Output Tests </h3>
  262. <p> The XML specification places requirements on the data which is reported
  263. by XML processors to applications.
  264. <!-- XXX address infoset implications for XML conformance ... -->
  265. This data flows through the processor API ... or it is not available,
  266. so the processor is in those respects nonconformant.
  267. For example, SAX1 did not report external entities which were not
  268. included; but SAX2 does.
  269. These output tests verify conformance with the specification by
  270. recording that data and comparing it with what is required for conformance
  271. with the XML 1.0 specification. </p>
  272. <p> At this writing, the OASIS output tests have several categories of
  273. known omissions (or weak output test coverage). These include: </p> <ul>
  274. <li>No output tests address the additional requirements which validating
  275. processors must satisfy. That is, reporting which whitespace is ignorable,
  276. and reporting declarations of unparsed entities. </li>
  277. <li>Only a few output tests have been provided which address the
  278. requirement to report NOTATION declarations, and some of those
  279. appear to be missing. </li>
  280. <li>No tests address the requirement to report external entities
  281. which were not included.</li>
  282. </ul>
  283. <p> Note that output tests automatically fail in cases where the processor
  284. failed to parse the (valid) input document used to generate the
  285. output data.</p>
  286. <p>In some test harnessses, the output tests are unreliable because
  287. they can't directly compare the parser output against reference data.
  288. Such issues should be noted in the documentation for that harness. </p>
  289. <p> Also, and not a bug, in some cases these diagnostics may seem like
  290. they say two equivalent results are not equal. The issue is that some
  291. differences, often those in reported whitespace, aren't easily visible
  292. in this report. HTML hides many such differences (because it normalizes
  293. whitespace before displaying it), and the method used to display the
  294. differing results may also mask some issues. </p>
  295. <table id="valid-output" width="100%" bgcolor="#ffffff" cellpadding="4" border="1">
  296. <tr>
  297. <td bgcolor="#ffffcc">Test ID</td>
  298. <td bgcolor="#ffffcc">Diagnostic</td>
  299. </tr>
  300. <?table valid output?>
  301. </table>
  302. <?if nonvalidating?>
  303. <h3> Invalid Documents </h3>
  304. <p> As noted above, nonvalidating processors must accept all documents
  305. which are well formed, but invalid. This same behavior would be delivered
  306. by a validating processor, if the application chose to continue processing
  307. after receiving each report of a validity error, and not report such
  308. validity errors. (These tests are run as "negative" tests for validating
  309. processors, since in those cases it is important that the correct validity
  310. errors be reported and that they be reported at the correct level.) </p>
  311. <table id="invalid-positive" width="100%" bgcolor="#ffffff" cellpadding="4" border="1">
  312. <tr>
  313. <td bgcolor="#ffffcc">Section and [Rules]</td>
  314. <td bgcolor="#ffffcc">Test ID</td>
  315. <td bgcolor="#ffffcc">Description</td>
  316. <td bgcolor="#ffffcc">Diagnostic</td>
  317. </tr>
  318. <?table invalid positive?>
  319. </table>
  320. <?endif?>
  321. <h2><a name="negative">
  322. Negative Tests
  323. </a></h2>
  324. <p> All conformant XML 1.0 processors must reject documents which are not
  325. well-formed. In addition, validating processors
  326. <?if validating?>
  327. <em>(such as this one)</em>
  328. <?endif?>
  329. must report the validity errors for invalid documents.
  330. These are called <em>Negative Tests</em> because the test is intended
  331. to establish that errors are reported when they should be.
  332. </p>
  333. <p> Moreover, the processor must both fail for the appropriate reason (given
  334. by the parser diagnostic) and must report an error at the right level ("error"
  335. or "fatal"). If both criteria were not considered, a processor which failed
  336. frequently (such as by failing to parse any document at all) would appear to
  337. pass a large number of conformance tests Unfortunately, the test driver can
  338. only tell whether the error was reported at the right level. It can't
  339. determine whether the processor failed for the right reason. </p>
  340. <p> That's where a person to interpret these test results is critical. Such
  341. a person analyses the diagnostics, reported here, for negative tests not
  342. already known to be failures (for not reporting an error, or reporting one
  343. at the wrong level). If the diagnostic reported for such tests doesn't match
  344. the failure from the test description, there is an error in the diagnostic or
  345. in the processor's XML conformance (or sometimes in both). </p>
  346. <p> For this processor, <b><?run-id passed-negative?> diagnostics must be
  347. examined</b> to get an accurate evaluation of its negative test status.</p>
  348. <?if validating?>
  349. <h3> Invalid Documents </h3>
  350. <p> Validating processors must correctly report "error" diagnostics
  351. for all documents which are well formed but invalid. Such errors must
  352. also be, "at user option", recoverable so that the validating parser
  353. may be used in a nonvalidating mode by ignoring all validity errors.
  354. <em>Some parser APIs do not support recoverability.</em>
  355. Such issues should be noted in the documentation for the API, and
  356. for its test harness.
  357. </p>
  358. <table id="invalid-negative" width="100%" bgcolor="#ffffff" cellpadding="4" border="1">
  359. <tr>
  360. <td bgcolor="#ffffcc">Section and [Rules]</td>
  361. <td bgcolor="#ffffcc">Test ID</td>
  362. <td bgcolor="#ffffcc">Description</td>
  363. <td bgcolor="#ffffcc">Diagnostic</td>
  364. </tr>
  365. <?table invalid negative?>
  366. </table>
  367. <?endif?>
  368. <h3> Documents which are not Well-Formed </h3>
  369. <p> All XML processors must correctly reject (with a "fatal"
  370. error) all XML documents which are not well-formed.
  371. <?if nonvalidating?>
  372. (Nonvalidating processors may skip some of these tests, if
  373. they require handling of a type of external entity which the
  374. processor ignores. Such skipped tests are not reported.)
  375. <?endif?>
  376. </p>
  377. <table id="not-wf" width="100%" bgcolor="#ffffff" cellpadding="4" border="1">
  378. <tr>
  379. <td bgcolor="#ffffcc">Section and [Rules]</td>
  380. <td bgcolor="#ffffcc">Test ID</td>
  381. <td bgcolor="#ffffcc">Description</td>
  382. <td bgcolor="#ffffcc">Diagnostic</td>
  383. </tr>
  384. <?table not-wf?>
  385. </table>
  386. <h2><a name="optional">
  387. Informative Tests
  388. </a></h2>
  389. <p> Certain XML documents are specified to be errors, but the handling
  390. of those documents is not fully determined by the XML 1.0 specification.
  391. As a rule, these errors may be reported in any manner whatsoever, or
  392. completely ignored, without consequence in terms of conformance to the
  393. XML 1.0 specification. And some of these documents don't have errors;
  394. documents in encodings other than UTF-8 and UTF-16 are legal, but not
  395. all processors are required to parse them. </p>
  396. <p>Such "optional" errors are listed here for informational purposes, since
  397. processors which ignore such errors may cause document creators to create
  398. documents which are not accepted by all conformant XML 1.0 processors.
  399. (And of course, processors which produce incorrect diagnostics for such
  400. cases should be avoided.) </p>
  401. <table id="error" width="100%" bgcolor="#ffffff" cellpadding="4" border="1">
  402. <tr>
  403. <td bgcolor="#ffffcc">Section and [Rules]</td>
  404. <td bgcolor="#ffffcc">Test ID</td>
  405. <td bgcolor="#ffffcc">Description</td>
  406. <td bgcolor="#ffffcc">Diagnostic</td>
  407. </tr>
  408. <?table error?>
  409. </table>
  410. <p> This report was produced by Free Software from
  411. <a href="http://xmlconf.sourceforge.net/">http://xmlconf.sourceforge.net</a>,
  412. and you should be able to reproduce these results yourself. </p>
  413. </body></html>