/[pub]/test/html-webhacc/error-description-source.xml
Suika

Contents of /test/html-webhacc/error-description-source.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (hide annotations) (download) (as text)
Mon Nov 5 09:33:52 2007 UTC (18 years, 8 months ago) by wakaba
Branch: MAIN
Changes since 1.12: +44 -1 lines
File MIME type: text/xml
++ ChangeLog	5 Nov 2007 09:33:38 -0000
2007-11-05  Wakaba  <wakaba@suika.fam.cx>

	* cc.cgi (get_error_level_label): New.

	* cc-style.css: New rules for error level descriptions.

	* error-description-source.xml: Description for error
	levels is added.

1 wakaba 1.1 <!DOCTYPE html>
2     <html xmlns="http://www.w3.org/1999/xhtml"
3     xmlns:d="http://suika.fam.cx/~wakaba/archive/2007/wdcc-desc/"
4     id="error-description">
5     <head>
6     <title xml:lang="en">Description of Errors &#x2014;
7     Web Document Conformance Checker (BETA)</title>
8     <link rel="stylesheet" href="cc-style"/>
9     <link rel="license" href="#license"/>
10     </head>
11     <body>
12     <h1>Description of Errors</h1>
13    
14 wakaba 1.2 <section id="html5-tokenize-error">
15     <h2>HTML5 Parse Errors in Tokenization Stage</h2>
16 wakaba 1.1
17 wakaba 1.3 <d:item name="after html"
18     class="parse-error">
19     <d:message xml:lang="en">Tag <code>&lt;<var>$0</var>&gt;</code>
20     is not allowed after the end tag <code>&lt;/html></code>.</d:message>
21     <d:desc xml:lang="en">
22     <p>The start or end tag of an element appears after the
23     <code>html</code> element has been closed. The document is
24     non-conforming.</p>
25    
26     <p>Any content of the document other than comments
27     must be put into the <code>html</code> element.</p>
28     </d:desc>
29     </d:item>
30    
31 wakaba 1.7 <d:item name="after body"
32     class="parse-error">
33     <d:message xml:lang="en">Tag <code>&lt;<var>$0</var>&gt;</code>
34     is not allowed after the end tag <code>&lt;/body></code>.</d:message>
35     <d:desc xml:lang="en">
36     <p>The start or end tag of an element appears after the
37     <code>body</code> element has been closed. The document is
38     non-conforming.</p>
39    
40     <p>Any content of the document other than <code>head</code>
41     contents and comments must be put into the <code>body</code>
42     element.</p>
43     </d:desc>
44     </d:item>
45    
46 wakaba 1.3 <d:item name="bare ero"
47     class="tokenize-error">
48     <d:message xml:lang="en">The <code>&amp;</code> character must
49     introduce a reference.</d:message>
50     <d:desc xml:lang="en">
51     <p>An <code>&amp;</code> (<code>U+0026</code>
52     <code class="charname">AMPERSAND</code>) character which
53     is not part of any reference appears in the input stream.
54     The document is non-conforming.</p>
55    
56 wakaba 1.9 <p><strong>Any <code>&amp;</code> character in URI (or IRI)
57     must be escaped as <code>&amp;amp;</code>.</strong></p>
58    
59 wakaba 1.3 <p>The <code>&amp;</code> character must
60     be the first character of a reference:
61     <dl>
62     <dt>Named entity reference</dt>
63     <dd><pre class="html example"><code>&amp;<var>entity-name</var>;</code></pre>
64     where <var>entity-name</var> is the name of the
65     character entity to be referenced.</dd>
66     <dt>Numeric character reference</dt>
67     <dd><pre class="html example"><code>&amp;#<var>d</var>;</code></pre>
68     where <var>d</var> is the decimal representation of
69     the code position of the character to be referenced.</dd>
70     <dt>Hexadecimal character reference</dt>
71     <dd><pre class="html example"><code>&amp;#x<var>h</var>;</code></pre>
72     where <var>h</var> is the hexadecimal representation
73     of the code position of the character to be referenced.</dd>
74     </dl>
75     </p>
76    
77     <p>To represent <code>&amp;</code> as a data character, use
78     named entity reference:
79     <pre class="html example"><code>&amp;amp;</code></pre>
80     </p>
81     </d:desc>
82     </d:item>
83    
84 wakaba 1.7 <d:item name="bare etago"
85     class="tokenize-error">
86     <d:message xml:lang="en">A <code>&lt;/</code> string is not followed
87     by a tag name.</d:message><!-- </ EOF -->
88     <d:desc xml:lang="en">
89     <p>There is a <code>&lt;</code> (<code>U+003C</code>
90     <code class="charname">LESS-THAN SIGN</code>) character
91     immediately followed by a <code>/</code> (<code>U+005F</code>
92     <code>SOLIDUS</code>) character, which is not part
93     of any end tag, in the input stream. The document
94     is non-conforming.</p>
95    
96     <p>The <code>&lt;/</code> sequence immediately followed
97     by an <abbr title="End of file pseudo-character">EOF</abbr> is
98     interpreted as a string data of <code>&lt;/</code>.</p>
99    
100     <p>The <code>&lt;/</code> sequence as string data must
101     be escaped as:
102     <pre class="html example"><code>&amp;lt;/</code></pre>
103     </p>
104     </d:desc>
105     </d:item>
106    
107 wakaba 1.4 <d:item name="bare stago"
108     class="tokenize-error">
109     <d:message xml:lang="en">A <code>&lt;</code> character is not followed
110     by tag name or by a <code>!</code> character.</d:message>
111     <d:desc xml:lang="en">
112 wakaba 1.6 <p>A <code>&lt;</code> (<code>U+003C</code>
113     <code class="charname">LESS-THAN SIGN</code>) character which is not part
114     of any markup appears in the input stream.</p>
115 wakaba 1.4
116     <p>The <code>&lt;</code> character as a data character must
117     be escaped as:
118 wakaba 1.6 <pre class="html example"><code>&amp;lt;</code></pre>
119 wakaba 1.4 </p>
120     </d:desc>
121     </d:item>
122    
123 wakaba 1.3 <d:item name="bare nero"
124     class="tokenize-error">
125     <d:message xml:lang="en">The decimal representation of the code position
126     of a character must be specified after <code>&amp;#</code>.</d:message>
127     <d:desc xml:lang="en">
128     <p>An <code>&amp;</code> (<code>U+0026</code>
129     <code class="charname">AMPERSAND</code>) character immediately
130     followed by a <code>#</code> (<code>U+0023</code>
131     <code>NUMBER SIGN</code>) character which
132     is not part of any reference appears in the input stream.
133     The document is non-conforming.</p>
134    
135     <p>The string <code>&amp;#</code> must be the first two characters
136     of a reference:
137     <dl>
138     <dt>Numeric character reference</dt>
139     <dd><pre class="html example"><code>&amp;#<var>d</var>;</code></pre>
140     where <var>d</var> is the decimal representation of
141     the code point of the character to be referenced.</dd>
142     <dt>Hexadecimal character reference</dt>
143     <dd><pre class="html example"><code>&amp;#x<var>h</var>;</code></pre>
144     where <var>h</var> is the hexadecimal representation
145     of the code point of the character to be referenced.</dd>
146     </dl>
147     </p>
148    
149     <p>To represent <code>&amp;#</code> as data characters, use
150 wakaba 1.6 a named entity reference for the <code>&amp;</code> character:
151 wakaba 1.3 <pre class="html example"><code>&amp;amp;#</code></pre>
152     </p>
153     </d:desc>
154     </d:item>
155    
156     <d:item name="bare hcro"
157     class="tokenize-error">
158     <d:message xml:lang="en">The hexadecimal representation of the code position
159     of a character must be specified after <code>&amp;#x</code>.</d:message>
160     <d:desc xml:lang="en">
161     <p>The string <code>&amp;#x</code> or <code>&amp;#X</code> which
162     is not part of any reference appears in the input stream.
163     The document is non-conforming.</p>
164    
165     <p>The string <code>&amp;#x</code> or <code>&amp;#X</code> must
166     be the first three characters of a hexadecimal reference:
167     <pre class="html example"><code>&amp;#x<var>h</var>;</code></pre>
168     where <var>h</var> is the hexadecimal representation
169     of the code point of the character to be referenced.</p>
170    
171     <p>To represent <code>&amp;#x</code> as data characters, use
172 wakaba 1.6 a named entity reference for the <code>&amp;</code> character:
173 wakaba 1.3 <pre class="html example"><code>&amp;amp;#x</code></pre>
174     </p>
175     </d:desc>
176     </d:item>
177    
178 wakaba 1.9 <d:item name="bogus comment"
179     class="tokenize-error">
180     <d:message xml:lang="en">String <code>&lt;!</code> is not followed
181     by <code>--</code>.</d:message>
182     <d:desc xml:lang="en">
183     <p>There is a <code>&lt;</code> (<code>U+003C</code>
184     <code class="charname">LESS-THAN SIGN</code>) character
185     followed by a <code>!</code> (<code>U+0021</code>
186     <code class="charname">EXCLAMATION MARK</code>) character,
187     which is not followed by a <code>--</code> or
188     <code>!DOCTYPE</code>. The document is non-conforming.</p>
189    
190     <dl class="switch">
191     <dt>Comments</dt>
192     <dd>In HTML documents, comments must be introduced by
193     <code>&lt;!--</code> (<code>&lt;!</code> <em>immediately</em> followed
194     by <em>two</em> <code>-</code>s) and must be terminated by
195     <code>--></code>. Strings <code>&lt;!</code> not followed
196     by <code>--</code> and <code>&lt;!-</code> not followed by
197     <code>-</code> are not valid open delimiters for comments.</dd>
198     <dt>Marked sections, including <code>CDATA</code> sections</dt>
199     <dd>Marked sections are not allowed in HTML documents.</dd>
200     <dt>Markup declarations</dt>
201     <dd>Markup declarations, except <code>DOCTYPE</code>
202     and comment declarations, are not allowed in HTML documents.</dd>
203     <dt>String <code>&lt;!</code></dt>
204     <dd>String <code>&lt;!</code> must be escaped as
205     <code>&amp;lt;!</code>.</dd>
206     </dl>
207     </d:desc>
208     </d:item>
209    
210 wakaba 1.7 <d:item name="bogus end tag"
211     class="tokenize-error">
212 wakaba 1.9 <d:message xml:lang="en">String <code>&lt;/</code> is not followed
213     by tag name.</d:message><!-- </ non-name-start-char-non-EOF -->
214 wakaba 1.7 <d:desc xml:lang="en">
215     <p>There is a <code>&lt;</code> (<code>U+003C</code>
216     <code class="charname">LESS-THAN SIGN</code>) character
217     immediately followed by a <code>/</code> (<code>U+005F</code>
218     <code>SOLIDUS</code>) character, which is not part
219     of any end tag, in the input stream. The document
220     is non-conforming.</p>
221    
222     <p>The <code>&lt;/</code> sequence not followed by a
223     tag name is parsed as an opening of bogus comment.</p>
224    
225     <p>The <code>&lt;/</code> sequence as string data must
226     be escaped as:
227     <pre class="html example"><code>&amp;lt;/</code></pre>
228     </p>
229     </d:desc>
230     </d:item>
231    
232 wakaba 1.4 <d:item name="dash in comment"
233     class="tokenize-error">
234     <d:message xml:lang="en">There is a <code>--</code> sequence
235     in a comment.</d:message>
236     <d:desc xml:lang="en">
237     <p>There is a <code>-</code> (<code>U+002D</code>
238     <code class="charname">HYPHEN-MINUS</code>) character
239     at the end of the comment or a <code>--</code> sequence
240     in the comment. The document is non-conforming.</p>
241    
242     <p>Comments cannot contain a string <code>--</code>, as in XML.
243     Unlike SGML, there cannot be more than one comments
244     (where <i>comment</i> is an SGML term) in the comment
245     declaration.</p>
246     </d:desc>
247     </d:item>
248    
249 wakaba 1.1 <d:item name="duplicate attribute"
250     class="tokenize-error">
251 wakaba 1.6 <d:message xml:lang="en">There are two attributes with name
252     <code><var>$0</var></code>.</d:message>
253 wakaba 1.1 <d:desc xml:lang="en">
254 wakaba 1.3 <p>There are more than one attributes with the same
255     name in a tag. The document is non-conforming.</p>
256 wakaba 1.1
257     <p>The <code>motion</code> attribute is not part of the HTML standard.
258     Use <code>img</code> element with animation GIF instead.</p>
259     </d:desc>
260     </d:item>
261    
262     <d:item name="nestc"
263     class="tokenize-error">
264 wakaba 1.10 <d:message xml:lang="en">Polytheistic slash (<code>/></code>) cannot be
265 wakaba 1.1 used for this element.</d:message>
266     <d:desc xml:lang="en">
267 wakaba 1.10 <p>Polytheistic slash (<code>/></code>) must not be used
268 wakaba 1.3 for the element. The document is non-conforming.</p>
269    
270 wakaba 1.10 <p>The polytheistic slash can only be
271 wakaba 1.1 used for <code>base</code>, <code>link</code>, <code>meta</code>,
272     <code>hr</code>, <code>br</code>, <code>img</code>,
273     <code>embed</code>, <code>param</code>, <code>area</code>,
274 wakaba 1.3 <code>col</code>, and <code>input</code> elements.</p>
275 wakaba 1.1
276 wakaba 1.12 <dl class="switch">
277 wakaba 1.9 <dt><code>&lt;script/></code></dt>
278 wakaba 1.10 <dd><p>The polytheistic slash cannot be used for <code>script</code>
279 wakaba 1.9 element. Even for an empty <code>script</code> element,
280     there must be an explicit end tag <code>&lt;/script></code>.</p>
281    
282     <p><strong>NOTE</strong>: Though some user agents interpret
283 wakaba 1.10 polytheistic slash for <code>script</code> element as the
284 wakaba 1.9 closing of the element, such usage is not allowed under
285     the current standard.</p></dd>
286     <dt><code>&lt;basefont/></code>, <code>&lt;bgsound/></code>,
287     <code>&lt;frame/></code>, <code>&lt;keygen/></code>,
288     <code>&lt;spacer/></code>, <code>&lt;wbr/></code></dt>
289     <dd>These elements are themselves non-conforming.</dd>
290     <!-- isindex, image -->
291     <dt><code>&lt;command/></code>, <code>&lt;event-source/></code>,
292 wakaba 1.12 <code>&lt;nest/></code>, or <code>&lt;source/></code></dt>
293 wakaba 1.9 <dd>Future revision of HTML5 parsing algorithm is expected
294 wakaba 1.10 to allow polytheistic slash for these elements.</dd>
295 wakaba 1.9 <dt><code>&lt;a/></code>, <code>&lt;p/></code></dt>
296     <dd>These elements are not always empty and therefore
297 wakaba 1.10 polytheistic slash is not allowed.</dd>
298 wakaba 1.9 </dl>
299    
300 wakaba 1.10 <p>Note that, unlike in XML, the polytheistic slash has
301 wakaba 1.1 no effect in HTML.</p>
302     </d:desc>
303     </d:item>
304    
305 wakaba 1.5
306     <d:item name="pio"
307     class="tokenize-error">
308     <d:message xml:lang="en">Processing instruction
309 wakaba 1.9 (<code>&lt;?<var>...</var>></code>) cannot be used.</d:message>
310 wakaba 1.5 <d:desc xml:lang="en">
311     <p>Processing instructions (<code>&lt;?<var>...</var>?></code>),
312     including XML declaration (<code>&lt;?xml <var>...</var>?></code>)
313     and XML style sheet <abbr title="processing instruction">PI</abbr>
314 wakaba 1.9 (<code>&lt;?xml-stylesheet <var>...</var>?></code>), are not allowed
315 wakaba 1.5 in the HTML syntax. The document is non-conforming.</p>
316    
317 wakaba 1.12 <dl class="switch">
318     <dt><code>&lt;?xbl?></code> (<abbr>XBL</abbr> Association)</dt>
319     <dd>An <abbr>XBL</abbr> binding cannot be associated by
320     <abbr title="processing instruction">PI</abbr> in <abbr>HTML</abbr>
321     document. Use <code>binding</code> property in <abbr>CSS</abbr>
322     style sheet.</dd>
323 wakaba 1.9 <dt><code>&lt;?xml?&gt;</code> (XML declaration)</dt>
324     <dd>XML declaration is unnecessary for HTML documents.</dd>
325     <dt><code>&lt;?xml-stylesheet?></code> (XML style sheet
326 wakaba 1.12 <abbr title="processing instruction">PI</abbr>)</dt>
327 wakaba 1.9 <dd>Use HTML <code>link</code> element with <code>rel</code>
328     attribute set to <code>stylesheet</code> (or,
329     <code>alternate stylesheet</code> for an alternate style
330     sheet).</dd>
331 wakaba 1.12 <dt><code>&lt;?php?&gt;</code> or
332     <code>&lt;? <var>... <abbr>PHP</abbr> code ...</var> ?&gt;</code>
333     (<abbr>PHP</abbr> code)</dt>
334 wakaba 1.9 <dd>The conformance checker does <em>not</em> support
335     checking for PHP source documents.</dd>
336     <dt>Other processing instructions</dt>
337     <dd>Processing instructions cannot be inserted in an HTML
338     document. Use XML document or insert
339     <code>ProcessingInstruction</code> node by scripting.</dd>
340     </dl>
341 wakaba 1.5
342     <p>Web browsers will parse processing instructions as bogus
343     comments. Some legacy Web browsers, such as IE:mac and
344 wakaba 1.9 some mobile Web browsers, will display processing instructions
345 wakaba 1.5 as string.</p>
346     </d:desc>
347     </d:item>
348    
349 wakaba 1.1 </section>
350    
351 wakaba 1.2 <section id="html5-parse-errors">
352     <h2>HTML5 Parse Errors in Tree Construction Stage</h2>
353    
354     <d:item name="after head"
355     class="parse-error">
356     <d:message xml:lang="en">The <code><var>$0</var></code> element cannot be
357     inserted between <code>head</code> and <code>body</code> elements.</d:message>
358     <d:desc xml:lang="en">
359 wakaba 1.3 <p>A start tag appears after the <code>head</code> element is closed
360 wakaba 1.2 but before the <code>body</code> element is opened.
361     The document is non-conforming.</p>
362     </d:desc>
363     </d:item>
364    
365 wakaba 1.4 <d:item name="DOCTYPE in the middle"
366     class="parse-error">
367     <d:message xml:lang="en">A <code>DOCTYPE</code> appears after any
368     element or data character has been seen.</d:message>
369     <d:desc xml:lang="en">
370     <p>A <code>DOCTYPE</code> appears after any element or data character
371     has been seen. The document is non-conforming.</p>
372    
373     <p>The <code>DOCTYPE</code> must be placed before any
374     tag, reference, or data character. Only white space characters
375     and comments can be inserted before the <code>DOCTYPE</code>.</p>
376     </d:desc>
377     </d:item>
378    
379 wakaba 1.5 <d:item name="in a:a"
380     class="parse-error">
381     <d:message xml:lang="en">Anchor cannot be nested.</d:message>