/[suikacvs]/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.44 - (hide annotations) (download) (as text)
Thu Sep 11 09:13:57 2008 UTC (17 years, 10 months ago) by wakaba
Branch: MAIN
Changes since 1.43: +46 -1 lines
File MIME type: text/xml
++ ChangeLog	11 Sep 2008 09:13:08 -0000
2008-09-11  Wakaba  <wakaba@suika.fam.cx>

	* error-description-source.xml: Unicode checker
	errors are added.

++ html/WebHACC/Language/ChangeLog	11 Sep 2008 09:13:53 -0000
2008-09-11  Wakaba  <wakaba@suika.fam.cx>

	* HTML.pm: Support for the Unicode character checking.

++ html/WebHACC/ChangeLog	11 Sep 2008 09:13:31 -0000
2008-09-11  Wakaba  <wakaba@suika.fam.cx>

	* Result.pm (generate_result_section): Initial
	support for the charset layer.

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 wakaba 1.43 <d:item name="fallback-char-error"
60     modules="Charset::DecodeHandle">
61     <d:message xml:lang="en">Octet sequence <code><var>{octets}</var></code>
62     is not an allowed representation of the character
63     <code><var>{char}</var></code> &#x2014; character reference
64     <code><var>{char:hexref}</var></code> should be used instead.</d:message>
65     <!-- HTML5 parse error -->
66     </d:item>
67    
68     <d:item name="fallback-unassigned-error"
69     modules="Charset::DecodeHandle">
70     <d:message xml:lang="en">No character is assigned to octet sequence
71     <code><var>{octets}</var></code>.</d:message>
72     <!-- HTML5 parse error -->
73     </d:item>
74    
75     <d:item name="illegal-octets-error"
76     modules="Charset::DecodeHandle">
77     <d:message xml:lang="en">Octet sequence <code><var>{octets}</var></code>
78     is illegal.</d:message>
79     </d:item>
80    
81     <d:item name="invalid-state-error"
82     modules="Charset::DecodeHandle::ISO2022JP">
83     <!-- TODO: more user-friendly error message is desired... -->
84     <d:message xml:lang="en">The input stream is broken.</d:message>
85     <d:desc xml:lang="en">
86     <p>The input stream is encoded in <code>ISO-2022-JP</code>
87     or its variant but is partially broken.</p>
88    
89     <p>Note that an <code>ISO-2022-JP</code> stream must end in the ASCII
90     state.</p>
91     </d:desc>
92     </d:item>
93    
94     <d:item name="unassigned-code-point-error"
95     modules="Charset::DecodeHandle">
96     <d:message xml:lang="en">No character is assigned to octet sequence
97     <code><var>{octets}</var></code>.</d:message>
98 wakaba 1.23 </d:item>
99     </section>
100    
101 wakaba 1.16 <section id="html5-character-encoding">
102     <h2>HTML5 Character Encoding Errors</h2>
103    
104 wakaba 1.30 <d:item name="disallowed character encoding"
105     modules="ContentChecker">
106     <d:message xml:lang="en">Character encoding <code><var>{text}</var></code>
107 wakaba 1.16 is not allowed for <abbr>HTML</abbr> document.</d:message>
108     <d:desc xml:lang="en">
109     <p>The character encoding used for the document is not allowed
110     for <abbr>HTML</abbr> document. The document is non‐conforming.</p>
111     </d:desc>
112     </d:item>
113    
114 wakaba 1.30 <d:item name="bad character encoding"
115     modules="ContentChecker">
116     <d:message xml:lang="en">Character encoding <code><var>{text}</var></code>
117 wakaba 1.16 should not be used for <abbr>HTML</abbr> document.</d:message>
118     <d:desc xml:lang="en">
119     <p>The character encoding used for the document is not recommended
120     for <abbr>HTML</abbr> document. The document is non‐conforming
121     unless there is any good reason to use that encoding.</p>
122     </d:desc>
123     </d:item>
124    
125 wakaba 1.30 <d:item name="non-utf-8 character encoding"
126     modules="ContentChecker">
127     <d:message xml:lang="en">Use of UTF-8 is encouraged (this document
128     is encoded in <code><var>{text}</var></code>).</d:message>
129 wakaba 1.16 <d:desc xml:lang="en">
130     <p>Use of UTF-8 as the character encoding of the document is encouraged,
131 wakaba 1.21 though the use of another character encoding is still conforming.</p>
132 wakaba 1.16 </d:desc>
133     </d:item>
134    
135 wakaba 1.30 <d:item name="character encoding unchecked"
136     modules="ContentChecker">
137 wakaba 1.17 <d:message xml:lang="en">Conformance for character encoding requirements
138 wakaba 1.30 cannot be checked, since the input is not a byte stream.</d:message>
139 wakaba 1.17 <d:desc xml:lang="en">
140     <p>The conformance checker cannot detect whether the input document
141     met the requirements on character encoding, since the document
142     is not inputed as a serialized byte sequence. The document is
143     not conforming if it is not encoded in an appropriate character
144     encoding with appropriate labeling.</p>
145     </d:desc>
146     </d:item>
147    
148 wakaba 1.30 <d:item name="no character encoding declaration"
149     modules="ContentChecker">
150 wakaba 1.16 <d:message xml:lang="en">There is no character encoding
151     declaration.</d:message>
152     <d:desc xml:lang="en">
153     <p>The document does not contain a character encoding
154     declaration. Unless the character encoding is explicitly
155 wakaba 1.17 specified in lower‐level protocol, e.g. in <abbr>HTTP</abbr>,
156 wakaba 1.16 or is implied by <abbr>BOM</abbr>, there must be a character
157     encoding declaration. The document is non‐conforming.</p>
158    
159     <p>The long character encoding declaration syntax
160     <code class="html bad example">&lt;meta http-equiv="Content-Type" content="text/html; charset=<var>charset-name</var>"></code>
161     is obsolete. The new syntax is:</p>
162     <pre class="html example"><code>&lt;meta charset="<var>charset-name</var>"></code></pre>
163    
164     <p>Note that the <code>encoding</code> declaration in <abbr>XML</abbr>
165     declaration has no effect for <abbr>HTML</abbr> document.</p>
166     </d:desc>
167     </d:item>
168    
169 wakaba 1.30 <d:item name="non ascii superset"
170     modules="ContentChecker">
171 wakaba 1.16 <d:message xml:lang="en">No character encoding metadata is found
172 wakaba 1.17 in lower‐level protocol nor is there <abbr>BOM</abbr>, while
173 wakaba 1.30 character encoding <code><var>{text}</var></code>
174 wakaba 1.16 is not a superset of <abbr>ASCII</abbr>.</d:message>
175     <d:desc xml:lang="en">
176     <p>The document is not labeled with character encoding name
177 wakaba 1.17 in lower‐level protocol, e.g. in <abbr>HTTP</abbr>, and
178 wakaba 1.16 the document is not begin with <abbr>BOM</abbr>. In addition,
179     the character encoding of the document is not a superset of
180     <abbr>ASCII</abbr>. The document is non‐conforming.</p>
181    
182     <p>Unless there is a <abbr>BOM</abbr>, the character encoding
183     for the document must be specified in e.g. <abbr>HTTP</abbr>‐level,
184     as:</p>
185     <pre class="http example"><code>Content-Type: text/html; charset=<var>charset-name</var></code></pre>
186    
187     <p>Existence of <abbr>HTML</abbr> character encoding declaration, i.e.
188     <code class="html example">&lt;meta charset="<var>charset-name</var>"></code>,
189     does not allow to omit <code>charset</code> parameter
190     for <abbr>HTML</abbr> document encoded in non‐<abbr>ASCII</abbr>
191     compatible encoding.</p>
192    
193     <p>Character encodings <code>Shift_JIS</code>, <code>Windows-31J</code>,
194     and <code>ISO-2022-JP</code> are <em>not</em> a superset of
195     <abbr>ASCII</abbr> for the purpose of <abbr>HTML</abbr> conformance.</p>
196     </d:desc>
197     </d:item>
198    
199 wakaba 1.29 <d:item name="sniffing:chardet"
200     modules="HTML::Parser">
201     <d:message xml:lang="en">Character encoding of this document is sniffed
202     as <code><var>{text}</var></code> (Sniffed because no explicit specification
203     for the character encoding of this document is found in the transfer
204     procotol headers).</d:message>
205     </d:item>
206    
207     <d:item name="sniffing:default"
208     modules="HTML::Parser">
209     <d:message xml:lang="en">Character encoding of this document is defaulted
210     to <code><var>{text}</var></code> because no explicit specification
211     for the character encoding of this document is found in the transfer
212     procotol headers.</d:message>
213     </d:item>
214    
215     <d:item name="chardecode:fallback"
216     modules="HTML::Parser">
217 wakaba 1.43 <d:message xml:lang="en">Results might be <em>wrong</em>, since the
218     conformance checker cannot find an appropriate decoder for the character
219     encoding used for the document.</d:message>
220     <d:desc xml:lang="en">
221     <p>The conformance checker cannot find an appropriate decoder for
222     the character encoding used to encode characters in the document.</p>
223    
224     <p>This error is raised if:</p>
225     <ul>
226     <li>the conformance checker cannot find any decoder for the character
227     encoding in use, but it knows that the encoding is similar to another
228     character encoding, such that it uses the decoder for that character
229     encoding, and therefore some octets might be interpreted incorrectly,
230     or,</li>
231     <li>the conformance checker find a decoder for the character encoding
232     in use, but it does not know whether the decoder is conforming to the
233     relevant specification or not, and therefore some octets might be
234     interpreted incorrectly.</li>
235     </ul>
236    
237     <p>In either case, the result shown by the conformance checker might
238     contain wrong errors caused by errorneous decoder or might not contain
239     errors that should be raised if an appropriate decoder is used.</p>
240    
241     <!-- TODO: add advise that either install relevant modules or
242     join the developmenet of the modules... -->
243     </d:desc>
244 wakaba 1.29 </d:item>
245    
246     <d:item name="chardecode:no error"
247     modules="HTML::Parser">
248     <d:message xml:lang="en">Conformance error checking for the character
249     encoding <code><var>{text}</var></code> is not supported.</d:message>
250     </d:item>
251    
252     <d:item name="charset label:matching"
253     modules="HTML::Parser">
254     <d:message xml:lang="en">Sniffed character encoding
255     <code><var>{text}</var></code> is same as the character encoding specified
256     in the character encoding declaration. This is <em>not</em> an
257     error.</d:message>
258     </d:item>
259    
260     <d:item name="charset label detected"
261     modules="HTML::Parser">
262 wakaba 1.16 <d:message xml:lang="en">While parsing the document as
263 wakaba 1.29 <code><var>{text}</var></code>, a character encoding declaration specifying
264     a different character encoding is found. The document
265 wakaba 1.16 is reparsed.</d:message>
266     <d:desc xml:lang="en">
267     <p>While parsing a document in a character encoding,
268     a character encoding declaration which declares the character
269     encoding of the document as another character encoding is found.
270     The occurence of this warning itself does not make the document
271     non‐conforming. However, the failure of the first attempt to
272 wakaba 1.21 to detect the character encoding might be a result of non‐conformance
273 wakaba 1.16 of the document.</p>
274    
275     <p>The document will be reparsed from the beginning. Some error
276     or warning might be reported again.</p>
277    
278     <p>These are suggestions to avoid this warning:</p>
279     <ul>
280     <li>Specify <code>charset</code> parameter in the <code>Content-Type</code>
281     field in the <abbr>HTTP</abbr> header, as:
282     <pre class="HTTP example"><code>Content-Type: text/html; charset="<var>charset-name</var>"</code></pre></li>
283     <li>Put the character encoding declaration
284     (<code class="html example">&lt;meta charset="<var>charset-name</var>"></code>)
285     just after <code class="html example">&lt;head></code> start tag.</li>
286     <li>Use <code>UTF-8</code>.</li>
287     </ul>
288     </d:desc>
289     </d:item>
290 wakaba 1.44 </section>
291    
292     <section id="character-set-layer">
293     <h2>Coded Character Set Layer Errors</h2>
294 wakaba 1.29
295     <d:item name="NULL"
296     modules="HTML::Parser">
297 wakaba 1.44 <!-- HTML5 Parse Error -->
298 wakaba 1.29 <d:message xml:lang="en">The <code class="charname">NULL</code> character
299     is not allowed.</d:message>
300     </d:item>
301    
302     <d:item name="control char"
303     modules="HTML::Parser">
304 wakaba 1.44 <!-- HTML5 Parse Error -->
305 wakaba 1.29 <d:message xml:lang="en">Code point <code><var>{text}</var></code> is
306     not allowed.</d:message>
307     </d:item>
308    
309 wakaba 1.44 <d:item name="nonchar"
310     modules="Charset::UnicodeChecker">
311     <d:message xml:lang="en">Noncharacter <code><var>{text}</var></code>
312     is found in the input stream.</d:message>
313     <d:desc xml:lang="en">
314     <p>Noncharacter code points are used in the input stream.</p>
315    
316     <p>Noncharacter code points are reserved for internal processings.
317     Their use for information interchanges are forbidden.</p>
318    
319     <p>In addition, they are not allowed in HTML document.</p>
320     <!-- "permanently undefined Unicode characters" in HTML5. -->
321     </d:desc>
322     </d:item>
323    
324     <d:item name="unicode deprecated"
325     modules="Charset::UnicodeChecker">
326     <d:message xml:lang="en">Use of character <code><var>{text}</var></code>
327     is deprecated.</d:message>
328     </d:item>
329    
330     <d:item name="unicode discouraged"
331     modules="Charset::UnicodeChecker">
332     <d:message xml:lang="en">Use of character <code><var>{text}</var></code>
333     is discouraged.</d:message>
334     </d:item>
335    
336     <d:item name="unicode not preferred"
337     modules="Charset::UnicodeChecker">
338     <d:message xml:lang="en">Code point <code><var>{text}</var></code>
339     is not the preferred representation of that character.</d:message>
340     </d:item>
341    
342     <d:item name="unicode should"
343     modules="Charset::UnicodeChecker">
344     <d:message xml:lang="en">Character <code><var>{text}</var></code>
345     should not be used in many cases.</d:message>
346     </d:item>
347    
348 wakaba 1.16 </section>
349    
350 wakaba 1.2 <section id="html5-tokenize-error">
351     <h2>HTML5 Parse Errors in Tokenization Stage</h2>
352 wakaba 1.1
353 wakaba 1.29 <d:item name="bad attribute name"
354     modules="HTML::Parser">
355     <d:message xml:lang="en">Attribute name cannot contain characters
356     <code>"</code>, <code>'</code>, and <code>=</code>.</d:message>
357     </d:item>
358    
359     <d:item name="bad attribute value"
360     modules="HTML::Parser">
361     <d:message xml:lang="en">Attribute value must be quoted by <code>"</code>
362     or <code>'</code> if it contains a <code>"</code>, <code>'</code>, or
363     <code>=</code> character.</d:message>
364 wakaba 1.41 <d:desc xml:lang="en">
365     <p>In an unquoted attribute value, a character <code>"</code>
366     (<code>U+0022</code> <code class="charname">QUOTATION MARK</code>),
367     <code>'</code> (<code>U+0026</code>
368     <code class="charname">APOSTROPHE</code>), or <code>=</code>
369     (<code>U+003D</code> <code class="charname">EQUAL SIGN</code>)
370     is contained. These characters are not allowed in unquoted attribute
371     values, since they are used to quote attribute values or to separate
372     attribute name and value.</p>
373    
374     <p>This error is also raised if one try to use empty attribute
375     value like <code class="html bad example">&lt;foo bar= baz=></code>;
376     in this example, <code class="html bad example">baz=</code> is
377     treated as an invalid attribute value for the attribute
378     <code class="html bad example">bar</code>, not as another attribute.</p>
379     </d:desc>
380 wakaba 1.29 </d:item>
381    
382 wakaba 1.3 <d:item name="bare ero"
383 wakaba 1.29 modules="HTML::Parser">
384 wakaba 1.3 <d:message xml:lang="en">The <code>&amp;</code> character must
385 wakaba 1.22 be escaped as <code class="html example">&amp;amp;</code>.</d:message>
386 wakaba 1.3 <d:desc xml:lang="en">
387 wakaba 1.15 <p>An <code>&amp;</code> character which
388 wakaba 1.3 is not part of any reference appears in the input stream.
389 wakaba 1.15 The document is non‐conforming.</p>
390 wakaba 1.3
391 wakaba 1.15 <p><em>Any <code>&amp;</code> character in URI (or IRI)
392     must be escaped as <code class="example">&amp;amp;</code>.</em></p>
393 wakaba 1.9
394 wakaba 1.3 <p>The <code>&amp;</code> character must
395     be the first character of a reference:
396 wakaba 1.15 <dl class="switch">
397 wakaba 1.3 <dt>Named entity reference</dt>
398     <dd><pre class="html example"><code>&amp;<var>entity-name</var>;</code></pre>
399     where <var>entity-name</var> is the name of the
400     character entity to be referenced.</dd>
401     <dt>Numeric character reference</dt>
402     <dd><pre class="html example"><code>&amp;#<var>d</var>;</code></pre>
403     where <var>d</var> is the decimal representation of
404     the code position of the character to be referenced.</dd>
405     <dt>Hexadecimal character reference</dt>
406     <dd><pre class="html example"><code>&amp;#x<var>h</var>;</code></pre>
407     where <var>h</var> is the hexadecimal representation
408     of the code position of the character to be referenced.</dd>
409     </dl>
410     </p>
411    
412     <p>To represent <code>&amp;</code> as a data character, use
413     named entity reference:
414     <pre class="html example"><code>&amp;amp;</code></pre>
415     </p>
416     </d:desc>
417     </d:item>
418    
419 wakaba 1.7 <d:item name="bare etago"
420 wakaba 1.29 modules="HTML::Parser">
421 wakaba 1.7 <d:message xml:lang="en">A <code>&lt;/</code> string is not followed
422     by a tag name.</d:message><!-- </ EOF -->
423     <d:desc xml:lang="en">
424     <p>There is a <code>&lt;</code> (<code>U+003C</code>
425     <code class="charname">LESS-THAN SIGN</code>) character
426     immediately followed by a <code>/</code> (<code>U+005F</code>
427     <code>SOLIDUS</code>) character, which is not part
428     of any end tag, in the input stream. The document
429     is non-conforming.</p>
430    
431     <p>The <code>&lt;/</code> sequence immediately followed
432     by an <abbr title="End of file pseudo-character">EOF</abbr> is
433     interpreted as a string data of <code>&lt;/</code>.</p>
434    
435     <p>The <code>&lt;/</code> sequence as string data must
436     be escaped as:
437     <pre class="html example"><code>&amp;lt;/</code></pre>
438     </p>
439     </d:desc>
440     </d:item>
441    
442 wakaba 1.4 <d:item name="bare stago"
443 wakaba 1.29 modules="HTML::Parser">
444 wakaba 1.4 <d:message xml:lang="en">A <code>&lt;</code> character is not followed
445     by tag name or by a <code>!</code> character.</d:message>
446     <d:desc xml:lang="en">
447 wakaba 1.6 <p>A <code>&lt;</code> (<code>U+003C</code>
448     <code class="charname">LESS-THAN SIGN</code>) character which is not part
449     of any markup appears in the input stream.</p>
450 wakaba 1.4
451     <p>The <code>&lt;</code> character as a data character must
452     be escaped as:
453 wakaba 1.6 <pre class="html example"><code>&amp;lt;</code></pre>
454 wakaba 1.4 </p>
455     </d:desc>
456     </d:item>
457    
458 wakaba 1.3 <d:item name="bare nero"
459 wakaba 1.29 modules="HTML::Parser">
460 wakaba 1.3 <d:message xml:lang="en">The decimal representation of the code position
461     of a character must be specified after <code>&amp;#</code>.</d:message>
462     <d:desc xml:lang="en">
463     <p>An <code>&amp;</code> (<code>U+0026</code>
464     <code class="charname">AMPERSAND</code>) character immediately
465     followed by a <code>#</code> (<code>U+0023</code>
466     <code>NUMBER SIGN</code>) character which
467     is not part of any reference appears in the input stream.
468     The document is non-conforming.</p>
469    
470     <p>The string <code>&amp;#</code> must be the first two characters
471     of a reference:
472 wakaba 1.15 <dl class="switch">
473 wakaba 1.3 <dt>Numeric character reference</dt>
474     <dd><pre class="html example"><code>&amp;#<var>d</var>;</code></pre>
475     where <var>d</var> is the decimal representation of
476     the code point of the character to be referenced.</dd>
477     <dt>Hexadecimal character reference</dt>
478     <dd><pre class="html example"><code>&amp;#x<var>h</var>;</code></pre>
479     where <var>h</var> is the hexadecimal representation
480     of the code point of the character to be referenced.</dd>
481     </dl>
482     </p>
483    
484     <p>To represent <code>&amp;#</code> as data characters, use
485 wakaba 1.6 a named entity reference for the <code>&amp;</code> character:
486 wakaba 1.3 <pre class="html example"><code>&amp;amp;#</code></pre>
487     </p>
488     </d:desc>
489     </d:item>
490    
491     <d:item name="bare hcro"
492 wakaba 1.29 modules="HTML::Parser">
493 wakaba 1.3 <d:message xml:lang="en">The hexadecimal representation of the code position
494     of a character must be specified after <code>&amp;#x</code>.</d:message>
495     <d:desc xml:lang="en">
496     <p>The string <code>&amp;#x</code> or <code>&amp;#X</code> which
497     is not part of any reference appears in the input stream.
498     The document is non-conforming.</p>
499    
500     <p>The string <code>&amp;#x</code> or <code>&amp;#X</code> must
501     be the first three characters of a hexadecimal reference:
502     <pre class="html example"><code>&amp;#x<var>h</var>;</code></pre>
503     where <var>h</var> is the hexadecimal representation
504     of the code point of the character to be referenced.</p>
505    
506     <p>To represent <code>&amp;#x</code> as data characters, use
507 wakaba 1.6 a named entity reference for the <code>&amp;</code> character:
508 wakaba 1.3 <pre class="html example"><code>&amp;amp;#x</code></pre>
509     </p>
510     </d:desc>
511     </d:item>
512    
513 wakaba 1.9 <d:item name="bogus comment"
514 wakaba 1.29 modules="HTML::Parser">
515 wakaba 1.9 <d:message xml:lang="en">String <code>&lt;!</code> is not followed
516     by <code>--</code>.</d:message>
517     <d:desc xml:lang="en">
518     <p>There is a <code>&lt;</code> (<code>U+003C</code>
519     <code class="charname">LESS-THAN SIGN</code>) character
520     followed by a <code>!</code> (<code>U+0021</code>
521     <code class="charname">EXCLAMATION MARK</code>) character,
522     which is not followed by a <code>--</code> or
523     <code>!DOCTYPE</code>. The document is non-conforming.</p>
524    
525     <dl class="switch">
526     <dt>Comments</dt>
527 wakaba 1.15 <dd>In HTML document, comments must be introduced by
528     <code class="example">&lt;!--</code> (<code>&lt;!</code>
529     <em>immediately</em> followed
530 wakaba 1.9 by <em>two</em> <code>-</code>s) and must be terminated by
531 wakaba 1.15 <code class="example">--></code>.
532     Strings <code>&lt;!</code> not followed
533 wakaba 1.9 by <code>--</code> and <code>&lt;!-</code> not followed by
534     <code>-</code> are not valid open delimiters for comments.</dd>
535     <dt>Marked sections, including <code>CDATA</code> sections</dt>
536 wakaba 1.15 <dd>Marked sections are not allowed in HTML document.</dd>
537 wakaba 1.9 <dt>Markup declarations</dt>
538 wakaba 1.15 <dd>Markup declarations, except for <code>DOCTYPE</code>
539     and comment declarations, are not allowed in HTML document.</dd>
540 wakaba 1.9 <dt>String <code>&lt;!</code></dt>
541     <dd>String <code>&lt;!</code> must be escaped as
542 wakaba 1.15 <code class="example">&amp;lt;!</code>.</dd>
543 wakaba 1.9 </dl>
544     </d:desc>
545     </d:item>
546    
547 wakaba 1.7 <d:item name="bogus end tag"
548 wakaba 1.29 modules="HTML::Parser">
549 wakaba 1.9 <d:message xml:lang="en">String <code>&lt;/</code> is not followed
550     by tag name.</d:message><!-- </ non-name-start-char-non-EOF -->
551 wakaba 1.7 <d:desc xml:lang="en">
552     <p>There is a <code>&lt;</code> (<code>U+003C</code>
553     <code class="charname">LESS-THAN SIGN</code>) character
554     immediately followed by a <code>/</code> (<code>U+005F</code>
555     <code>SOLIDUS</code>) character, which is not part
556     of any end tag, in the input stream. The document
557     is non-conforming.</p>
558    
559     <p>The <code>&lt;/</code> sequence not followed by a
560     tag name is parsed as an opening of bogus comment.</p>
561    
562     <p>The <code>&lt;/</code> sequence as string data must
563     be escaped as:
564     <pre class="html example"><code>&amp;lt;/</code></pre>
565     </p>
566     </d:desc>
567     </d:item>
568    
569 wakaba 1.29 <d:item name="C1 character reference"
570     modules="HTML::Parser">
571     <d:message xml:lang="en">Character reference to
572     <code><var>{text}</var></code> is not allowed.</d:message>
573     </d:item>
574    
575     <d:item name="CR character reference"
576     modules="HTML::Parser">
577     <d:message xml:lang="en">Character reference to
578     <code>U+000D</code> (<code class="charname">CARRIAGE RETURN</code>)
579     is not allowed.</d:message>
580     </d:item>
581    
582 wakaba 1.4 <d:item name="dash in comment"
583 wakaba 1.29 modules="HTML::Parser">
584 wakaba 1.4 <d:message xml:lang="en">There is a <code>--</code> sequence
585     in a comment.</d:message>
586     <d:desc xml:lang="en">
587     <p>There is a <code>-</code> (<code>U+002D</code>
588     <code class="charname">HYPHEN-MINUS</code>) character
589     at the end of the comment or a <code>--</code> sequence
590     in the comment. The document is non-conforming.</p>
591    
592     <p>Comments cannot contain a string <code>--</code>, as in XML.
593     Unlike SGML, there cannot be more than one comments
594     (where <i>comment</i> is an SGML term) in the comment
595     declaration.</p>
596     </d:desc>
597     </d:item>
598    
599 wakaba 1.1 <d:item name="duplicate attribute"
600 wakaba 1.29 modules="HTML::Parser">
601 wakaba 1.6 <d:message xml:lang="en">There are two attributes with name
602 wakaba 1.29 <code><var>{text}</var></code>.</d:message>
603 wakaba 1.1 <d:desc xml:lang="en">
604 wakaba 1.3 <p>There are more than one attributes with the same
605     name in a tag. The document is non-conforming.</p>
606 wakaba 1.1
607     <p>The <code>motion</code> attribute is not part of the HTML standard.
608     Use <code>img</code> element with animation GIF instead.</p>
609     </d:desc>
610     </d:item>
611    
612 wakaba 1.29 <d:item name="empty start tag"
613     modules="HTML::Parser">
614     <d:message xml:lang="en">Empty start tag (<code>&lt;></code>) is not
615     allowed.</d:message>
616     </d:item>
617    
618     <d:item name="empty end tag"
619     modules="HTML::Parser">
620     <d:message xml:lang="en">Empty end tag (<code>&lt;/></code>) is not
621     allowed.</d:message>
622     </d:item>
623    
624     <d:item name="end tag attribute"
625     modules="HTML::Parser">
626     <d:message xml:lang="en">End tag cannot have attributes.</d:message>
627 wakaba 1.41 <d:message xml:lang="ja">終了タグに属性が指定されています。</d:message>
628     </d:item>
629    
630     <d:item name="empty unquoted attribute value"
631     modules="HTML::Parser">
632     <d:message xml:lang="en">Attribute value is not specified.</d:message>
633     <d:message xml:lang="ja">属性値が指定されていません。</d:message>
634     <d:desc xml:lang="en">
635     <p>The attribute value is not specified after the <code>=</code>
636     (<code>U+003C</code> <code class="charname">EQUAL SIGN</code>)
637     character.</p>
638    
639     <p>When an attribute value is empty, the <code>=</code> character after
640     the attribute name must be specified as:</p>
641    
642     <p><code class="html example">&lt;foo bar></code></p>
643    
644     <p>Instead, quotation marks can be used to explicitly represent that
645     the attribute value is empty, as:</p>
646    
647     <p><code class="html example">&lt;foo bar=""></code></p>
648    
649     <p>... or like:</p>
650    
651     <p><code class="html example">&lt;foo bar=''></code></p>
652     </d:desc>
653 wakaba 1.29 </d:item>
654    
655     <d:item name="invalid character reference"
656     modules="HTML::Parser">
657     <d:message xml:lang="en">Character reference to
658     <code><var>{text}</var></code> is not allowed.</d:message>
659     </d:item>
660    
661 wakaba 1.1 <d:item name="nestc"
662 wakaba 1.29 modules="HTML::Parser">
663 wakaba 1.10 <d:message xml:lang="en">Polytheistic slash (<code>/></code>) cannot be
664 wakaba 1.1 used for this element.</d:message>
665     <d:desc xml:lang="en">
666 wakaba 1.10 <p>Polytheistic slash (<code>/></code>) must not be used
667 wakaba 1.3 for the element. The document is non-conforming.</p>
668    
669 wakaba 1.10 <p>The polytheistic slash can only be
670 wakaba 1.1 used for <code>base</code>, <code>link</code>, <code>meta</code>,
671     <code>hr</code>, <code>br</code>, <code>img</code>,
672     <code>embed</code>, <code>param</code>, <code>area</code>,
673 wakaba 1.3 <code>col</code>, and <code>input</code> elements.</p>
674 wakaba 1.1
675 wakaba 1.12 <dl class="switch">
676 wakaba 1.9 <dt><code>&lt;script/></code></dt>
677 wakaba 1.10 <dd><p>The polytheistic slash cannot be used for <code>script</code>
678 wakaba 1.9 element. Even for an empty <code>script</code> element,
679 wakaba 1.15 there must be an explicit end tag
680     <code class="html example">&lt;/script></code>.</p>
681 wakaba 1.9
682     <p><strong>NOTE</strong>: Though some user agents interpret
683 wakaba 1.10 polytheistic slash for <code>script</code> element as the
684 wakaba 1.9 closing of the element, such usage is not allowed under
685     the current standard.</p></dd>
686     <dt><code>&lt;basefont/></code>, <code>&lt;bgsound/></code>,
687     <code>&lt;frame/></code>, <code>&lt;keygen/></code>,
688     <code>&lt;spacer/></code>, <code>&lt;wbr/></code></dt>
689     <dd>These elements are themselves non-conforming.</dd>
690     <!-- isindex, image -->
691     <dt><code>&lt;command/></code>, <code>&lt;event-source/></code>,
692 wakaba 1.12 <code>&lt;nest/></code>, or <code>&lt;source/></code></dt>
693 wakaba 1.9 <dd>Future revision of HTML5 parsing algorithm is expected
694 wakaba 1.10 to allow polytheistic slash for these elements.</dd>
695 wakaba 1.9 <dt><code>&lt;a/></code>, <code>&lt;p/></code></dt>
696     <dd>These elements are not always empty and therefore
697 wakaba 1.15 polytheistic slash is not allowed. Use explicit end tag
698     to represent empty element as:
699     <pre class="example html"><code>&lt;p>&lt;/p></code></pre>
700     </dd>
701 wakaba 1.9 </dl>
702    
703 wakaba 1.10 <p>Note that, unlike in XML, the polytheistic slash has
704 wakaba 1.1 no effect in HTML.</p>
705     </d:desc>
706     </d:item>
707    
708 wakaba 1.29 <d:item name="no DOCTYPE name"
709     modules="HTML::Parser">
710     <d:message xml:lang="en">After the string <code>&lt;!DOCTYPE </code>, the
711     document type name must be specified.</d:message>
712     </d:item>
713    
714     <d:item name="no PUBLIC literal"
715     modules="HTML::Parser">
716     <d:message xml:lang="en">After the keyword <code>PUBLIC</code>, no
717     oublic identifier is specified.</d:message>
718     </d:item>
719    
720     <d:item name="no refc"
721     modules="HTML::Parser">
722     <d:message xml:lang="en">Character reference must be closed by a
723     <code>;</code> character.</d:message>
724     </d:item>
725    
726     <d:item name="no space before DOCTYPE name"
727     modules="HTML::Parser">
728     <d:message xml:lang="en">After the string <code>&lt;!DOCTYPE</code>, there
729     must be at least a white space character before the document type
730     name.</d:message>
731     </d:item>
732    
733     <d:item name="no space between attributes"
734     modules="HTML::Parser">
735     <d:message xml:lang="en">Attributes must be separeted by at least a
736     white space character.</d:message>
737     </d:item>
738    
739     <d:item name="no SYSTEM literal"
740     modules="HTML::Parser">
741     <d:message xml:lang="en">After the keyword <code>SYSTEM</code>, no
742     system identifier is specified.</d:message>
743     </d:item>
744 wakaba 1.5
745     <d:item name="pio"
746 wakaba 1.29 modules="HTML::Parser">
747 wakaba 1.5 <d:message xml:lang="en">Processing instruction
748 wakaba 1.29 (<code>&lt;?<var>...</var>></code>) is not allowed in HTML
749     document.</d:message>
750 wakaba 1.5 <d:desc xml:lang="en">
751     <p>Processing instructions (<code>&lt;?<var>...</var>?></code>),
752     including XML declaration (<code>&lt;?xml <var>...</var>?></code>)
753     and XML style sheet <abbr title="processing instruction">PI</abbr>
754 wakaba 1.9 (<code>&lt;?xml-stylesheet <var>...</var>?></code>), are not allowed
755 wakaba 1.5 in the HTML syntax. The document is non-conforming.</p>
756    
757 wakaba 1.12 <dl class="switch">
758     <dt><code>&lt;?xbl?></code> (<abbr>XBL</abbr> Association)</dt>
759     <dd>An <abbr>XBL</abbr> binding cannot be associated by
760     <abbr title="processing instruction">PI</abbr> in <abbr>HTML</abbr>
761     document. Use <code>binding</code> property in <abbr>CSS</abbr>
762 wakaba 1.15 style sheet as:
763     <pre class="html example"><code>&lt;style>
764     p {
765     binding: url(binding.xbl);
766     }
767     &lt;/style></code></pre>
768     </dd>
769 wakaba 1.9 <dt><code>&lt;?xml?&gt;</code> (XML declaration)</dt>
770     <dd>XML declaration is unnecessary for HTML documents.</dd>
771     <dt><code>&lt;?xml-stylesheet?></code> (XML style sheet
772 wakaba 1.12 <abbr title="processing instruction">PI</abbr>)</dt>
773 wakaba 1.9 <dd>Use HTML <code>link</code> element with <code>rel</code>
774     attribute set to <code>stylesheet</code> (or,
775     <code>alternate stylesheet</code> for an alternate style
776 wakaba 1.15 sheet).
777     <pre class="example html"><code>&lt;link rel=stylesheet href="path/to/stylesheet.css"></code></pre>
778     </dd>
779 wakaba 1.12 <dt><code>&lt;?php?&gt;</code> or
780     <code>&lt;? <var>... <abbr>PHP</abbr> code ...</var> ?&gt;</code>
781     (<abbr>PHP</abbr> code)</dt>
782 wakaba 1.9 <dd>The conformance checker does <em>not</em> support
783     checking for PHP source documents.</dd>
784     <dt>Other processing instructions</dt>
785     <dd>Processing instructions cannot be inserted in an HTML
786     document. Use XML document or insert
787     <code>ProcessingInstruction</code> node by scripting.</dd>
788     </dl>
789 wakaba 1.5
790     <p>Web browsers will parse processing instructions as bogus
791     comments. Some legacy Web browsers, such as IE:mac and
792 wakaba 1.9 some mobile Web browsers, will display processing instructions
793 wakaba 1.5 as string.</p>
794     </d:desc>
795     </d:item>
796    
797 wakaba 1.29 <d:item name="string after DOCTYPE name"
798     modules="HTML::Parser">
799     <d:message xml:lang="en">There is a bogus string after the document type
800     name.</d:message>
801     </d:item>
802    
803     <d:item name="string after PUBLIC"
804     modules="HTML::Parser">
805     <d:message xml:lang="en">There is a bogus string after the keyword
806     <code>PUBLIC</code>.</d:message>
807     </d:item>
808    
809     <d:item name="string after PUBLIC literal"
810     modules="HTML::Parser">
811     <d:message xml:lang="en">There is a bogus string after the public
812     identifier.</d:message>
813     </d:item>
814    
815     <d:item name="string after SYSTEM"
816     modules="HTML::Parser">
817     <d:message xml:lang="en">There is a bogus string after the keyword
818     <code>SYSTEM</code>.</d:message>
819     </d:item>
820    
821     <d:item name="string after SYSTEM literal"
822     modules="HTML::Parser">
823     <d:message xml:lang="en">There is a bogus string after the system
824     identifier.</d:message>
825     </d:item>
826    
827     <d:item name="unclosed attribute value"
828     modules="HTML::Parser">
829     <d:message xml:lang="en">Attribute value is not closed by a quotation
830     mark.</d:message>
831     </d:item>
832    
833     <d:item name="unclosed comment"
834     modules="HTML::Parser">
835     <d:message xml:lang="en">Comment is not closed by a string
836     <code>--></code>.</d:message>
837     </d:item>
838    
839     <d:item name="unclosed DOCTYPE"
840     modules="HTML::Parser">
841     <d:message xml:lang="en">The <code>DOCTYPE</code> is not closed by a
842     <code>></code> character.</d:message>
843     </d:item>
844    
845     <d:item name="unclosed PUBLIC literal"
846     modules="HTML::Parser">
847     <d:message xml:lang="en">The public identifier literal is not closed by a
848     quotation mark.</d:message>
849     </d:item>
850    
851     <d:item name="unclosed SYSTEM literal"
852     modules="HTML::Parser">
853     <d:message xml:lang="en">The system identifier literal is not closed by a
854     quotation mark.</d:message>
855     </d:item>
856    
857     <d:item name="unclosed tag"
858     modules="HTML::Parser">
859     <d:message xml:lang="en">Tag is not closed by a <code>></code>
860     character.</d:message>
861     </d:item>
862    
863 wakaba 1.1 </section>
864    
865 wakaba 1.2 <section id="html5-parse-errors">
866     <h2>HTML5 Parse Errors in Tree Construction Stage</h2>
867    
868 wakaba 1.42 <d:item name="after after frameset"
869     modules="HTML::Parser">
870     <d:message xml:lang="en">There is a start tag
871     <code>&lt;<var>{text}</var>></code> is after the <code>html</code> element
872     is closed.</d:message>
873     <d:message xml:lang="ja"><code>html</code> 要素が閉じられた後に開始タグ
874     <code>&lt;<var>{text}</var>></code> があります。</d:message>
875     </d:item>
876    
877     <d:item name="after after frameset:/"
878     modules="HTML::Parser">
879     <d:message xml:lang="en">There is an end tag
880     <code>&lt;/<var>{text}</var>></code> is after the <code>html</code> element
881     is closed.</d:message>
882     <d:message xml:lang="ja"><code>html</code> 要素が閉じられた後に終了タグ
883     <code>&lt;/<var>{text}</var>></code> があります。</d:message>
884     </d:item>
885    
886 wakaba 1.29 <d:item name="after body"
887     modules="HTML::Parser">
888     <d:message xml:lang="en">Start tag <code>&lt;<var>{text}</var>></code> is
889     not allowed after the <code>body</code> is closed.</d:message>
890     </d:item>
891    
892     <d:item name="after body:/"
893     modules="HTML::Parser">
894     <d:message xml:lang="en">End tag <code>&lt;/<var>{text}</var>></code> is
895     not allowed after the <code>body</code> is closed.</d:message>
896     </d:item>
897    
898     <d:item name="after body:#text"
899     modules="HTML::Parser">
900     <d:message xml:lang="en">Non‐white‐space characters are not allowed
901     after the <code>body</code> is closed.</d:message>
902     </d:item>
903    
904     <d:item name="after frameset"
905     modules="HTML::Parser">
906     <d:message xml:lang="en">Start tag <code>&lt;<var>{text}</var>></code> is
907     not allowed after the <code>frameset</code> is closed.</d:message>
908     </d:item>
909    
910     <d:item name="after frameset:/"
911     modules="HTML::Parser">
912     <d:message xml:lang="en">End tag <code>&lt;/<var>{text}</var>></code> is
913     not allowed after the <code>frameset</code> is closed.</d:message>
914     </d:item>
915    
916     <d:item name="after frameset:#text"
917     modules="HTML::Parser">
918     <d:message xml:lang="en">Non‐white‐space characters are not allowed
919     after the <code>frame</code> is closed.</d:message>
920     </d:item>
921    
922 wakaba 1.2 <d:item name="after head"
923 wakaba 1.39 modules="HTML::Parser">
924 wakaba 1.29 <d:message xml:lang="en">The <code><var>{text}</var></code> element cannot be
925     inserted between <code>head</code> and <code>body</code>
926     elements.</d:message>
927 wakaba 1.2 <d:desc xml:lang="en">
928 wakaba 1.3 <p>A start tag appears after the <code>head</code> element is closed
929 wakaba 1.2 but before the <code>body</code> element is opened.
930     The document is non-conforming.</p>
931     </d:desc>
932     </d:item>
933    
934 wakaba 1.29 <d:item name="after html"
935     modules="HTML::Parser">
936     <d:message xml:lang="en">Start tag <code>&lt;<var>{text}</var>></code> is
937     not allowed after the <code>html</code> is closed.</d:message>
938 wakaba 1.39 <d:desc xml:lang="en">
939     <p>The start tag of an element appears after the
940     <code>body</code> element has been closed. The document is
941     non-conforming.</p>
942    
943     <p>Any content of the document other than <code>head</code>
944     contents and comments must be put into the <code>body</code>
945     element.</p>
946     </d:desc>
947 wakaba 1.29 </d:item>
948    
949     <d:item name="after html:/"
950     modules="HTML::Parser">
951     <d:message xml:lang="en">End tag <code>&lt;/<var>{text}</var>></code> is
952     not allowed after the <code>html</code> is closed.</d:message>
953 wakaba 1.39 <d:desc xml:lang="en">
954     <p>The end tag of an element appears after the
955     <code>body</code> element has been closed. The document is
956     non-conforming.</p>
957    
958     <p>Any content of the document other than <code>head</code>
959     contents and comments must be put into the <code>body</code>
960     element.</p>
961     </d:desc>
962 wakaba 1.29 </d:item>
963    
964     <d:item name="after html:#text"
965     modules="HTML::Parser">
966     <d:message xml:lang="en">Non‐white‐space characters are not allowed
967     after the <code>html</code> is closed.</d:message>
968     </d:item>
969    
970     <d:item name="image"
971     modules="HTML::Parser">
972     <d:message xml:lang="en">The <code>image</code> element is
973     obsolete.</d:message>
974 wakaba 1.4 </d:item>
975    
976 wakaba 1.5 <d:item name="in a:a"
977 wakaba 1.29 modules="HTML::Parser">
978 wakaba 1.5 <d:message xml:lang="en">Anchor cannot be nested.</d:message>
979     <d:desc xml:lang="en">
980     <p>HTML <code>a</code> elements cannot be nested.
981     The document is non-conforming.</p>
982    
983     <p>In the HTML syntax, a start tag of the <code>a</code>
984     implies the end tag of any opening <code>a</code> element.</p>
985     </d:desc>
986     </d:item>
987    
988 wakaba 1.4 <d:item name="in body"
989 wakaba 1.29 modules="HTML::Parser">
990     <d:message xml:lang="en">Start tag <code>&lt;<var>{text}</var>&gt;</code>
991 wakaba 1.9 is not allowed in the <code>body</code> element.</d:message>
992 wakaba 1.4 <d:desc xml:lang="en">
993     <p>The start or end tag of an element, which
994     cannot be a descendant of <code>body</code> element, appears
995     in the input stream while the <code>body</code> element has been opened.
996     The document is non-conforming.</p>
997     </d:desc>
998     </d:item>
999    
1000 wakaba 1.29 <d:item name="in body:#eof"
1001     modules="HTML::Parser">
1002     <d:message xml:lang="en">Some element is not closed before the end of
1003     file.</d:message>
1004     </d:item>
1005    
1006     <d:item name="in button:button"
1007     modules="HTML::Parser">
1008     <d:message xml:lang="en">The <code>button</code> element cannot be
1009     nested.</d:message>
1010     </d:item>
1011    
1012     <d:item name="in CDATA:#eof"
1013     modules="HTML::Parser">
1014     <d:message xml:lang="en">Element is not closed before the end of
1015     file.</d:message>
1016     </d:item>
1017    
1018     <d:item name="in form:form"
1019     modules="HTML::Parser">
1020     <d:message xml:lang="en">Start tag <code>&lt;form></code> is
1021     not allowed in a <code>form</code> element.</d:message>
1022     </d:item>
1023    
1024     <d:item name="in frameset"
1025     modules="HTML::Parser">
1026     <d:message xml:lang="en">Start tag <code>&lt;<var>{text}</var>></code> is
1027     not allowed in a <code>framset</code> element.</d:message>
1028     </d:item>
1029    
1030     <d:item name="in frameset:/"
1031     modules="HTML::Parser">
1032     <d:message xml:lang="en">End tag <code>&lt;/<var>{text}</var>></code> is
1033     not allowed in a <code>frameset</code> element.</d:message>
1034     </d:item>
1035    
1036     <d:item name="in frameset:#text"
1037     modules="HTML::Parser">
1038     <d:message xml:lang="en">Non‐white‐space characters are not allowed
1039     in a <code>frameset</code> element.</d:message>
1040     </d:item>
1041    
1042 wakaba 1.5 <d:item name="in head:head"
1043 wakaba 1.29 modules="HTML::Parser">
1044 wakaba 1.9 <d:message xml:lang="en">Start tag <code>&lt;head&gt;</code>
1045 wakaba 1.5 is not allowed in the <code>head</code> element.</d:message>
1046     <d:desc xml:lang="en">
1047     <p>There is a start tag <code>&lt;head></code> in the
1048     <code>&lt;head></code> element. The document is non-conforming.</p>
1049    
1050     <p>In an HTML document there must not be more than
1051     one <code>head</code> element, therefore no more than one
1052     start tag <code>&lt;head></code> can appear in the input stream.</p>
1053     </d:desc>
1054     </d:item>
1055    
1056 wakaba 1.29 <d:item name="in html:#DOCTYPE"
1057     modules="HTML::Parser">
1058     <d:message xml:lang="en">A <code>DOCTYPE</code> appears after any
1059     element or data character has been seen.</d:message>
1060     <!-- <!DOCTYPE HTML><!DOCTYPE HTML> -->
1061     <!-- <html><!DOCTYPE HTML> -->
1062     <d:desc xml:lang="en">
1063     <p>A <code>DOCTYPE</code> appears after any element or data character
1064     has been seen. The document is non-conforming.</p>
1065    
1066     <p>The <code>DOCTYPE</code> must be placed before any
1067     tag, reference, or data character. Only white space characters
1068     and comments can be inserted before the <code>DOCTYPE</code>.</p>
1069     </d:desc>
1070     </d:item>
1071    
1072     <d:item name="in nobr:nobr"
1073     modules="HTML::Parser">
1074     <d:message xml:lang="en">The <code>nobr</code> element cannot be
1075     nested.</d:message>
1076     </d:item>
1077    
1078     <d:item name="in noscript"
1079     modules="HTML::Parser">
1080     <d:message xml:lang="en">The <code><var>{text}</var></code> element is not
1081     allowed in a <code>noscript</code> element in the
1082     <code>head</code> element.</d:message>
1083     </d:item>
1084    
1085     <d:item name="in noscript:/"
1086     modules="HTML::Parser">
1087     <d:message xml:lang="en">An end tag <code>&lt;/<var>{text}</var>></code>
1088     appers before the <code>noscript</code> element is closed.</d:message>