/[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.39 - (hide annotations) (download) (as text)
Fri Aug 29 13:46:58 2008 UTC (17 years, 10 months ago) by wakaba
Branch: MAIN
Changes since 1.38: +20 -102 lines
File MIME type: text/xml
Cleanup excerise, vol 1

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 wakaba 1.36 <base href="cc/"/>
7     <title xml:lang="en">Description of Errors &#x2014; WebHACC (β)</title>
8 wakaba 1.37 <title xml:lang="ja">誤りの説明 &#x2014; WebHACC (β)</title>
9 wakaba 1.36 <link rel="stylesheet" href="../cc-style"/>
10 wakaba 1.1 <link rel="license" href="#license"/>
11     </head>
12     <body>
13 wakaba 1.36 <header>
14     <h1><a href="../cc-about"><abbr title="Web Hypertext Application Conformance Checker (β)"><img src="../icons/title" alt="WebHACC"/></abbr></a></h1>
15     <h2>Description of Errors</h2>
16     </header>
17    
18     <d:cat name="WebHACC:Title">
19     <d:text xml:lang="en">WebHACC (β)</d:text>
20     </d:cat>
21    
22     <d:cat name="WebHACC:Heading">
23     <d:text xml:lang="en">
24     <a href="../error-description#WebHACC:Heading" rel="help"><abbr title="Web Hypertext Application Conformance Checker (β)"><img src="../icons/title" alt="WebHACC"/></abbr></a>
25     </d:text>
26     <d:text xml:lang="ja">
27     <a href="../error-description#WebHACC:Heading" rel="help"><abbr title="Web ハイパーテキスト応用適合性検査器 (β)"><img src="../icons/title" alt="WebHACC"/></abbr></a>
28     </d:text>
29     <d:desc xml:lang="en">
30     <p><a href="./#input"><abbr title="Web Hypertext Application Conformance Checker">WebHACC</abbr></a>
31     is a <em>conformance checker</em> (or validator) for Web documents,
32     supporting <a href="../standards">latest Web standards</a> including
33     <a href="http://whatwg.org/html5"><abbr title="Hypertext Markup Language">HTML</abbr>5</a>,
34     <a href="urn:ietf:rfc:4287">Atom 1.0</a>,
35     <a href="http://www.w3.org/Style/CSS/current-work"><abbr title="Cascading Style Sheets">CSS</abbr>3</a>.</p>
36    
37     <p><strong><a href="./#input">Check your document</a></strong>, or
38     <a href="../cc-about">learn more about
39     <abbr title="Web Hypertext Application Conformance Checker">WebHACC</abbr></a>.</p>
40     </d:desc>
41     <d:desc xml:lang="ja">
42     <p><a href="./#input"><abbr title="Web ハイパーテキスト応用適合性検査器">WebHACC</abbr></a>
43     は、 Web 文書のための<em>適合性検査器</em> (妥当性検証器) です。
44     <a href="http://whatwg.org/html5"><abbr title="Hypertext Markup Language">HTML</abbr>5</a>、
45     <a href="urn:ietf:rfc:4287">Atom 1.0</a>、
46     <a href="http://www.w3.org/Style/CSS/current-work"><abbr title="Cascading Style Sheets">CSS</abbr>3</a>
47     などの<a href="../standards">最新の Web 標準</a>に対応しています。</p>
48    
49     <p><strong><a href="./#input">文書を検査する</a></strong></p>
50    
51     <p><a href="../cc-about"><abbr title="Web ハイパーテキスト応用適合性検査器">WebHACC</abbr>
52     の詳細</a></p>
53     </d:desc>
54     </d:cat>
55 wakaba 1.1
56 wakaba 1.23 <section id="character-encoding-layer">
57     <h2>Character Encoding Layer Errors</h2>
58    
59     <d:item name="illegal-octets-error" class="error-category-charset" level="m">
60     <d:message xml:lang="en">An illegal octet in the input stream.</d:message>
61     </d:item>
62     </section>
63    
64 wakaba 1.16 <section id="html5-character-encoding">
65     <h2>HTML5 Character Encoding Errors</h2>
66    
67 wakaba 1.30 <d:item name="disallowed character encoding"
68     modules="ContentChecker">
69     <d:message xml:lang="en">Character encoding <code><var>{text}</var></code>
70 wakaba 1.16 is not allowed for <abbr>HTML</abbr> document.</d:message>
71     <d:desc xml:lang="en">
72     <p>The character encoding used for the document is not allowed
73     for <abbr>HTML</abbr> document. The document is non‐conforming.</p>
74     </d:desc>
75     </d:item>
76    
77 wakaba 1.30 <d:item name="bad character encoding"
78     modules="ContentChecker">
79     <d:message xml:lang="en">Character encoding <code><var>{text}</var></code>
80 wakaba 1.16 should not be used for <abbr>HTML</abbr> document.</d:message>
81     <d:desc xml:lang="en">
82     <p>The character encoding used for the document is not recommended
83     for <abbr>HTML</abbr> document. The document is non‐conforming
84     unless there is any good reason to use that encoding.</p>
85     </d:desc>
86     </d:item>
87    
88 wakaba 1.30 <d:item name="non-utf-8 character encoding"
89     modules="ContentChecker">
90     <d:message xml:lang="en">Use of UTF-8 is encouraged (this document
91     is encoded in <code><var>{text}</var></code>).</d:message>
92 wakaba 1.16 <d:desc xml:lang="en">
93     <p>Use of UTF-8 as the character encoding of the document is encouraged,
94 wakaba 1.21 though the use of another character encoding is still conforming.</p>
95 wakaba 1.16 </d:desc>
96     </d:item>
97    
98 wakaba 1.30 <d:item name="character encoding unchecked"
99     modules="ContentChecker">
100 wakaba 1.17 <d:message xml:lang="en">Conformance for character encoding requirements
101 wakaba 1.30 cannot be checked, since the input is not a byte stream.</d:message>
102 wakaba 1.17 <d:desc xml:lang="en">
103     <p>The conformance checker cannot detect whether the input document
104     met the requirements on character encoding, since the document
105     is not inputed as a serialized byte sequence. The document is
106     not conforming if it is not encoded in an appropriate character
107     encoding with appropriate labeling.</p>
108     </d:desc>
109     </d:item>
110    
111 wakaba 1.30 <d:item name="no character encoding declaration"
112     modules="ContentChecker">
113 wakaba 1.16 <d:message xml:lang="en">There is no character encoding
114     declaration.</d:message>
115     <d:desc xml:lang="en">
116     <p>The document does not contain a character encoding
117     declaration. Unless the character encoding is explicitly
118 wakaba 1.17 specified in lower‐level protocol, e.g. in <abbr>HTTP</abbr>,
119 wakaba 1.16 or is implied by <abbr>BOM</abbr>, there must be a character
120     encoding declaration. The document is non‐conforming.</p>
121    
122     <p>The long character encoding declaration syntax
123     <code class="html bad example">&lt;meta http-equiv="Content-Type" content="text/html; charset=<var>charset-name</var>"></code>
124     is obsolete. The new syntax is:</p>
125     <pre class="html example"><code>&lt;meta charset="<var>charset-name</var>"></code></pre>
126    
127     <p>Note that the <code>encoding</code> declaration in <abbr>XML</abbr>
128     declaration has no effect for <abbr>HTML</abbr> document.</p>
129     </d:desc>
130     </d:item>
131    
132 wakaba 1.30 <d:item name="non ascii superset"
133     modules="ContentChecker">
134 wakaba 1.16 <d:message xml:lang="en">No character encoding metadata is found
135 wakaba 1.17 in lower‐level protocol nor is there <abbr>BOM</abbr>, while
136 wakaba 1.30 character encoding <code><var>{text}</var></code>
137 wakaba 1.16 is not a superset of <abbr>ASCII</abbr>.</d:message>
138     <d:desc xml:lang="en">
139     <p>The document is not labeled with character encoding name
140 wakaba 1.17 in lower‐level protocol, e.g. in <abbr>HTTP</abbr>, and
141 wakaba 1.16 the document is not begin with <abbr>BOM</abbr>. In addition,
142     the character encoding of the document is not a superset of
143     <abbr>ASCII</abbr>. The document is non‐conforming.</p>
144    
145     <p>Unless there is a <abbr>BOM</abbr>, the character encoding
146     for the document must be specified in e.g. <abbr>HTTP</abbr>‐level,
147     as:</p>
148     <pre class="http example"><code>Content-Type: text/html; charset=<var>charset-name</var></code></pre>
149    
150     <p>Existence of <abbr>HTML</abbr> character encoding declaration, i.e.
151     <code class="html example">&lt;meta charset="<var>charset-name</var>"></code>,
152     does not allow to omit <code>charset</code> parameter
153     for <abbr>HTML</abbr> document encoded in non‐<abbr>ASCII</abbr>
154     compatible encoding.</p>
155    
156     <p>Character encodings <code>Shift_JIS</code>, <code>Windows-31J</code>,
157     and <code>ISO-2022-JP</code> are <em>not</em> a superset of
158     <abbr>ASCII</abbr> for the purpose of <abbr>HTML</abbr> conformance.</p>
159     </d:desc>
160     </d:item>
161    
162 wakaba 1.29 <d:item name="sniffing:chardet"
163     modules="HTML::Parser">
164     <d:message xml:lang="en">Character encoding of this document is sniffed
165     as <code><var>{text}</var></code> (Sniffed because no explicit specification
166     for the character encoding of this document is found in the transfer
167     procotol headers).</d:message>
168     </d:item>
169    
170     <d:item name="sniffing:default"
171     modules="HTML::Parser">
172     <d:message xml:lang="en">Character encoding of this document is defaulted
173     to <code><var>{text}</var></code> because no explicit specification
174     for the character encoding of this document is found in the transfer
175     procotol headers.</d:message>
176     </d:item>
177    
178     <d:item name="chardecode:fallback"
179     modules="HTML::Parser">
180     <d:message xml:lang="en">Since no decoder for the document character
181     encoding is found, decoder for the character encoding
182     <code><var>{text}</var></code> is used. Checking results might be
183     <em>wrong</em>.</d:message>
184     </d:item>
185    
186     <d:item name="chardecode:no error"
187     modules="HTML::Parser">
188     <d:message xml:lang="en">Conformance error checking for the character
189     encoding <code><var>{text}</var></code> is not supported.</d:message>
190     </d:item>
191    
192     <d:item name="charset label:matching"
193     modules="HTML::Parser">
194     <d:message xml:lang="en">Sniffed character encoding
195     <code><var>{text}</var></code> is same as the character encoding specified
196     in the character encoding declaration. This is <em>not</em> an
197     error.</d:message>
198     </d:item>
199    
200     <d:item name="charset label detected"
201     modules="HTML::Parser">
202 wakaba 1.16 <d:message xml:lang="en">While parsing the document as
203 wakaba 1.29 <code><var>{text}</var></code>, a character encoding declaration specifying
204     a different character encoding is found. The document
205 wakaba 1.16 is reparsed.</d:message>
206     <d:desc xml:lang="en">
207     <p>While parsing a document in a character encoding,
208     a character encoding declaration which declares the character
209     encoding of the document as another character encoding is found.
210     The occurence of this warning itself does not make the document
211     non‐conforming. However, the failure of the first attempt to
212 wakaba 1.21 to detect the character encoding might be a result of non‐conformance
213 wakaba 1.16 of the document.</p>
214    
215     <p>The document will be reparsed from the beginning. Some error
216     or warning might be reported again.</p>
217    
218     <p>These are suggestions to avoid this warning:</p>
219     <ul>
220     <li>Specify <code>charset</code> parameter in the <code>Content-Type</code>
221     field in the <abbr>HTTP</abbr> header, as:
222     <pre class="HTTP example"><code>Content-Type: text/html; charset="<var>charset-name</var>"</code></pre></li>
223     <li>Put the character encoding declaration
224     (<code class="html example">&lt;meta charset="<var>charset-name</var>"></code>)
225     just after <code class="html example">&lt;head></code> start tag.</li>
226     <li>Use <code>UTF-8</code>.</li>
227     </ul>
228     </d:desc>
229     </d:item>
230 wakaba 1.29
231     <d:item name="NULL"
232     modules="HTML::Parser">
233     <d:message xml:lang="en">The <code class="charname">NULL</code> character
234     is not allowed.</d:message>
235     </d:item>
236    
237     <d:item name="control char"
238     modules="HTML::Parser">
239     <d:message xml:lang="en">Code point <code><var>{text}</var></code> is
240     not allowed.</d:message>
241     </d:item>
242    
243 wakaba 1.16 </section>
244    
245 wakaba 1.2 <section id="html5-tokenize-error">
246     <h2>HTML5 Parse Errors in Tokenization Stage</h2>
247 wakaba 1.1
248 wakaba 1.29 <d:item name="bad attribute name"
249     modules="HTML::Parser">
250     <d:message xml:lang="en">Attribute name cannot contain characters
251     <code>"</code>, <code>'</code>, and <code>=</code>.</d:message>
252     </d:item>
253    
254     <d:item name="bad attribute value"
255     modules="HTML::Parser">
256     <d:message xml:lang="en">Attribute value must be quoted by <code>"</code>
257     or <code>'</code> if it contains a <code>"</code>, <code>'</code>, or
258     <code>=</code> character.</d:message>
259     </d:item>
260    
261 wakaba 1.3 <d:item name="bare ero"
262 wakaba 1.29 modules="HTML::Parser">
263 wakaba 1.3 <d:message xml:lang="en">The <code>&amp;</code> character must
264 wakaba 1.22 be escaped as <code class="html example">&amp;amp;</code>.</d:message>
265 wakaba 1.3 <d:desc xml:lang="en">
266 wakaba 1.15 <p>An <code>&amp;</code> character which
267 wakaba 1.3 is not part of any reference appears in the input stream.
268 wakaba 1.15 The document is non‐conforming.</p>
269 wakaba 1.3
270 wakaba 1.15 <p><em>Any <code>&amp;</code> character in URI (or IRI)
271     must be escaped as <code class="example">&amp;amp;</code>.</em></p>
272 wakaba 1.9
273 wakaba 1.3 <p>The <code>&amp;</code> character must
274     be the first character of a reference:
275 wakaba 1.15 <dl class="switch">
276 wakaba 1.3 <dt>Named entity reference</dt>
277     <dd><pre class="html example"><code>&amp;<var>entity-name</var>;</code></pre>
278     where <var>entity-name</var> is the name of the
279     character entity to be referenced.</dd>
280     <dt>Numeric character reference</dt>
281     <dd><pre class="html example"><code>&amp;#<var>d</var>;</code></pre>
282     where <var>d</var> is the decimal representation of
283     the code position of the character to be referenced.</dd>
284     <dt>Hexadecimal character reference</dt>
285     <dd><pre class="html example"><code>&amp;#x<var>h</var>;</code></pre>
286     where <var>h</var> is the hexadecimal representation
287     of the code position of the character to be referenced.</dd>
288     </dl>
289     </p>
290    
291     <p>To represent <code>&amp;</code> as a data character, use
292     named entity reference:
293     <pre class="html example"><code>&amp;amp;</code></pre>
294     </p>
295     </d:desc>
296     </d:item>
297    
298 wakaba 1.7 <d:item name="bare etago"
299 wakaba 1.29 modules="HTML::Parser">
300 wakaba 1.7 <d:message xml:lang="en">A <code>&lt;/</code> string is not followed
301     by a tag name.</d:message><!-- </ EOF -->
302     <d:desc xml:lang="en">
303     <p>There is a <code>&lt;</code> (<code>U+003C</code>
304     <code class="charname">LESS-THAN SIGN</code>) character
305     immediately followed by a <code>/</code> (<code>U+005F</code>
306     <code>SOLIDUS</code>) character, which is not part
307     of any end tag, in the input stream. The document
308     is non-conforming.</p>
309    
310     <p>The <code>&lt;/</code> sequence immediately followed
311     by an <abbr title="End of file pseudo-character">EOF</abbr> is
312     interpreted as a string data of <code>&lt;/</code>.</p>
313    
314     <p>The <code>&lt;/</code> sequence as string data must
315     be escaped as:
316     <pre class="html example"><code>&amp;lt;/</code></pre>
317     </p>
318     </d:desc>
319     </d:item>
320    
321 wakaba 1.4 <d:item name="bare stago"
322 wakaba 1.29 modules="HTML::Parser">
323 wakaba 1.4 <d:message xml:lang="en">A <code>&lt;</code> character is not followed
324     by tag name or by a <code>!</code> character.</d:message>
325     <d:desc xml:lang="en">
326 wakaba 1.6 <p>A <code>&lt;</code> (<code>U+003C</code>
327     <code class="charname">LESS-THAN SIGN</code>) character which is not part
328     of any markup appears in the input stream.</p>
329 wakaba 1.4
330     <p>The <code>&lt;</code> character as a data character must
331     be escaped as:
332 wakaba 1.6 <pre class="html example"><code>&amp;lt;</code></pre>
333 wakaba 1.4 </p>
334     </d:desc>
335     </d:item>
336    
337 wakaba 1.3 <d:item name="bare nero"
338 wakaba 1.29 modules="HTML::Parser">
339 wakaba 1.3 <d:message xml:lang="en">The decimal representation of the code position
340     of a character must be specified after <code>&amp;#</code>.</d:message>
341     <d:desc xml:lang="en">
342     <p>An <code>&amp;</code> (<code>U+0026</code>
343     <code class="charname">AMPERSAND</code>) character immediately
344     followed by a <code>#</code> (<code>U+0023</code>
345     <code>NUMBER SIGN</code>) character which
346     is not part of any reference appears in the input stream.
347     The document is non-conforming.</p>
348    
349     <p>The string <code>&amp;#</code> must be the first two characters
350     of a reference:
351 wakaba 1.15 <dl class="switch">
352 wakaba 1.3 <dt>Numeric character reference</dt>
353     <dd><pre class="html example"><code>&amp;#<var>d</var>;</code></pre>
354     where <var>d</var> is the decimal representation of
355     the code point of the character to be referenced.</dd>
356     <dt>Hexadecimal character reference</dt>
357     <dd><pre class="html example"><code>&amp;#x<var>h</var>;</code></pre>
358     where <var>h</var> is the hexadecimal representation
359     of the code point of the character to be referenced.</dd>
360     </dl>
361     </p>
362    
363     <p>To represent <code>&amp;#</code> as data characters, use
364 wakaba 1.6 a named entity reference for the <code>&amp;</code> character:
365 wakaba 1.3 <pre class="html example"><code>&amp;amp;#</code></pre>
366     </p>
367     </d:desc>
368     </d:item>
369    
370     <d:item name="bare hcro"
371 wakaba 1.29 modules="HTML::Parser">
372 wakaba 1.3 <d:message xml:lang="en">The hexadecimal representation of the code position
373     of a character must be specified after <code>&amp;#x</code>.</d:message>
374     <d:desc xml:lang="en">
375     <p>The string <code>&amp;#x</code> or <code>&amp;#X</code> which
376     is not part of any reference appears in the input stream.
377     The document is non-conforming.</p>
378    
379     <p>The string <code>&amp;#x</code> or <code>&amp;#X</code> must
380     be the first three characters of a hexadecimal reference:
381     <pre class="html example"><code>&amp;#x<var>h</var>;</code></pre>
382     where <var>h</var> is the hexadecimal representation
383     of the code point of the character to be referenced.</p>
384    
385     <p>To represent <code>&amp;#x</code> as data characters, use
386 wakaba 1.6 a named entity reference for the <code>&amp;</code> character:
387 wakaba 1.3 <pre class="html example"><code>&amp;amp;#x</code></pre>
388     </p>
389     </d:desc>
390     </d:item>
391    
392 wakaba 1.9 <d:item name="bogus comment"
393 wakaba 1.29 modules="HTML::Parser">
394 wakaba 1.9 <d:message xml:lang="en">String <code>&lt;!</code> is not followed
395     by <code>--</code>.</d:message>
396     <d:desc xml:lang="en">
397     <p>There is a <code>&lt;</code> (<code>U+003C</code>
398     <code class="charname">LESS-THAN SIGN</code>) character
399     followed by a <code>!</code> (<code>U+0021</code>
400     <code class="charname">EXCLAMATION MARK</code>) character,
401     which is not followed by a <code>--</code> or
402     <code>!DOCTYPE</code>. The document is non-conforming.</p>
403    
404     <dl class="switch">
405     <dt>Comments</dt>
406 wakaba 1.15 <dd>In HTML document, comments must be introduced by
407     <code class="example">&lt;!--</code> (<code>&lt;!</code>
408     <em>immediately</em> followed
409 wakaba 1.9 by <em>two</em> <code>-</code>s) and must be terminated by
410 wakaba 1.15 <code class="example">--></code>.
411     Strings <code>&lt;!</code> not followed
412 wakaba 1.9 by <code>--</code> and <code>&lt;!-</code> not followed by
413     <code>-</code> are not valid open delimiters for comments.</dd>
414     <dt>Marked sections, including <code>CDATA</code> sections</dt>
415 wakaba 1.15 <dd>Marked sections are not allowed in HTML document.</dd>
416 wakaba 1.9 <dt>Markup declarations</dt>
417 wakaba 1.15 <dd>Markup declarations, except for <code>DOCTYPE</code>
418     and comment declarations, are not allowed in HTML document.</dd>
419 wakaba 1.9 <dt>String <code>&lt;!</code></dt>
420     <dd>String <code>&lt;!</code> must be escaped as
421 wakaba 1.15 <code class="example">&amp;lt;!</code>.</dd>
422 wakaba 1.9 </dl>
423     </d:desc>
424     </d:item>
425    
426 wakaba 1.7 <d:item name="bogus end tag"
427 wakaba 1.29 modules="HTML::Parser">
428 wakaba 1.9 <d:message xml:lang="en">String <code>&lt;/</code> is not followed
429     by tag name.</d:message><!-- </ non-name-start-char-non-EOF -->
430 wakaba 1.7 <d:desc xml:lang="en">
431     <p>There is a <code>&lt;</code> (<code>U+003C</code>
432     <code class="charname">LESS-THAN SIGN</code>) character
433     immediately followed by a <code>/</code> (<code>U+005F</code>
434     <code>SOLIDUS</code>) character, which is not part
435     of any end tag, in the input stream. The document
436     is non-conforming.</p>
437    
438     <p>The <code>&lt;/</code> sequence not followed by a
439     tag name is parsed as an opening of bogus comment.</p>
440    
441     <p>The <code>&lt;/</code> sequence as string data must
442     be escaped as:
443     <pre class="html example"><code>&amp;lt;/</code></pre>
444     </p>
445     </d:desc>
446     </d:item>
447    
448 wakaba 1.29 <d:item name="C1 character reference"
449     modules="HTML::Parser">
450     <d:message xml:lang="en">Character reference to
451     <code><var>{text}</var></code> is not allowed.</d:message>
452     </d:item>
453    
454     <d:item name="CR character reference"
455     modules="HTML::Parser">
456     <d:message xml:lang="en">Character reference to
457     <code>U+000D</code> (<code class="charname">CARRIAGE RETURN</code>)
458     is not allowed.</d:message>
459     </d:item>
460    
461 wakaba 1.4 <d:item name="dash in comment"
462 wakaba 1.29 modules="HTML::Parser">
463 wakaba 1.4 <d:message xml:lang="en">There is a <code>--</code> sequence
464     in a comment.</d:message>
465     <d:desc xml:lang="en">
466     <p>There is a <code>-</code> (<code>U+002D</code>
467     <code class="charname">HYPHEN-MINUS</code>) character
468     at the end of the comment or a <code>--</code> sequence
469     in the comment. The document is non-conforming.</p>
470    
471     <p>Comments cannot contain a string <code>--</code>, as in XML.
472     Unlike SGML, there cannot be more than one comments
473     (where <i>comment</i> is an SGML term) in the comment
474     declaration.</p>
475     </d:desc>
476     </d:item>
477    
478 wakaba 1.1 <d:item name="duplicate attribute"
479 wakaba 1.29 modules="HTML::Parser">
480 wakaba 1.6 <d:message xml:lang="en">There are two attributes with name
481 wakaba 1.29 <code><var>{text}</var></code>.</d:message>
482 wakaba 1.1 <d:desc xml:lang="en">
483 wakaba 1.3 <p>There are more than one attributes with the same
484     name in a tag. The document is non-conforming.</p>
485 wakaba 1.1
486     <p>The <code>motion</code> attribute is not part of the HTML standard.
487     Use <code>img</code> element with animation GIF instead.</p>
488     </d:desc>
489     </d:item>
490    
491 wakaba 1.29 <d:item name="empty start tag"
492     modules="HTML::Parser">
493     <d:message xml:lang="en">Empty start tag (<code>&lt;></code>) is not
494     allowed.</d:message>
495     </d:item>
496    
497     <d:item name="empty end tag"
498     modules="HTML::Parser">
499     <d:message xml:lang="en">Empty end tag (<code>&lt;/></code>) is not
500     allowed.</d:message>
501     </d:item>
502    
503     <d:item name="end tag attribute"
504     modules="HTML::Parser">
505     <d:message xml:lang="en">End tag cannot have attributes.</d:message>
506     </d:item>
507    
508     <d:item name="invalid character reference"
509     modules="HTML::Parser">
510     <d:message xml:lang="en">Character reference to
511     <code><var>{text}</var></code> is not allowed.</d:message>
512     </d:item>
513    
514 wakaba 1.1 <d:item name="nestc"
515 wakaba 1.29 modules="HTML::Parser">
516 wakaba 1.10 <d:message xml:lang="en">Polytheistic slash (<code>/></code>) cannot be
517 wakaba 1.1 used for this element.</d:message>
518     <d:desc xml:lang="en">
519 wakaba 1.10 <p>Polytheistic slash (<code>/></code>) must not be used
520 wakaba 1.3 for the element. The document is non-conforming.</p>
521    
522 wakaba 1.10 <p>The polytheistic slash can only be
523 wakaba 1.1 used for <code>base</code>, <code>link</code>, <code>meta</code>,
524     <code>hr</code>, <code>br</code>, <code>img</code>,
525     <code>embed</code>, <code>param</code>, <code>area</code>,
526 wakaba 1.3 <code>col</code>, and <code>input</code> elements.</p>
527 wakaba 1.1
528 wakaba 1.12 <dl class="switch">
529 wakaba 1.9 <dt><code>&lt;script/></code></dt>
530 wakaba 1.10 <dd><p>The polytheistic slash cannot be used for <code>script</code>
531 wakaba 1.9 element. Even for an empty <code>script</code> element,
532 wakaba 1.15 there must be an explicit end tag
533     <code class="html example">&lt;/script></code>.</p>
534 wakaba 1.9
535     <p><strong>NOTE</strong>: Though some user agents interpret
536 wakaba 1.10 polytheistic slash for <code>script</code> element as the
537 wakaba 1.9 closing of the element, such usage is not allowed under
538     the current standard.</p></dd>
539     <dt><code>&lt;basefont/></code>, <code>&lt;bgsound/></code>,
540     <code>&lt;frame/></code>, <code>&lt;keygen/></code>,
541     <code>&lt;spacer/></code>, <code>&lt;wbr/></code></dt>
542     <dd>These elements are themselves non-conforming.</dd>
543     <!-- isindex, image -->
544     <dt><code>&lt;command/></code>, <code>&lt;event-source/></code>,
545 wakaba 1.12 <code>&lt;nest/></code>, or <code>&lt;source/></code></dt>
546 wakaba 1.9 <dd>Future revision of HTML5 parsing algorithm is expected
547 wakaba 1.10 to allow polytheistic slash for these elements.</dd>
548 wakaba 1.9 <dt><code>&lt;a/></code>, <code>&lt;p/></code></dt>
549     <dd>These elements are not always empty and therefore
550 wakaba 1.15 polytheistic slash is not allowed. Use explicit end tag
551     to represent empty element as:
552     <pre class="example html"><code>&lt;p>&lt;/p></code></pre>
553     </dd>
554 wakaba 1.9 </dl>
555    
556 wakaba 1.10 <p>Note that, unlike in XML, the polytheistic slash has
557 wakaba 1.1 no effect in HTML.</p>
558     </d:desc>
559     </d:item>
560    
561 wakaba 1.29 <d:item name="no DOCTYPE name"
562     modules="HTML::Parser">
563     <d:message xml:lang="en">After the string <code>&lt;!DOCTYPE </code>, the
564     document type name must be specified.</d:message>
565     </d:item>
566    
567     <d:item name="no PUBLIC literal"
568     modules="HTML::Parser">
569     <d:message xml:lang="en">After the keyword <code>PUBLIC</code>, no
570     oublic identifier is specified.</d:message>
571     </d:item>
572    
573     <d:item name="no refc"
574     modules="HTML::Parser">
575     <d:message xml:lang="en">Character reference must be closed by a
576     <code>;</code> character.</d:message>
577     </d:item>
578    
579     <d:item name="no space before DOCTYPE name"
580     modules="HTML::Parser">
581     <d:message xml:lang="en">After the string <code>&lt;!DOCTYPE</code>, there
582     must be at least a white space character before the document type
583     name.</d:message>
584     </d:item>
585    
586     <d:item name="no space between attributes"
587     modules="HTML::Parser">
588     <d:message xml:lang="en">Attributes must be separeted by at least a
589     white space character.</d:message>
590     </d:item>
591    
592     <d:item name="no SYSTEM literal"
593     modules="HTML::Parser">
594     <d:message xml:lang="en">After the keyword <code>SYSTEM</code>, no
595     system identifier is specified.</d:message>
596     </d:item>
597 wakaba 1.5
598     <d:item name="pio"
599 wakaba 1.29 modules="HTML::Parser">
600 wakaba 1.5 <d:message xml:lang="en">Processing instruction
601 wakaba 1.29 (<code>&lt;?<var>...</var>></code>) is not allowed in HTML
602     document.</d:message>
603 wakaba 1.5 <d:desc xml:lang="en">
604     <p>Processing instructions (<code>&lt;?<var>...</var>?></code>),
605     including XML declaration (<code>&lt;?xml <var>...</var>?></code>)
606     and XML style sheet <abbr title="processing instruction">PI</abbr>
607 wakaba 1.9 (<code>&lt;?xml-stylesheet <var>...</var>?></code>), are not allowed
608 wakaba 1.5 in the HTML syntax. The document is non-conforming.</p>
609    
610 wakaba 1.12 <dl class="switch">
611     <dt><code>&lt;?xbl?></code> (<abbr>XBL</abbr> Association)</dt>
612     <dd>An <abbr>XBL</abbr> binding cannot be associated by
613     <abbr title="processing instruction">PI</abbr> in <abbr>HTML</abbr>
614     document. Use <code>binding</code> property in <abbr>CSS</abbr>
615 wakaba 1.15 style sheet as:
616     <pre class="html example"><code>&lt;style>
617     p {
618     binding: url(binding.xbl);
619     }
620     &lt;/style></code></pre>
621     </dd>
622 wakaba 1.9 <dt><code>&lt;?xml?&gt;</code> (XML declaration)</dt>
623     <dd>XML declaration is unnecessary for HTML documents.</dd>
624     <dt><code>&lt;?xml-stylesheet?></code> (XML style sheet
625 wakaba 1.12 <abbr title="processing instruction">PI</abbr>)</dt>
626 wakaba 1.9 <dd>Use HTML <code>link</code> element with <code>rel</code>
627     attribute set to <code>stylesheet</code> (or,
628     <code>alternate stylesheet</code> for an alternate style
629 wakaba 1.15 sheet).
630     <pre class="example html"><code>&lt;link rel=stylesheet href="path/to/stylesheet.css"></code></pre>
631     </dd>
632 wakaba 1.12 <dt><code>&lt;?php?&gt;</code> or
633     <code>&lt;? <var>... <abbr>PHP</abbr> code ...</var> ?&gt;</code>
634     (<abbr>PHP</abbr> code)</dt>
635 wakaba 1.9 <dd>The conformance checker does <em>not</em> support
636     checking for PHP source documents.</dd>
637     <dt>Other processing instructions</dt>
638     <dd>Processing instructions cannot be inserted in an HTML
639     document. Use XML document or insert
640     <code>ProcessingInstruction</code> node by scripting.</dd>
641     </dl>
642 wakaba 1.5
643     <p>Web browsers will parse processing instructions as bogus
644     comments. Some legacy Web browsers, such as IE:mac and
645 wakaba 1.9 some mobile Web browsers, will display processing instructions
646 wakaba 1.5 as string.</p>
647     </d:desc>
648     </d:item>
649    
650 wakaba 1.29 <d:item name="string after DOCTYPE name"
651     modules="HTML::Parser">
652     <d:message xml:lang="en">There is a bogus string after the document type
653     name.</d:message>
654     </d:item>
655    
656     <d:item name="string after PUBLIC"
657     modules="HTML::Parser">
658     <d:message xml:lang="en">There is a bogus string after the keyword
659     <code>PUBLIC</code>.</d:message>
660     </d:item>
661    
662     <d:item name="string after PUBLIC literal"
663     modules="HTML::Parser">
664     <d:message xml:lang="en">There is a bogus string after the public
665     identifier.</d:message>
666     </d:item>
667    
668     <d:item name="string after SYSTEM"
669     modules="HTML::Parser">
670     <d:message xml:lang="en">There is a bogus string after the keyword
671     <code>SYSTEM</code>.</d:message>
672     </d:item>
673    
674     <d:item name="string after SYSTEM literal"
675     modules="HTML::Parser">
676     <d:message xml:lang="en">There is a bogus string after the system
677     identifier.</d:message>
678     </d:item>
679    
680     <d:item name="unclosed attribute value"
681     modules="HTML::Parser">
682     <d:message xml:lang="en">Attribute value is not closed by a quotation
683     mark.</d:message>
684     </d:item>
685    
686     <d:item name="unclosed comment"
687     modules="HTML::Parser">
688     <d:message xml:lang="en">Comment is not closed by a string
689     <code>--></code>.</d:message>
690     </d:item>
691    
692     <d:item name="unclosed DOCTYPE"
693     modules="HTML::Parser">
694     <d:message xml:lang="en">The <code>DOCTYPE</code> is not closed by a
695     <code>></code> character.</d:message>
696     </d:item>
697    
698     <d:item name="unclosed PUBLIC literal"
699     modules="HTML::Parser">
700     <d:message xml:lang="en">The public identifier literal is not closed by a
701     quotation mark.</d:message>
702     </d:item>
703    
704     <d:item name="unclosed SYSTEM literal"
705     modules="HTML::Parser">
706     <d:message xml:lang="en">The system identifier literal is not closed by a
707     quotation mark.</d:message>
708     </d:item>
709    
710     <d:item name="unclosed tag"
711     modules="HTML::Parser">
712     <d:message xml:lang="en">Tag is not closed by a <code>></code>
713     character.</d:message>
714     </d:item>
715    
716 wakaba 1.1 </section>
717    
718 wakaba 1.2 <section id="html5-parse-errors">
719     <h2>HTML5 Parse Errors in Tree Construction Stage</h2>
720    
721 wakaba 1.29 <d:item name="after body"
722     modules="HTML::Parser">
723     <d:message xml:lang="en">Start tag <code>&lt;<var>{text}</var>></code> is
724     not allowed after the <code>body</code> is closed.</d:message>
725     </d:item>
726    
727     <d:item name="after body:/"
728     modules="HTML::Parser">
729     <d:message xml:lang="en">End tag <code>&lt;/<var>{text}</var>></code> is
730     not allowed after the <code>body</code> is closed.</d:message>
731     </d:item>
732    
733     <d:item name="after body:#text"
734     modules="HTML::Parser">
735     <d:message xml:lang="en">Non‐white‐space characters are not allowed
736     after the <code>body</code> is closed.</d:message>
737     </d:item>
738    
739     <d:item name="after frameset"
740     modules="HTML::Parser">
741     <d:message xml:lang="en">Start tag <code>&lt;<var>{text}</var>></code> is
742     not allowed after the <code>frameset</code> is closed.</d:message>
743     </d:item>
744    
745     <d:item name="after frameset:/"
746     modules="HTML::Parser">
747     <d:message xml:lang="en">End tag <code>&lt;/<var>{text}</var>></code> is
748     not allowed after the <code>frameset</code> is closed.</d:message>
749     </d:item>
750    
751     <d:item name="after frameset:#text"
752     modules="HTML::Parser">
753     <d:message xml:lang="en">Non‐white‐space characters are not allowed
754     after the <code>frame</code> is closed.</d:message>
755     </d:item>
756    
757 wakaba 1.2 <d:item name="after head"
758 wakaba 1.39 modules="HTML::Parser">
759 wakaba 1.29 <d:message xml:lang="en">The <code><var>{text}</var></code> element cannot be
760     inserted between <code>head</code> and <code>body</code>
761     elements.</d:message>
762 wakaba 1.2 <d:desc xml:lang="en">
763 wakaba 1.3 <p>A start tag appears after the <code>head</code> element is closed
764 wakaba 1.2 but before the <code>body</code> element is opened.
765     The document is non-conforming.</p>
766     </d:desc>
767     </d:item>
768    
769 wakaba 1.29 <d:item name="after html"
770     modules="HTML::Parser">
771     <d:message xml:lang="en">Start tag <code>&lt;<var>{text}</var>></code> is
772     not allowed after the <code>html</code> is closed.</d:message>
773 wakaba 1.39 <d:desc xml:lang="en">
774     <p>The start tag of an element appears after the
775     <code>body</code> element has been closed. The document is
776     non-conforming.</p>
777    
778     <p>Any content of the document other than <code>head</code>
779     contents and comments must be put into the <code>body</code>
780     element.</p>
781     </d:desc>
782 wakaba 1.29 </d:item>
783    
784     <d:item name="after html:/"
785     modules="HTML::Parser">
786     <d:message xml:lang="en">End tag <code>&lt;/<var>{text}</var>></code> is
787     not allowed after the <code>html</code> is closed.</d:message>
788 wakaba 1.39 <d:desc xml:lang="en">
789     <p>The end tag of an element appears after the
790     <code>body</code> element has been closed. The document is
791     non-conforming.</p>
792    
793     <p>Any content of the document other than <code>head</code>
794     contents and comments must be put into the <code>body</code>
795     element.</p>
796     </d:desc>
797 wakaba 1.29 </d:item>
798    
799     <d:item name="after html:#text"
800     modules="HTML::Parser">
801     <d:message xml:lang="en">Non‐white‐space characters are not allowed
802     after the <code>html</code> is closed.</d:message>
803     </d:item>
804    
805     <d:item name="image"
806     modules="HTML::Parser">
807     <d:message xml:lang="en">The <code>image</code> element is
808     obsolete.</d:message>
809 wakaba 1.4 </d:item>
810    
811 wakaba 1.5 <d:item name="in a:a"
812 wakaba 1.29 modules="HTML::Parser">
813 wakaba 1.5 <d:message xml:lang="en">Anchor cannot be nested.</d:message>
814     <d:desc xml:lang="en">
815     <p>HTML <code>a</code> elements cannot be nested.
816     The document is non-conforming.</p>
817    
818     <p>In the HTML syntax, a start tag of the <code>a</code>
819     implies the end tag of any opening <code>a</code> element.</p>
820     </d:desc>
821     </d:item>
822    
823 wakaba 1.4 <d:item name="in body"
824 wakaba 1.29 modules="HTML::Parser">
825     <d:message xml:lang="en">Start tag <code>&lt;<var>{text}</var>&gt;</code>
826 wakaba 1.9 is not allowed in the <code>body</code> element.</d:message>
827 wakaba 1.4 <d:desc xml:lang="en">
828     <p>The start or end tag of an element, which
829     cannot be a descendant of <code>body</code> element, appears
830     in the input stream while the <code>body</code> element has been opened.
831     The document is non-conforming.</p>
832     </d:desc>
833     </d:item>
834    
835 wakaba 1.29 <d:item name="in body:#eof"
836     modules="HTML::Parser">
837     <d:message xml:lang="en">Some element is not closed before the end of
838     file.</d:message>
839     </d:item>
840    
841     <d:item name="in button:button"
842     modules="HTML::Parser">
843     <d:message xml:lang="en">The <code>button</code> element cannot be
844     nested.</d:message>
845     </d:item>
846    
847     <d:item name="in CDATA:#eof"
848     modules="HTML::Parser">
849     <d:message xml:lang="en">Element is not closed before the end of
850     file.</d:message>
851     </d:item>
852    
853     <d:item name="in form:form"
854     modules="HTML::Parser">
855     <d:message xml:lang="en">Start tag <code>&lt;form></code> is
856     not allowed in a <code>form</code> element.</d:message>
857     </d:item>
858    
859     <d:item name="in frameset"
860     modules="HTML::Parser">
861     <d:message xml:lang="en">Start tag <code>&lt;<var>{text}</var>></code> is
862     not allowed in a <code>framset</code> element.</d:message>
863     </d:item>
864    
865     <d:item name="in frameset:/"
866     modules="HTML::Parser">
867     <d:message xml:lang="en">End tag <code>&lt;/<var>{text}</var>></code> is
868     not allowed in a <code>frameset</code> element.</d:message>
869     </d:item>
870    
871     <d:item name="in frameset:#text"
872     modules="HTML::Parser">
873     <d:message xml:lang="en">Non‐white‐space characters are not allowed
874     in a <code>frameset</code> element.</d:message>
875     </d:item>
876    
877 wakaba 1.5 <d:item name="in head:head"
878 wakaba 1.29 modules="HTML::Parser">
879 wakaba 1.9 <d:message xml:lang="en">Start tag <code>&lt;head&gt;</code>
880 wakaba 1.5 is not allowed in the <code>head</code> element.</d:message>
881     <d:desc xml:lang="en">
882     <p>There is a start tag <code>&lt;head></code> in the
883     <code>&lt;head></code> element. The document is non-conforming.</p>
884    
885     <p>In an HTML document there must not be more than
886     one <code>head</code> element, therefore no more than one
887     start tag <code>&lt;head></code> can appear in the input stream.</p>
888     </d:desc>
889     </d:item>
890    
891 wakaba 1.29 <d:item name="in html:#DOCTYPE"
892     modules="HTML::Parser">
893     <d:message xml:lang="en">A <code>DOCTYPE</code> appears after any
894     element or data character has been seen.</d:message>
895     <!-- <!DOCTYPE HTML><!DOCTYPE HTML> -->
896     <!-- <html><!DOCTYPE HTML> -->
897     <d:desc xml:lang="en">
898     <p>A <code>DOCTYPE</code> appears after any element or data character
899     has been seen. The document is non-conforming.</p>
900    
901     <p>The <code>DOCTYPE</code> must be placed before any
902     tag, reference, or data character. Only white space characters
903     and comments can be inserted before the <code>DOCTYPE</code>.</p>
904     </d:desc>
905     </d:item>
906    
907     <d:item name="in nobr:nobr"
908     modules="HTML::Parser">
909     <d:message xml:lang="en">The <code>nobr</code> element cannot be
910     nested.</d:message>
911     </d:item>
912    
913     <d:item name="in noscript"
914     modules="HTML::Parser">
915     <d:message xml:lang="en">The <code><var>{text}</var></code> element is not
916     allowed in a <code>noscript</code> element in the
917     <code>head</code> element.</d:message>
918     </d:item>
919    
920     <d:item name="in noscript:/"
921     modules="HTML::Parser">
922     <d:message xml:lang="en">An end tag <code>&lt;/<var>{text}</var>></code>
923     appers before the <code>noscript</code> element is closed.</d:message>
924     </d:item>
925    
926     <d:item name="in noscript:#eof"
927     modules="HTML::Parser">
928     <d:message xml:lang="en">A <code>noscript</code> element is not closed
929     before the end of file.</d:message>
930     </d:item>
931    
932     <d:item name="in noscript:#text"
933     modules="HTML::Parser">
934     <d:message xml:lang="en">Non‐white‐space characters are not allowed
935     in a <code>noscript</code> element in the <code>head</code>
936     element.</d:message>
937     </d:item>
938    
939     <d:item name="in PCDATA:#eof"
940     modules="HTML::Parser">
941     <d:message xml:lang="en">Element is not closed before the end of
942     file.</d:message>
943     </d:item>
944    
945     <d:item name="in select"
946     modules="HTML::Parser">
947     <d:message xml:lang="en">Start tag <code>&lt;<var>{text}</var>&gt;</code>
948     is not allowed in a <code>select</code> element.</d:message>
949     </d:item>
950    
951     <d:item name="in select:/"
952     modules="HTML::Parser">
953     <d:message xml:lang="en">End tag <code>&lt;/<var>{text}</var>&gt;</code>
954     is not allowed in a <code>select</code> element.</d:message>
955     </d:item>
956    
957 wakaba 1.3 <d:item name="in table"
958 wakaba 1.29 modules="HTML::Parser">
959     <d:message xml:lang="en">Start tag <code>&lt;<var>{text}</var>&gt;</code>
960 wakaba 1.5 is not allowed in a <code>table</code> element.</d:message>
961 wakaba 1.3 <d:desc xml:lang="en">
962 wakaba 1.4 <p>The start or end tag of an element, which
963     cannot be a child of <code>table</code> element, appears
964     in the input stream while the <code>table</code> element has been opened
965     but no other element has been opened. The document is non-conforming.</p>
966 wakaba 1.3
967     <p>In <code>table</code>, only table related elements
968     are allowed; any other element must be contained in
969     <code>td</code> or <code>th</code> element to form
970     a part of the table, or <code>caption</code> element to create
971     a table caption.</p>
972     </d:desc>
973     </d:item>
974    
975 wakaba 1.29 <d:item name="in table:/"
976     modules="HTML::Parser">
977     <d:message xml:lang="en">End tag <code>&lt;/<var>{text}</var>&gt;</code>
978     is not allowed in a <code>table</code> element.</d:message>
979     </d:item>
980    
981     <d:item name="in table:#text"
982     modules="HTML::Parser">
983     <d:message xml:lang="en">Non‐white‐space character is not allowed within
984     the <code>table</code> element, outside of the caption and cells.</d:message>
985 wakaba 1.3 <d:desc xml:lang="en">
986 wakaba 1.29 <p>A non‐white‐space character appears in <code>table</code>.
987     The document is non-conforming.</p>
988 wakaba 1.3
989     <p>In <code>table</code>, only table related elements
990     are allowed; any other element and data character must be contained in
991     <code>td</code> or <code>th</code> element to form
992     a part of the table, or <code>caption</code> element to create
993     a table caption.</p>
994     </d:desc>
995     </d:item>
996    
997 wakaba 1.29 <d:item name="isindex"
998     modules="HTML::Parser">
999     <d:message xml:lang="en">The <code>isindex</code> element is
1000     obsolete.</d:message>
1001     </d:item>
1002    
1003 wakaba 1.3 <d:item name="missing start tag:tr"
1004 wakaba 1.29 modules="HTML::Parser">
1005 wakaba 1.3 <d:message xml:lang="en">Start tag of <code>tr</code>
1006     element is missing.</d:message>
1007     <d:desc>
1008     <p>Start tag of a <code>tr</code> element, which is <em>not</em>
1009     optional, is missing. The document is non-conforming.</p>
1010    
1011     <p>In a table section, a <code>&lt;tr></code> start tag
1012     must occur before any <code>&lt;td></code> or
1013     <code>&lt;th></code> start tag. Though the HTML5 parser
1014     implies the <code>&lt;tr></code> start tag before
1015     these start tags, it must be explicitly specified.</p>
1016     </d:desc>
1017     </d:item>
1018    
1019 wakaba 1.2 <d:item name="no DOCTYPE"
1020 wakaba 1.29 class="parse-error"
1021     modules="HTML::Parser">
1022 wakaba 1.6 <d:message xml:lang="en">This document does not start with a
1023 wakaba 1.3 <code>DOCTYPE</code>.</d:message>
1024     <d:desc>
1025     <p>The document does not start with a <code>DOCTYPE</code>.
1026     The document is non-conforming.</p>
1027    
1028     <p>An HTML document must start by a <code>DOCTYPE</code>:
1029     <pre class="html example"><code>&lt;!DOCTYPE HTML></code></pre>
1030     </p>
1031    
1032     <p>Only white space characters and comments are allowed
1033 wakaba 1.12 before the <code>DOCTYPE</code>. XML declaration is <em>not</em>
1034     allowed in HTML document.</p>
1035 wakaba 1.3 </d:desc>
1036 wakaba 1.2 </d:item>
1037    
1038     <d:item name="not closed"
1039 wakaba 1.29 class="parse-error"
1040     modules="HTML::Parser">
1041     <d:message xml:lang="en">Element <code><var>{text}</var></code> is not
1042 wakaba 1.2 closed.</d:message>
1043 wakaba 1.3 <d:desc>
1044     <p>End tag of an element is not found before, for example,
1045     an end tag of another element appears or
1046     the end of the document. The document is non-conforming.</p>
1047 wakaba 1.10
1048 wakaba 1.11 <p>Only <code>body</code>, <code>colgroup</code>, <code>dd</code>,
1049     <code>dt</code>, <code>head</code>, <code>html</code>, <code>li</code>,
1050 wakaba 1.10 <code>ol</code>, <code>option</code>, <code>optgroup</code>,
1051 wakaba 1.11 <code>p</code>, <code>rb</code>, <code>rp</code>, <code>rt</code>,
1052     <code>tbody</code>, <code>td</code>, <code>tfoot</code>,
1053     <code>th</code>, <code>thead</code>, <code>tr</code>,
1054     <code>ul</code> end tag can be omitted in HTML documents.
1055 wakaba 1.10 For any element except for void element, there must be an explicit
1056     end tag.</p>
1057    
1058 wakaba 1.12 <dl class="switch">
1059     <dt>HTML <code>canvas</code> element</dt>
1060     <dd>Though the element is void in earlier versions of Safari,
1061     the <code>canvas</code> element is <em>no</em> longer
1062     defined as empty. There must be an end tag
1063 wakaba 1.15 <code class="html example">&lt;/canvas></code>.</dd>
1064 wakaba 1.12 </dl>
1065    
1066 wakaba 1.10 <p>Note that misnesting tags, such as
1067     <code class="bad example">&lt;a>&lt;b>&lt;/a>&lt;/b></code>, are not
1068     allowed and they also cause this error.</p>
1069 wakaba 1.3 </d:desc>
1070 wakaba 1.2 </d:item>
1071    
1072 wakaba 1.6 <d:item name="not first start tag"
1073 wakaba 1.29 class="parse-error"
1074     modules="HTML::Parser">
1075 wakaba 1.6 <d:message xml:lang="en">This <code>&lt;html></code> tag is not
1076     the first start tag.</d:message>
1077     <d:desc>
1078     <p>There is a start tag of the <code>html</code> element
1079     that it not the first start tag in the input stream.
1080     The document is non-conforming.</p>
1081    
1082     <p>In an HTML document, there cannot be more than one
1083     <code>html</code> element and therefore there cannot be
1084     more than one <code>&lt;html></code> tag. In addition,
1085     nothing can be placed before the <code>&lt;html></code> tag
1086     except a <code>DOCTYPE</code>, white space characters,
1087     and comments.</p>
1088     </d:desc>
1089     </d:item>
1090    
1091 wakaba 1.2 <d:item name="not HTML5"
1092 wakaba 1.29 class="parse-error"
1093     modules="HTML::Parser">
1094 wakaba 1.2 <d:message xml:lang="en">This document is written in an old version of
1095     HTML.</d:message>
1096 wakaba 1.3 <d:desc xml:lang="en">
1097     <p>The document contains a <code>DOCTYPE</code> declaration
1098 wakaba 1.6 that is different from HTML5 <code>DOCTYPE</code> (i.e.
1099 wakaba 1.15 <code class="example html">&lt;!DOCTYPE HTML&gt;</code>).
1100     The document is non‐conforming.</p>
1101 wakaba 1.3
1102     <p>The document might or might not be conformant to
1103     some version of HTML. However, conformance to any HTML
1104     specification other than HTML5 provides for no practical
1105     convenience, since Web borwsers will parse any
1106     HTML document (roughly) as defined in HTML5.</p>
1107     </d:desc>
1108 wakaba 1.2 </d:item>
1109    
1110 wakaba 1.29 <d:item name="start tag not allowed"
1111     class="parse-error"
1112     modules="HTML::Parser">
1113     <d:message xml:lang="en">Start tag <code>&lt;<var>{text}</var>></code> is
1114     not allowed here.</d:message>
1115     </d:item>
1116    
1117 wakaba 1.2 <d:item name="unmatched end tag"
1118 wakaba 1.29 class="parse-error"
1119     modules="HTML::Parser">
1120     <d:message xml:lang="en">Element <code><var>{text}</var></code> is not
1121 wakaba 1.2 opened.</d:message>
1122 wakaba 1.4 <d:desc>
1123     <p>An end tag appears though no element with the same name
1124     has been opened. The document is non-conforming.</p>
1125    
1126     <p>For any end tag in HTML document, there must be a
1127     corresponding start tag.</p>
1128 wakaba 1.12
1129     <dl class="switch">
1130     <dt>HTML <code>base</code>, <code>basefont</code>,
1131     <code>bgsound</code>, <code>br</code>, <code>col</code>,
1132     <code>embed</code>, <code>frame</code>, <code>hr</code>,
1133     <code>image</code>, <code>img</code>, <code>input</code>,
1134     <code>isindex</code>, <code>link</code>, <code>meta</code>,
1135     <code>param</code>, <code>spacer</code>, or <code>wbr</code> element</dt>
1136     <dd>End tag is not allowed for these elements, since
1137     those content must always be empty. Remove end tag.</dd>
1138     <!-- keygen -->
1139     <!-- command, event-source, nest, source -->
1140     </dl>
1141 wakaba 1.4 </d:desc>
1142 wakaba 1.2 </d:item>
1143    
1144     </section>
1145    
1146 wakaba 1.1 <section id="element-content-model-errors">
1147     <h2>Element Content Model Errors</h2>
1148    
1149 wakaba 1.30 <d:item name="basehref after URL attribute"
1150     modules="ContentChecker::HTML">
1151     <d:message xml:lang="en">The <code>base</code> element with the
1152     <code>href</code> attribute specified cannot be placed after
1153     any attribute with a URL.</d:message>
1154     </d:item>
1155    
1156     <d:item name="basetarget after hyperlink"
1157     modules="ContentChecker::HTML">
1158     <d:message xml:lang="en">The <code>base</code> element with the
1159     <code>target</code> attribute specified cannot be placed after
1160     any element that defines a hyperlink.</d:message>
1161     </d:item>
1162    
1163 wakaba 1.1 <d:item name="character not allowed"
1164 wakaba 1.32 modules="ContentChecker::HTML RDFXML">
1165 wakaba 1.1 <d:message xml:lang="en">Data character is not allowed in this
1166     context.</d:message>
1167     <d:desc xml:lang="en">
1168 wakaba 1.3 <p>A data character appears where it is not allowed in this
1169 wakaba 1.1 context. The document is non-conforming.</p>
1170    
1171     <p>Possible causes:
1172 wakaba 1.6 <ul>
1173     <li><p>A data character cannot be a child
1174     of certain sectioning elements such as <code>body</code>,
1175     <code>section</code>, and <code>blockquote</code>.</p>
1176    
1177     <p>Any inline-level content must be put
1178     in e.g. paragraph element such as <code>p</code>.</p></li>
1179     <li><p>Though some elements such as <code>div</code>,
1180     <code>li</code>, and <code>td</code> allow
1181     <em>either one</em> of block-level or inline-level content
1182     is allowed. If there is a block-level content,
1183     any inline-level content must be put
1184     in e.g. paragraph element such as <code>p</code>.</p></li>
1185     </ul>
1186 wakaba 1.1 </p>
1187     </d:desc>
1188     </d:item>
1189    
1190 wakaba 1.30 <d:item name="character not allowed:empty"
1191     modules="ContentChecker::HTML">
1192     <d:message xml:lang="en">Non‐white‐space characters are not allowed in
1193     an empty element.</d:message>
1194     </d:item>
1195    
1196 wakaba 1.31 <d:item name="character not allowed:atom|PersonConstruct"
1197     modules="ContentChecker::HTML">
1198     <d:message xml:lang="en">Non‐white‐space characters are not allowed in
1199     Person construct.</d:message>
1200     </d:item>
1201    
1202     <d:item name="character not allowed:atom|TextConstruct"
1203     modules="ContentChecker::HTML">
1204     <d:message xml:lang="en">Non‐white‐space characters are not allowed in
1205     Text construct.</d:message>
1206     </d:item>
1207    
1208 wakaba 1.1 <d:item name="child element missing"
1209 wakaba 1.31 modules="ContentChecker::HTML ContentChecker::Atom">
1210     <d:message xml:lang="en">There must be an element
1211     <code><var>{text}</var></code> as a child of this element.</d:message>
1212 wakaba 1.1 <d:desc xml:lang="en">
1213     <p>The content model of the element is so defined that it
1214     must contain a <code><var>$0</var></code> child element.
1215 wakaba 1.3 The document is non-conforming.</p>
1216 wakaba 1.1
1217 wakaba 1.12 <dl class="switch">
1218     <dt>HTML <code>head</code> element</dt>
1219     <dd>There must be a <code>title</code> child element.</dd>
1220     <dt>HTML <code>html</code> element</dt>
1221     <dd>There must be a <code>head</code> child element followed
1222     by a <code>body</code> element.</dd>
1223     <dt>HTML <code>tr</code> element</dt>
1224     <dd><a href="#child-element-missing:td%7Cth">There must be
1225     one or more <code>td</code> or <code>th</code> child element.</a></dd>
1226     </dl>
1227 wakaba 1.1 </d:desc>
1228     </d:item>
1229    
1230     <d:item name="child element missing:td|th"
1231     class="content-model-error">
1232     <d:message xml:lang="en">There must be a <code>td</code>
1233     or <code>th</code> element as a child of this element.</d:message>
1234     <d:desc xml:lang="en">
1235     <p>The <code>tr</code> element must contain at least one
1236 wakaba 1.3 <code>td</code> or <code>th</code> child element. The document
1237     is non-conforming.</p>
1238 wakaba 1.1 </d:desc>
1239     </d:item>
1240    
1241 wakaba 1.31 <d:item name="child element missing:atom"
1242     modules="ContentChecker::HTML">
1243     <d:message xml:lang="en">There must be an element
1244     <code><var>{text}</var></code> in the Atom namespace as a child of this
1245     element.</d:message>
1246     </d:item>
1247    
1248     <d:item name="child element missing:atom:link:alternate"
1249     modules="ContentChecker::HTML">
1250     <d:message xml:lang="en">There must be an Atom <code>link</code> element
1251     whose <code>rel</code> attribute is set to <code>alternate</code> as a
1252 wakaba 1.32 child of this element.</d:message>
1253 wakaba 1.31 </d:item>
1254    
1255     <d:item name="child element missing:atom:link:self"
1256     modules="ContentChecker::HTML">
1257     <d:message xml:lang="en">There should be an Atom <code>link</code> element
1258     whose <code>rel</code> attribute is set to <code>self</code> as a
1259 wakaba 1.32 child of this element.</d:message>
1260 wakaba 1.31 </d:item>
1261    
1262 wakaba 1.30 <d:item name="element missing:hn"
1263     modules="ContentChecker::HTML">
1264     <d:message xml:lang="en">There must be at least one
1265     <code>h<var>n</var></code> element descendant.</d:message>
1266     </d:item>
1267    
1268 wakaba 1.1 <d:item name="element not allowed"
1269 wakaba 1.32 modules="ContentChecker::HTML ContentChecker::Atom RDFXML">
1270 wakaba 1.1 <d:message xml:lang="en">This element is not allowed in this
1271     context.</d:message>
1272     <d:desc xml:lang="en">
1273 wakaba 1.3 <p>An element appears where it is not allowed. The document
1274 wakaba 1.1 is non-conforming.</p>
1275    
1276     <p>Possible causes:
1277 wakaba 1.6 <dl class="switch">
1278     <dt>If the element with the error is an inline-level element,
1279     such as <code>a</code>, <code>progress</code>, or <code>img</code></dt>
1280 wakaba 1.1 <dd><p>An inline-level element cannot be a child
1281     of certain sectioning elements such as <code>body</code>,
1282     <code>section</code>, and <code>blockquote</code>.</p>
1283    
1284     <p>Any inline-level content must be put
1285     in e.g. paragraph element such as <code>p</code>.</p></dd>
1286 wakaba 1.9 <dt>If it is a block-level elements, such as <code>aside</code>,
1287     <code>div</code>, <code>h<var>n</var></code>,
1288     <code>p</code>, or <code>section</code></dt>
1289     <dd><dl class="switch">
1290     <dt>If the parent element is <code>div</code>,
1291     <code>li</code>, <code>td</code>, or <code>th</code></dt>
1292     <!-- @@ TODO: more... -->
1293     <!-- @@ TODO: <p><ul><li><p> -->
1294     <dd><p>The parent element allows <em>either</em>
1295     block-level or inline-level content. If there is a
1296     block-level content, any inline-level content must be
1297     put in e.g. paragraph element such as <code>p</code>.</p>
1298     <p>For example, an HTML document fragment
1299 wakaba 1.15 <code class="html bad example">&lt;div>&lt;p>Hello!&lt;/p> World!&lt;/div></code>
1300 wakaba 1.9 is non-conforming, since a word <q>World!</q> does not belong
1301     to any paragraph. (If not part of any paragraph, what is
1302     it!?) A conforming example would be:
1303 wakaba 1.15 <pre class="html example"><code>&lt;div>&lt;p>Hello!&lt;/p> &lt;p>World!&lt;/p>&lt;/div></code></pre>
1304 wakaba 1.9 </p></dd>
1305     <dt>If the parent element does <em>not</em> allow
1306     block-level elements as content</dt>
1307     <dd>The element is not allowed to be inserted here.
1308     For example, a <code>div</code> element cannot be
1309     a child of an <code>h1</code> element.</dd>
1310     </dl></dd>
1311 wakaba 1.6 <dt>If the element with the error is a <code>noscript</code> element</dt>
1312     <dd>The <code>noscript</code> element is allowed only in the context
1313     where a block-level or inline-level content is expected
1314     and in the <code>head</code> element.
1315     It cannot be used in e.g. <code>ul</code>, <code>table</code>,
1316     or <code>select</code>.</dd>
1317 wakaba 1.8 <dt>If the element with the error is <code>blink</code>,
1318     <code>center</code>, or <code>marquee</code> element</dt>
1319     <dd>These elements are not part of the HTML standard.
1320     Use CSS for styling control.</dd>
1321 wakaba 1.9
1322 wakaba 1.11 <dt><code>button</code>, <code>datalist</code>,
1323     <code>fieldset</code>, <code>form</code>,
1324 wakaba 1.9 <code>input</code>, <code>label</code>,
1325     <code>optgroup</code>, <code>option</code>, <code>output</code>,
1326     <code>rb</code>, <code>rp</code>, <code>rt</code>, <code>ruby</code>,
1327     <code>textarea</code>, or <code>textarea</code> element</dt>
1328     <!-- rbc, rtc ? -->
1329     <dd>These elements are intentionally not supported by the conformance
1330     checker <em>yet</em>.</dd>
1331 wakaba 1.1 </dl>
1332     </p>
1333     </d:desc>
1334     </d:item>
1335    
1336 wakaba 1.30 <d:item name="element not allowed:area"
1337     modules="ContentChecker ContentChecker::HTML">
1338     <d:message xml:lang="en">An <code>area</code> element cannot be used
1339     outside of a <code>map</code> element.</d:message>
1340     </d:item>
1341    
1342     <d:item name="element not allowed:base"
1343     modules="ContentChecker ContentChecker::HTML">
1344     <d:message xml:lang="en">There is another <code>base</code>
1345     element.</d:message>
1346     </d:item>
1347    
1348     <d:item name="element not allowed:datatemplate"
1349     modules="ContentChecker ContentChecker::HTML">
1350     <d:message xml:lang="en">In a <code>datatemplate</code> element, only
1351     <code>rule</code> elements are allowed.</d:message>
1352     </d:item>
1353    
1354     <d:item name="element not allowed:details legend"
1355     modules="ContentChecker::HTML">
1356     <d:message xml:lang="en">In a <code>details</code> element, only at the
1357     beginning of the element a <code>lengend</code> element
1358     may be used.</d:message>
1359     </d:item>
1360    
1361     <d:item name="element not allowed:empty"
1362 wakaba 1.31 modules="ContentChecker::HTML ContentChecker::Atom">
1363 wakaba 1.30 <d:message xml:lang="en">Elements are not allowed in an empty
1364     element.</d:message>
1365     </d:item>
1366    
1367     <d:item name="element not allowed:figure legend"
1368     modules="ContentChecker::HTML">
1369     <d:message xml:lang="en">In a <code>figure</code> element, only at the
1370     beginning or only at the end of the element a <code>lengend</code> element
1371     may be used.</d:message>
1372     </d:item>
1373    
1374     <d:item name="element not allowed:flow"
1375     modules="ContentChecker::HTML">
1376     <d:message xml:lang="en">This element is not allowed where flow
1377     content is expected.</d:message>
1378     </d:item>
1379    
1380     <d:item name="element not allowed:flow style"
1381     modules="ContentChecker::HTML">
1382     <d:message xml:lang="en">A <code>style</code> element without
1383     <code>scoped</code> attribute is not allowed in this context.</d:message>
1384     </d:item>
1385    
1386     <d:item name="element not allowed:head noscript"
1387     modules="ContentChecker::HTML">
1388     <d:message xml:lang="en">This element is not allowed in a
1389     <code>noscript</code> element in the <code>head</code> element.</d:message>
1390     </d:item>
1391    
1392     <d:item name="element not allowed:head style"
1393     modules="ContentChecker::HTML">
1394     <d:message xml:lang="en">A <code>style</code> element with
1395     <code>scoped</code> attribute is not allowed in the <code>head</code>
1396     element.</d:message>
1397     </d:item>
1398    
1399     <d:item name="element not allowed:head title"
1400     modules="ContentChecker ContentChecker::HTML">
1401     <d:message xml:lang="en">There is another <code>title</code>
1402     element.</d:message>
1403     </d:item>
1404    
1405     <d:item name="element not allowed:minus"
1406     modules="ContentChecker ContentChecker::HTML">
1407     <d:message xml:lang="en">This element is not allowed in this
1408     context.</d:message>
1409     </d:item>
1410    
1411     <d:item name="element not allowed:meta charset"
1412     modules="ContentChecker::HTML">
1413     <d:message xml:lang="en">The character encoding declaration must be the
1414     first element in the <code>head</code> element.</d:message>
1415     </d:item>
1416    
1417     <d:item name="element not allowed:metadata"
1418     modules="ContentChecker::HTML">
1419     <d:message xml:lang="en">This element is not allowed where metadata
1420     content is expected.</d:message>
1421     </d:item>
1422    
1423     <d:item name="element not allowed:phrasing"
1424     modules="ContentChecker::HTML">
1425     <d:message xml:lang="en">This element is not allowed where phrasing
1426     content is expected.</d:message>
1427     </d:item>
1428    
1429 wakaba 1.12 <d:item name="element not allowed:root"
1430 wakaba 1.30 modules="ContentChecker">
1431     <d:message xml:lang="en">This element is not allowed as the root
1432     element of a document.</d:message>
1433 wakaba 1.12 <d:desc xml:lang="en">
1434     <p>An element that is not allowed as the root element
1435     is used as the root element of the document. The document is
1436     non-conforming, as far as the conformance checker can tell.</p>
1437    
1438     <dl class="switch">
1439     <dt><code>html</code> element in an XHTML document</dt>
1440 wakaba 1.15 <dd><p>In <abbr>XHTML</abbr> document, the root <code>html</code>
1441     element must have an <code>xmlns</code> attribute as:
1442     <pre class="xml example"><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"></code></pre></p></dd>
1443 wakaba 1.12 <dt><code>rss</code> element</dt>
1444     <dd><p>The document is written in some version of RSS.</p>
1445     <p>The conformance checker does not support any version
1446     of RSS. Use Atom 1.0 for feed documents.</p></dd>
1447     <dt><code>feed</code> element</dt>
1448     <dd><p>The Atom <code>feed</code> element must be
1449 wakaba 1.15 in the <code>http://www.w3.org/2005/Atom</code>
1450     namespace as:
1451     <pre class="xml example"><code>&lt;feed xmlns="http://www.w3.org/2005/Atom"></code></pre>
1452     </p>
1453 wakaba 1.12 <p>The conformance checker does not support Atom 0.3.
1454     Use Atom 1.0 for feed documents.</p></dd>
1455     </dl>
1456     </d:desc>
1457     </d:item>
1458    
1459 wakaba 1.30 <d:item name="element not allowed:root:xml"
1460     modules="ContentChecker">
1461     <d:message xml:lang="en">This element is not allowed as the root element
1462     of an XML document.</d:message>
1463     </d:item>
1464    
1465     <d:item name="element not allowed:ruby base"
1466     modules="ContentChecker">
1467     <d:message xml:lang="en">This element is not allowed in the <code>ruby</code>
1468     element.</d:message>
1469     </d:item>
1470    
1471     <d:item name="element not allowed:text"
1472     modules="ContentChecker::HTML">
1473     <d:message xml:lang="en">This element is not allowed in this
1474     context.</d:message>
1475     </d:item>
1476    
1477 wakaba 1.31 <d:item name="element not allowed:atom|content"
1478     modules="ContentChecker::Atom">
1479     <d:message xml:lang="en">This element is not allowed in an Atom
1480     <code>content</code> element.</d:message>
1481     </d:item>
1482    
1483     <d:item name="element not allowed:atom|PersonConstruct"
1484     modules="ContentChecker::Atom">
1485     <d:message xml:lang="en">This element is not allowed in Person
1486     construct.</d:message>
1487     </d:item>
1488    
1489     <d:item name="element not allowed:atom|TextConstruct"
1490     modules="ContentChecker::Atom">
1491     <d:message xml:lang="en">This element is not allowed in Text
1492     construct.</d:message>
1493     </d:item>
1494    
1495 wakaba 1.30 <d:item name="element not defined"
1496     modules="ContentChecker">
1497     <d:message xml:lang="en">This element is not defined.</d:message>
1498     </d:item>
1499    
1500     <d:item name="no significant content"
1501     modules="ContentChecker::HTML">
1502     <d:message xml:lang="en">No significant content is contained
1503     in this element.</d:message>
1504     </d:item>
1505    
1506     <d:item name="no significant content before"
1507     modules="ContentChecker::HTML">
1508     <d:message xml:lang="en">There is no significant content
1509     before this element.</d:message>
1510     </d:item>
1511    
1512     <d:item name="no significant content at the end"
1513     modules="ContentChecker::HTML">
1514     <d:message xml:lang="en">No significant content is contained
1515     at the end of this element.</d:message>
1516     </d:item>
1517    
1518 wakaba 1.6 <d:item name="ps element missing"
1519 wakaba 1.30 modules="ContentChecker::HTML">
1520     <d:message xml:lang="en">There is no <code><var>{text}</var></code>
1521 wakaba 1.6 element before this element.</d:message>
1522     <d:desc xml:lang="en">
1523     <p>There must be an element before another element, but there
1524     is not. The document is non-conforming.</p>
1525    
1526     <p>For example, there must be a <code>dt</code> element
1527     before any <code>dd</code> element.</p>
1528     </d:desc>
1529     </d:item>
1530    
1531 wakaba 1.30 <d:item name="rp:syntax error"
1532     modules="ContentChecker::HTML">
1533     <d:message xml:lang="en">The content of a <code>rp</code> element must
1534     be a parenthesis.</d:message>
1535     </d:item>
1536    
1537 wakaba 1.2 </section>
1538    
1539 wakaba 1.3 <section id="attribute-errors">
1540     <h2>Attribute Errors</h2>
1541    
1542     <d:item name="attribute missing"
1543 wakaba 1.30 modules="ContentChecker::HTML">
1544     <d:message xml:lang="en">Required attribute <code><var>{text}</var></code>
1545 wakaba 1.3 is not specified.</d:message>
1546     <d:desc>
1547     <p>A required attribute is not specified. The document
1548     is non-conforming.</p>
1549    
1550     <p>Some attribute is defined as <i>required</i>.
1551     Without required attributes specified, user agents
1552 wakaba 1.9 cannot provide full functionality of the element to the user.</p>
1553    
1554     <dl class="switch">
1555     <dt>HTML <code>img</code> element</dt>
1556     <dd>The <code>src</code> attribute must be specified.
1557     Additionally, the <code>alt</code> attribute must be specified
1558     in many cases.</dd>
1559     <dt>HTML <code>link</code> element</dt>
1560     <dd>The <code>rel</code> attribute must be specified.
1561     Note that the <code>rev</code> attribute is obsolete.</dd>
1562     </dl>
1563 wakaba 1.3 </d:desc>
1564     </d:item>
1565    
1566 wakaba 1.30 <d:item name="attribute missing:data|type"
1567     modules="ContentChecker::HTML">
1568     <d:message xml:lang="en">For an <code>object</code> at least one of
1569     <code>data</code> and <code>type</code> attributes must be
1570     specified.</d:message>
1571     </d:item>
1572    
1573     <d:item name="attribute missing:href|target"
1574     modules="ContentChecker::HTML">
1575     <d:message xml:lang="en">For a <code>base</code> element, at least one of
1576     <code>href</code> and <code>target</code> attributes must be
1577     specified.</d:message>
1578     </d:item>
1579    
1580     <d:item name="attribute missing:name|http-equiv"
1581     modules="ContentChecker::HTML">
1582     <d:message xml:lang="en">For a <code>meta</code> element with the
1583     <code>content</code> attribute specified, exactly one of
1584     <code>name</code> and <code>http-equiv</code> attributes must be
1585     specified.</d:message>
1586     </d:item>
1587    
1588     <d:item name="attribute missing:name|http-equiv|charset"
1589     modules="ContentChecker::HTML">
1590     <d:message xml:lang="en">For a <code>meta</code> element, exactly one of
1591     <code>name</code>, <code>http-equiv</code>, and <code>charset</code>
1592     attributes must be specified.</d:message>
1593     </d:item>
1594    
1595     <d:item name="attribute not allowed"
1596 wakaba 1.32 modules="ContentChecker::HTML RDFXML">
1597 wakaba 1.8 <d:message xml:lang="en">Attribute
1598     <code><var>{local-name}</var></code> is not allowed for
1599     <code><var>{element-local-name}</var></code> element.</d:message>
1600     <d:desc xml:lang="en">
1601     <p>An attribute is specified where it is not allowed.
1602     The document is non-conforming.</p>
1603    
1604     <dl>
1605     <dt>HTML <code>meta</code> element</dt>
1606     <dd>For HTML <code>meta</code> element, <em>only one</em> of
1607     <code>name</code>, <code>http-equiv</code>, or <code>charset</code>
1608     attribute is allowed.</dd>
1609     </dl>
1610     </d:desc>
1611     </d:item>
1612    
1613 wakaba 1.30 <d:item name="attribute not allowed:ismap"
1614     modules="ContentChecker::HTML">
1615     <d:message xml:lang="en">The <code>ismap</code> attribute may only be
1616     used for the image contained in an <code>a</code> element.</d:message>
1617     </d:item>
1618    
1619     <d:item name="attribute not defined"
1620     modules="ContentChecker">
1621     <d:message xml:lang="en">This attribute is not defined.</d:message>
1622     </d:item>
1623    
1624 wakaba 1.3 <d:item name="in HTML:xml:lang"
1625 wakaba 1.30 class="attribute-error"
1626     modules="ContentChecker::XML">
1627 wakaba 1.3 <d:message xml:lang="en">The <code>xml:lang</code> attribute is not
1628     allowed in HTML document.</d:message>
1629 wakaba 1.8 <d:desc xml:lang="en">
1630 wakaba 1.3 <p>The <code>xml:lang</code> attribute is not allowed in
1631     HTML document. The document is non-conforming.</p>
1632    
1633 wakaba 1.9 <p>Use of the <code>xml:lang</code> attribute is conforming
1634     <em>only</em> in XML documents.</p>
1635 wakaba 1.3
1636     <p>To specify natural language information in HTML document,
1637     use <code>lang</code> attribute instead.</p>
1638 wakaba 1.6
1639     <p>XHTML 1.0 Appendix C was encouraged to specify both
1640     <code>lang</code> and <code>xml:lang</code> attributes with
1641     the same value. Such a duplication has <em>no effect</em> in practice.
1642     Use only one of <code>lang</code> (in HTML) or <code>xml:lang</code> (in
1643     XML).</p>
1644    
1645 wakaba 1.3 <!-- @@ ISSUE: xml:lang in non-HTML element in DOM5 HTML created
1646     from an HTML document? -->
1647     </d:desc>
1648     </d:item>
1649    
1650     <d:item name="in XML:charset"
1651 wakaba 1.30 modules="ContentChecker::HTML">
1652 wakaba 1.3 <d:message xml:lang="en">The <code>charset</code> attribute is not
1653     allowed in XML document.</d:message>
1654     <d:desc>
1655     <p>The <code>charset</code> attribute of a
1656     <code>meta</code> element is not allowed in XML document.
1657     The document is non-conforming.</p>
1658    
1659     <p>To specify the character encoding used for serialization,
1660     if necessary, use XML declaration instead:
1661     <pre class="xml example"><code>&lt;?xml version="1.0" encoding="<var>encoding-name</var>"?></code></pre>
1662     </p>
1663     </d:desc>
1664     </d:item>
1665    
1666     <d:item name="in XML:lang"
1667 wakaba 1.30 modules="ContentChecker::HTML">
1668 wakaba 1.3 <d:message xml:lang="en">The <code>lang</code> attribute is not
1669     allowed in XML document.</d:message>
1670     <d:desc>
1671     <p>The HTML <code>lang</code> attribute is not allowed in
1672     XML document. The document is non-conforming.</p>
1673    
1674     <p>The <code>lang</code> attribute in <code>null</code>
1675 wakaba 1.9 namespace for HTML elements is conforming <em>only</em> in
1676     HTML documents.</p>
1677 wakaba 1.3
1678     <p>To specify natural language information in XML document,
1679     use <code>xml:lang</code> attribute instead.</p>
1680     </d:desc>
1681     </d:item>
1682    
1683 wakaba 1.30 <d:item name="in XML:noscript"
1684     modules="ContentChecker::HTML">
1685     <d:message xml:lang="en">A <code>noscript</code> element cannot be
1686     used in XML document.</d:message>
1687     </d:item>
1688    
1689 wakaba 1.3 <d:item name="in XML:xmlns"
1690 wakaba 1.30 modules="ContentChecker::HTML">
1691 wakaba 1.3 <d:message xml:lang="en">The <code>xmlns</code> attribute
1692     in the <code>null</code> namespace is not allowed in
1693     XHTML document. The document is non-conforming.</d:message>
1694     <d:desc>
1695     <p>The <code>xmlns</code> attribute in the <code>null</code>
1696     namespace is not allowed in XHTML document.</p>
1697    
1698 wakaba 1.8 <p>This error should not occur in conformance-checking of
1699 wakaba 1.3 static documents.</p>
1700     </d:desc>
1701     </d:item>
1702    
1703     </section>
1704    
1705 wakaba 1.2 <section id="attribute-value-errors">
1706     <h2>Attribute Value Errors</h2>
1707 wakaba 1.1
1708 wakaba 1.30 <d:item name="boolean:invalid"
1709     modules="ContentChecker::HTML">
1710     <d:message xml:lang="en">Attribute value <code><var>{@}</var></code>
1711     is not allowed. It must be an empty string or a string
1712     <code><var>{local-name}</var></code>.</d:message>
1713     </d:item>
1714    
1715     <d:item name="char:syntax error"
1716     modules="ContentChecker::HTML">
1717     <d:message xml:lang="en">The attribute value must be exactly one
1718     character.</d:message>
1719     </d:item>
1720    
1721     <d:item name="charref in charset"
1722     modules="ContentChecker::HTML">
1723     <d:message xml:lang="en">A character reference cannot be used to
1724     represent a character encoding name.</d:message>
1725     </d:item>
1726    
1727     <d:item name="charset:not preferred"
1728     modules="ContentChecker::HTML">
1729     <d:message xml:lang="en">Character encoding name
1730     <code><var>{value}</var></code> is not the preferred name of that
1731     character encoding.</d:message>
1732     </d:item>
1733    
1734     <d:item name="charset:not registered"
1735     modules="ContentChecker::HTML">
1736     <d:message xml:lang="en">Character encoding name
1737     <code><var>{value}</var></code> is not a registered name.</d:message>
1738 wakaba 1.17 <d:desc xml:lang="en">
1739     <p>The specified character encoding name is not registered to
1740     <abbr>IANA</abbr>. Use of registered character encoding name
1741     is a good practice to facilitate interoperability.</p>
1742    
1743     <dl class="switch">
1744     <dt><code>EUC-TW</code></dt>
1745     <dd><code>EUC-TW</code> is not registered. Unfortunately, there
1746     is no registered name for that character encoding. Use
1747     Big5 encoding with character encoding name <code>Big5</code>
1748     if it is enough to represent the document.</dd>
1749     <dt><code>ISO-2022-JP-1</code></dt>
1750     <dd><code>ISO-2022-JP-1</code> is not registered, nevertheless
1751     this character encoding name is documented in
1752     <a href="urn:ietf:rfc:2237"><abbr>RFC</abbr> 2237</a>. Use
1753     <code>ISO-2022-JP-2</code> instead, since that character encoding
1754     is a superset of ISO-2022-JP-1.</dd>
1755     <dt><code>ISO-2022-JP-3</code>, <code>ISO-2022-JP-3-plane1</code></dt>
1756     <dd>These names are not registered and obsoleted in favor of
1757     <code>ISO-2022-JP-2004</code> and
1758     <code>ISO-2022-JP-2004-plane1</code>.</dd>
1759     <dt><code>ISO-2022-JP-2003</code>,
1760     <code>ISO-2022-JP-2003-plane1</code></dt>
1761     <dd>These names are not registered and corrected to
1762     <code>ISO-2022-JP-2004</code> and
1763     <code>ISO-2022-JP-2004-plane1</code>.</dd>
1764     <dt><code>ISO-2022-JP-2004</code>,
1765     <code>ISO-2022-JP-2004-plane1</code></dt>
1766     <dd>These names are not registered. Unfortunately, there is
1767     no registered name for these character encodings.</dd>
1768     <dt><code>UTF-8N</code></dt>
1769     <dd><code>UTF-8N</code> is not registered. Character encoding
1770     name <code>UTF-8</code> represents UTF-8 encoding with or
1771     without <abbr>BOM</abbr>.</dd>
1772     </dl>
1773    
1774     <p><strong>WARNING</strong>: This error might be raised for
1775     a registered character encoding name, since the character encoding
1776     name database of the conformance checker is not complete yet.</p>
1777     </d:desc>
1778     </d:item>
1779    
1780 wakaba 1.30 <d:item name="charset:private"
1781     modules="ContentChecker::HTML">
1782     <d:message xml:lang="en">Character encoding name
1783     <code><var>{value}</var></code> is a private name.</d:message>
1784 wakaba 1.17 <d:desc xml:lang="en">
1785     <p>The specified character encoding name is a private name and
1786     not registered to <abbr>IANA</abbr>. Use of registered character
1787     encoding name is a good practice to facilitate interoperability.</p>
1788    
1789     <dl class="switch">
1790     <dt><code>x-euc-jp</code></dt>
1791     <dd>Use <code>EUC-JP</code> for the Japanese <abbr>EUC</abbr>
1792     character encoding.</dd>
1793     <dt><code>x-sjis</code></dt>
1794     <dd>Use <code>Shift_JIS</code> for standard Shift encoding scheme of
1795     <abbr>JIS</abbr> coded character set, or <code>Windows-31J</code>
1796     for Microsoft standard character set as implemented by
1797     Microsoft Windows.</dd>
1798     </dl>
1799     </d:desc>
1800     </d:item>
1801    
1802 wakaba 1.30 <d:item name="charset:syntax error"
1803     modules="ContentChecker::HTML">
1804     <d:message xml:lang="en">The specified value <code><var>{value}</var></code>
1805     is syntactically not a character encoding name.</d:message>
1806 wakaba 1.17 <d:desc xml:lang="en">
1807     <p>The attribute value must be a character encoding name. However,
1808     the specified value is not a character encoding name syntactically.
1809     The document is non‐conforming.</p>
1810     <p>Character encoding name is a string of <abbr>ASCII</abbr>
1811     printable characters, up to 40 characters.</p>
1812     </d:desc>
1813     </d:item>
1814    
1815 wakaba 1.30 <d:item name="color:syntax error"
1816     modules="ContentChecker::HTML">
1817     <d:message xml:lang="en">The specified value is not a color
1818     name or hexadecimal color number.</d:message>
1819     </d:item>
1820    
1821     <d:item name="coords:number not 3"
1822     modules="ContentChecker::HTML">
1823     <d:message xml:lang="en">The <code>coords</code> attribute have to
1824     contain three (3) numbers (specified:
1825     <code><var>{text}</var></code>).</d:message>
1826     </d:item>
1827    
1828     <d:item name="coords:number not 4"
1829     modules="ContentChecker::HTML">
1830     <d:message xml:lang="en">The <code>coords</code> attribute have to
1831     contain four (4) numbers (specified:
1832     <code><var>{text}</var></code>).</d:message>
1833     </d:item>
1834    
1835     <d:item name="coords:number lt 6"
1836     modules="ContentChecker::HTML">
1837     <d:message xml:lang="en">The <code>coords</code> attribute have to
1838     contain more than or equal to six (6) numbers (specified:
1839     <code><var>{text}</var></code>).</d:message>
1840     </d:item>
1841    
1842     <d:item name="coords:number not even"
1843     modules="ContentChecker::HTML">
1844     <d:message xml:lang="en">The <code>coords</code> attribute have to
1845     contain even number of numbers (specified:
1846     <code><var>{text}</var></code>).</d:message>
1847     </d:item>
1848    
1849     <d:item name="coords:out of range"
1850     modules="ContentChecker::HTML">
1851     <d:message xml:lang="en">The specified value <code><var>{value}</var></code>
1852     is out of range.</d:message>
1853     </d:item>
1854    
1855     <d:item name="coords:syntax error"
1856     modules="ContentChecker::HTML">
1857     <d:message xml:lang="en">The specified value is not valid.</d:message>
1858     </d:item>
1859    
1860     <d:item name="datetime:bad year"
1861     modules="ContentChecker::HTML">
1862     <d:message xml:lang="en">Year number is out of range.</d:message>
1863     </d:item>
1864    
1865     <d:item name="datetime:bad month"
1866     modules="ContentChecker::HTML">
1867     <d:message xml:lang="en">Month number is out of range.</d:message>
1868     </d:item>
1869    
1870     <d:item name="datetime:bad day"
1871     modules="ContentChecker::HTML">
1872     <d:message xml:lang="en">Day number is out of range.</d:message>
1873     </d:item>
1874    
1875     <d:item name="datetime:bad hour"
1876     modules="ContentChecker::HTML">
1877     <d:message xml:lang="en">Hour number is out of range.</d:message>
1878     </d:item>
1879    
1880     <d:item name="datetime:bad minute"
1881     modules="ContentChecker::HTML">
1882     <d:message xml:lang="en">Minute number is out of range.</d:message>
1883     </d:item>
1884    
1885     <d:item name="datetime:bad second"
1886     modules="ContentChecker::HTML">
1887     <d:message xml:lang="en">Second number is out of range.</d:message>
1888     </d:item>
1889    
1890     <d:item name="datetime:bad timezone hour"
1891     modules="ContentChecker::HTML">
1892     <d:message xml:lang="en">Hour number of the timezone component is out of
1893     range.</d:message>
1894     </d:item>
1895    
1896     <d:item name="datetime:bad timezone minute"
1897     modules="ContentChecker::HTML">
1898     <d:message xml:lang="en">Minute number of the timezone component is out of
1899     range.</d:message>
1900     </d:item>
1901    
1902     <d:item name="datetime:syntax error"
1903     modules="ContentChecker::HTML">
1904     <d:message xml:lang="en">The attribute value is not a datetime.</d:message>
1905     </d:item>
1906    
1907     <d:item name="dateortime:syntax error"
1908     modules="ContentChecker::HTML">
1909     <d:message xml:lang="en">The attribute value is not a date or
1910     time.</d:message>
1911     </d:item>
1912    
1913 wakaba 1.2 <d:item name="enumerated:invalid"
1914 wakaba 1.30 modules="ContentChecker::HTML">
1915 wakaba 1.2 <d:message xml:lang="en">This attribute only allow a limited set of
1916 wakaba 1.6 values and the specified value <code><var>{@}</var></code> is not one
1917     of them.</d:message>
1918 wakaba 1.8 <d:desc xml:lang="en">
1919     <p>For this attribute only several values are allowed and the
1920     value of the attribute is not one of them. The document
1921     is non-conforming.</p>
1922    
1923     <dl>
1924     <dt>HTML <code>meta</code> element, <code>http-equiv</code> attribute</dt>
1925 wakaba 1.15 <dd><p>Only values <code>Default-Style</code> and <code>Refresh</code>
1926     are allowed.</p>
1927 wakaba 1.8 <p>Value <code>Content-Type</code> is obsolete; for charset
1928     declaration, the <code>charset</code> attribute can be used as:
1929     <pre class="html example"><code>&lt;meta charset="<var>charset-name</var>"></code></pre>
1930     ... where <var>charset-name</var> is a name of the character encoding
1931     of the document, such as <code>utf-8</code>.</p>
1932     <p>Values <code>Content-Style-Type</code> and
1933     <code>Content-Script-Type</code> are currently not allowed.</p>
1934     <p>Value <code>Keywords</code> is not allowed. Use
1935     <code>name</code> attribute instead of <code>http-equiv</code>
1936     attribute.</p>
1937     <p>Values <code>Expires</code>, <code>Pragma</code>,
1938     and <code>Cache-Control</code> are not allowed;
1939     use <em>real</em> HTTP header fields for cache control.</p></dd>
1940     </dl>
1941     </d:desc>
1942 wakaba 1.2 </d:item>
1943    
1944 wakaba 1.14 <d:item name="enumerated:invalid:http-equiv:content-type"
1945     class="attribute-value-error">
1946 wakaba 1.16 <d:message xml:lang="en">Character encoding declaration syntax
1947 wakaba 1.15 <code class="html bad example">&lt;meta http-equiv="Content-Type" content="text/html; charset=<var>charset-name</var>"></code>
1948 wakaba 1.14 is obsolete.</d:message>
1949     <d:desc xml:lang="en">
1950 wakaba 1.16 <p>Old long character encoding declaration syntax
1951 wakaba 1.15 <code class="html bad example">&lt;meta h