1 |
wakaba |
1.1 |
<!DOCTYPE html> |
2 |
|
|
<html xmlns="http://www.w3.org/1999/xhtml" |
3 |
|
|
xmlns:d="http://suika.fam.cx/~wakaba/archive/2007/wdcc-desc/" |
4 |
|
|
id="error-description"> |
5 |
|
|
<head> |
6 |
|
|
<title xml:lang="en">Description of Errors — |
7 |
|
|
Web Document Conformance Checker (BETA)</title> |
8 |
|
|
<link rel="stylesheet" href="cc-style"/> |
9 |
|
|
<link rel="license" href="#license"/> |
10 |
|
|
</head> |
11 |
|
|
<body> |
12 |
|
|
<h1>Description of Errors</h1> |
13 |
|
|
|
14 |
wakaba |
1.16 |
<section id="html5-character-encoding"> |
15 |
|
|
<h2>HTML5 Character Encoding Errors</h2> |
16 |
|
|
|
17 |
|
|
<d:item name="character encoding" class="format-charset must" level="m"> |
18 |
|
|
<d:message xml:lang="en">Character encoding <code><var>$0</var></code> |
19 |
|
|
is not allowed for <abbr>HTML</abbr> document.</d:message> |
20 |
|
|
<d:desc xml:lang="en"> |
21 |
|
|
<p>The character encoding used for the document is not allowed |
22 |
|
|
for <abbr>HTML</abbr> document. The document is non‐conforming.</p> |
23 |
|
|
</d:desc> |
24 |
|
|
</d:item> |
25 |
|
|
|
26 |
|
|
<d:item name="character encoding" class="format-charset should" |
27 |
|
|
level="s"> |
28 |
|
|
<d:message xml:lang="en">Character encoding <code><var>$0</var></code> |
29 |
|
|
should not be used for <abbr>HTML</abbr> document.</d:message> |
30 |
|
|
<d:desc xml:lang="en"> |
31 |
|
|
<p>The character encoding used for the document is not recommended |
32 |
|
|
for <abbr>HTML</abbr> document. The document is non‐conforming |
33 |
|
|
unless there is any good reason to use that encoding.</p> |
34 |
|
|
</d:desc> |
35 |
|
|
</d:item> |
36 |
|
|
|
37 |
|
|
<d:item name="character encoding" class="format-charset warning" |
38 |
|
|
level="w"> |
39 |
|
|
<d:message xml:lang="en">Use of UTF-8 is encouraged.</d:message> |
40 |
|
|
<d:desc xml:lang="en"> |
41 |
|
|
<p>Use of UTF-8 as the character encoding of the document is encouraged, |
42 |
|
|
though the use of another character encoding is conforming.</p> |
43 |
|
|
</d:desc> |
44 |
|
|
</d:item> |
45 |
|
|
|
46 |
|
|
<d:item name="no character encoding declaration" class="format-charset error" |
47 |
|
|
level="m"> |
48 |
|
|
<d:message xml:lang="en">There is no character encoding |
49 |
|
|
declaration.</d:message> |
50 |
|
|
<d:desc xml:lang="en"> |
51 |
|
|
<p>The document does not contain a character encoding |
52 |
|
|
declaration. Unless the character encoding is explicitly |
53 |
|
|
specified in upper‐level protocol, e.g. in <abbr>HTTP</abbr>, |
54 |
|
|
or is implied by <abbr>BOM</abbr>, there must be a character |
55 |
|
|
encoding declaration. The document is non‐conforming.</p> |
56 |
|
|
|
57 |
|
|
<p>The long character encoding declaration syntax |
58 |
|
|
<code class="html bad example"><meta http-equiv="Content-Type" content="text/html; charset=<var>charset-name</var>"></code> |
59 |
|
|
is obsolete. The new syntax is:</p> |
60 |
|
|
<pre class="html example"><code><meta charset="<var>charset-name</var>"></code></pre> |
61 |
|
|
|
62 |
|
|
<p>Note that the <code>encoding</code> declaration in <abbr>XML</abbr> |
63 |
|
|
declaration has no effect for <abbr>HTML</abbr> document.</p> |
64 |
|
|
</d:desc> |
65 |
|
|
</d:item> |
66 |
|
|
|
67 |
|
|
<d:item name="non ascii superset" class="format-charset error" |
68 |
|
|
level="m"> |
69 |
|
|
<d:message xml:lang="en">No character encoding metadata is found |
70 |
|
|
in upper‐level protocol nor is there <abbr>BOM</abbr>, while |
71 |
|
|
character encoding <code><var>$0</var></code> |
72 |
|
|
is not a superset of <abbr>ASCII</abbr>.</d:message> |
73 |
|
|
<d:desc xml:lang="en"> |
74 |
|
|
<p>The document is not labeled with character encoding name |
75 |
|
|
in upper‐level protocol, e.g. in <abbr>HTTP</abbr>, and |
76 |
|
|
the document is not begin with <abbr>BOM</abbr>. In addition, |
77 |
|
|
the character encoding of the document is not a superset of |
78 |
|
|
<abbr>ASCII</abbr>. The document is non‐conforming.</p> |
79 |
|
|
|
80 |
|
|
<p>Unless there is a <abbr>BOM</abbr>, the character encoding |
81 |
|
|
for the document must be specified in e.g. <abbr>HTTP</abbr>‐level, |
82 |
|
|
as:</p> |
83 |
|
|
<pre class="http example"><code>Content-Type: text/html; charset=<var>charset-name</var></code></pre> |
84 |
|
|
|
85 |
|
|
<p>Existence of <abbr>HTML</abbr> character encoding declaration, i.e. |
86 |
|
|
<code class="html example"><meta charset="<var>charset-name</var>"></code>, |
87 |
|
|
does not allow to omit <code>charset</code> parameter |
88 |
|
|
for <abbr>HTML</abbr> document encoded in non‐<abbr>ASCII</abbr> |
89 |
|
|
compatible encoding.</p> |
90 |
|
|
|
91 |
|
|
<p>Character encodings <code>Shift_JIS</code>, <code>Windows-31J</code>, |
92 |
|
|
and <code>ISO-2022-JP</code> are <em>not</em> a superset of |
93 |
|
|
<abbr>ASCII</abbr> for the purpose of <abbr>HTML</abbr> conformance.</p> |
94 |
|
|
</d:desc> |
95 |
|
|
</d:item> |
96 |
|
|
|
97 |
|
|
<d:item name="charset label detected" class="format-charset warning" |
98 |
|
|
level="w"> |
99 |
|
|
<d:message xml:lang="en">While parsing the document as |
100 |
|
|
<code><var>$0</var></code>, a character encoding declaration specifying |
101 |
|
|
character encoding as <code><var>$1</var></code> is found. The document |
102 |
|
|
is reparsed.</d:message> |
103 |
|
|
<d:desc xml:lang="en"> |
104 |
|
|
<p>While parsing a document in a character encoding, |
105 |
|
|
a character encoding declaration which declares the character |
106 |
|
|
encoding of the document as another character encoding is found. |
107 |
|
|
The occurence of this warning itself does not make the document |
108 |
|
|
non‐conforming. However, the failure of the first attempt to |
109 |
|
|
to detect the character encoding might be the result of non‐conformance |
110 |
|
|
of the document.</p> |
111 |
|
|
|
112 |
|
|
<p>The document will be reparsed from the beginning. Some error |
113 |
|
|
or warning might be reported again.</p> |
114 |
|
|
|
115 |
|
|
<p>These are suggestions to avoid this warning:</p> |
116 |
|
|
<ul> |
117 |
|
|
<li>Specify <code>charset</code> parameter in the <code>Content-Type</code> |
118 |
|
|
field in the <abbr>HTTP</abbr> header, as: |
119 |
|
|
<pre class="HTTP example"><code>Content-Type: text/html; charset="<var>charset-name</var>"</code></pre></li> |
120 |
|
|
<li>Put the character encoding declaration |
121 |
|
|
(<code class="html example"><meta charset="<var>charset-name</var>"></code>) |
122 |
|
|
just after <code class="html example"><head></code> start tag.</li> |
123 |
|
|
<li>Use <code>UTF-8</code>.</li> |
124 |
|
|
</ul> |
125 |
|
|
</d:desc> |
126 |
|
|
</d:item> |
127 |
|
|
</section> |
128 |
|
|
|
129 |
wakaba |
1.2 |
<section id="html5-tokenize-error"> |
130 |
|
|
<h2>HTML5 Parse Errors in Tokenization Stage</h2> |
131 |
wakaba |
1.1 |
|
132 |
wakaba |
1.3 |
<d:item name="after html" |
133 |
|
|
class="parse-error"> |
134 |
|
|
<d:message xml:lang="en">Tag <code><<var>$0</var>></code> |
135 |
|
|
is not allowed after the end tag <code></html></code>.</d:message> |
136 |
|
|
<d:desc xml:lang="en"> |
137 |
|
|
<p>The start or end tag of an element appears after the |
138 |
|
|
<code>html</code> element has been closed. The document is |
139 |
|
|
non-conforming.</p> |
140 |
|
|
|
141 |
|
|
<p>Any content of the document other than comments |
142 |
|
|
must be put into the <code>html</code> element.</p> |
143 |
|
|
</d:desc> |
144 |
|
|
</d:item> |
145 |
|
|
|
146 |
wakaba |
1.7 |
<d:item name="after body" |
147 |
|
|
class="parse-error"> |
148 |
|
|
<d:message xml:lang="en">Tag <code><<var>$0</var>></code> |
149 |
|
|
is not allowed after the end tag <code></body></code>.</d:message> |
150 |
|
|
<d:desc xml:lang="en"> |
151 |
|
|
<p>The start or end tag of an element appears after the |
152 |
|
|
<code>body</code> element has been closed. The document is |
153 |
|
|
non-conforming.</p> |
154 |
|
|
|
155 |
|
|
<p>Any content of the document other than <code>head</code> |
156 |
|
|
contents and comments must be put into the <code>body</code> |
157 |
|
|
element.</p> |
158 |
|
|
</d:desc> |
159 |
|
|
</d:item> |
160 |
|
|
|
161 |
wakaba |
1.3 |
<d:item name="bare ero" |
162 |
|
|
class="tokenize-error"> |
163 |
|
|
<d:message xml:lang="en">The <code>&</code> character must |
164 |
|
|
introduce a reference.</d:message> |
165 |
|
|
<d:desc xml:lang="en"> |
166 |
wakaba |
1.15 |
<p>An <code>&</code> character which |
167 |
wakaba |
1.3 |
is not part of any reference appears in the input stream. |
168 |
wakaba |
1.15 |
The document is non‐conforming.</p> |
169 |
wakaba |
1.3 |
|
170 |
wakaba |
1.15 |
<p><em>Any <code>&</code> character in URI (or IRI) |
171 |
|
|
must be escaped as <code class="example">&amp;</code>.</em></p> |
172 |
wakaba |
1.9 |
|
173 |
wakaba |
1.3 |
<p>The <code>&</code> character must |
174 |
|
|
be the first character of a reference: |
175 |
wakaba |
1.15 |
<dl class="switch"> |
176 |
wakaba |
1.3 |
<dt>Named entity reference</dt> |
177 |
|
|
<dd><pre class="html example"><code>&<var>entity-name</var>;</code></pre> |
178 |
|
|
where <var>entity-name</var> is the name of the |
179 |
|
|
character entity to be referenced.</dd> |
180 |
|
|
<dt>Numeric character reference</dt> |
181 |
|
|
<dd><pre class="html example"><code>&#<var>d</var>;</code></pre> |
182 |
|
|
where <var>d</var> is the decimal representation of |
183 |
|
|
the code position of the character to be referenced.</dd> |
184 |
|
|
<dt>Hexadecimal character reference</dt> |
185 |
|
|
<dd><pre class="html example"><code>&#x<var>h</var>;</code></pre> |
186 |
|
|
where <var>h</var> is the hexadecimal representation |
187 |
|
|
of the code position of the character to be referenced.</dd> |
188 |
|
|
</dl> |
189 |
|
|
</p> |
190 |
|
|
|
191 |
|
|
<p>To represent <code>&</code> as a data character, use |
192 |
|
|
named entity reference: |
193 |
|
|
<pre class="html example"><code>&amp;</code></pre> |
194 |
|
|
</p> |
195 |
|
|
</d:desc> |
196 |
|
|
</d:item> |
197 |
|
|
|
198 |
wakaba |
1.7 |
<d:item name="bare etago" |
199 |
|
|
class="tokenize-error"> |
200 |
|
|
<d:message xml:lang="en">A <code></</code> string is not followed |
201 |
|
|
by a tag name.</d:message><!-- </ EOF --> |
202 |
|
|
<d:desc xml:lang="en"> |
203 |
|
|
<p>There is a <code><</code> (<code>U+003C</code> |
204 |
|
|
<code class="charname">LESS-THAN SIGN</code>) character |
205 |
|
|
immediately followed by a <code>/</code> (<code>U+005F</code> |
206 |
|
|
<code>SOLIDUS</code>) character, which is not part |
207 |
|
|
of any end tag, in the input stream. The document |
208 |
|
|
is non-conforming.</p> |
209 |
|
|
|
210 |
|
|
<p>The <code></</code> sequence immediately followed |
211 |
|
|
by an <abbr title="End of file pseudo-character">EOF</abbr> is |
212 |
|
|
interpreted as a string data of <code></</code>.</p> |
213 |
|
|
|
214 |
|
|
<p>The <code></</code> sequence as string data must |
215 |
|
|
be escaped as: |
216 |
|
|
<pre class="html example"><code>&lt;/</code></pre> |
217 |
|
|
</p> |
218 |
|
|
</d:desc> |
219 |
|
|
</d:item> |
220 |
|
|
|
221 |
wakaba |
1.4 |
<d:item name="bare stago" |
222 |
|
|
class="tokenize-error"> |
223 |
|
|
<d:message xml:lang="en">A <code><</code> character is not followed |
224 |
|
|
by tag name or by a <code>!</code> character.</d:message> |
225 |
|
|
<d:desc xml:lang="en"> |
226 |
wakaba |
1.6 |
<p>A <code><</code> (<code>U+003C</code> |
227 |
|
|
<code class="charname">LESS-THAN SIGN</code>) character which is not part |
228 |
|
|
of any markup appears in the input stream.</p> |
229 |
wakaba |
1.4 |
|
230 |
|
|
<p>The <code><</code> character as a data character must |
231 |
|
|
be escaped as: |
232 |
wakaba |
1.6 |
<pre class="html example"><code>&lt;</code></pre> |
233 |
wakaba |
1.4 |
</p> |
234 |
|
|
</d:desc> |
235 |
|
|
</d:item> |
236 |
|
|
|
237 |
wakaba |
1.3 |
<d:item name="bare nero" |
238 |
|
|
class="tokenize-error"> |
239 |
|
|
<d:message xml:lang="en">The decimal representation of the code position |
240 |
|
|
of a character must be specified after <code>&#</code>.</d:message> |
241 |
|
|
<d:desc xml:lang="en"> |
242 |
|
|
<p>An <code>&</code> (<code>U+0026</code> |
243 |
|
|
<code class="charname">AMPERSAND</code>) character immediately |
244 |
|
|
followed by a <code>#</code> (<code>U+0023</code> |
245 |
|
|
<code>NUMBER SIGN</code>) character which |
246 |
|
|
is not part of any reference appears in the input stream. |
247 |
|
|
The document is non-conforming.</p> |
248 |
|
|
|
249 |
|
|
<p>The string <code>&#</code> must be the first two characters |
250 |
|
|
of a reference: |
251 |
wakaba |
1.15 |
<dl class="switch"> |
252 |
wakaba |
1.3 |
<dt>Numeric character reference</dt> |
253 |
|
|
<dd><pre class="html example"><code>&#<var>d</var>;</code></pre> |
254 |
|
|
where <var>d</var> is the decimal representation of |
255 |
|
|
the code point of the character to be referenced.</dd> |
256 |
|
|
<dt>Hexadecimal character reference</dt> |
257 |
|
|
<dd><pre class="html example"><code>&#x<var>h</var>;</code></pre> |
258 |
|
|
where <var>h</var> is the hexadecimal representation |
259 |
|
|
of the code point of the character to be referenced.</dd> |
260 |
|
|
</dl> |
261 |
|
|
</p> |
262 |
|
|
|
263 |
|
|
<p>To represent <code>&#</code> as data characters, use |
264 |
wakaba |
1.6 |
a named entity reference for the <code>&</code> character: |
265 |
wakaba |
1.3 |
<pre class="html example"><code>&amp;#</code></pre> |
266 |
|
|
</p> |
267 |
|
|
</d:desc> |
268 |
|
|
</d:item> |
269 |
|
|
|
270 |
|
|
<d:item name="bare hcro" |
271 |
|
|
class="tokenize-error"> |
272 |
|
|
<d:message xml:lang="en">The hexadecimal representation of the code position |
273 |
|
|
of a character must be specified after <code>&#x</code>.</d:message> |
274 |
|
|
<d:desc xml:lang="en"> |
275 |
|
|
<p>The string <code>&#x</code> or <code>&#X</code> which |
276 |
|
|
is not part of any reference appears in the input stream. |
277 |
|
|
The document is non-conforming.</p> |
278 |
|
|
|
279 |
|
|
<p>The string <code>&#x</code> or <code>&#X</code> must |
280 |
|
|
be the first three characters of a hexadecimal reference: |
281 |
|
|
<pre class="html example"><code>&#x<var>h</var>;</code></pre> |
282 |
|
|
where <var>h</var> is the hexadecimal representation |
283 |
|
|
of the code point of the character to be referenced.</p> |
284 |
|
|
|
285 |
|
|
<p>To represent <code>&#x</code> as data characters, use |
286 |
wakaba |
1.6 |
a named entity reference for the <code>&</code> character: |
287 |
wakaba |
1.3 |
<pre class="html example"><code>&amp;#x</code></pre> |
288 |
|
|
</p> |
289 |
|
|
</d:desc> |
290 |
|
|
</d:item> |
291 |
|
|
|
292 |
wakaba |
1.9 |
<d:item name="bogus comment" |
293 |
|
|
class="tokenize-error"> |
294 |
|
|
<d:message xml:lang="en">String <code><!</code> is not followed |
295 |
|
|
by <code>--</code>.</d:message> |
296 |
|
|
<d:desc xml:lang="en"> |
297 |
|
|
<p>There is a <code><</code> (<code>U+003C</code> |
298 |
|
|
<code class="charname">LESS-THAN SIGN</code>) character |
299 |
|
|
followed by a <code>!</code> (<code>U+0021</code> |
300 |
|
|
<code class="charname">EXCLAMATION MARK</code>) character, |
301 |
|
|
which is not followed by a <code>--</code> or |
302 |
|
|
<code>!DOCTYPE</code>. The document is non-conforming.</p> |
303 |
|
|
|
304 |
|
|
<dl class="switch"> |
305 |
|
|
<dt>Comments</dt> |
306 |
wakaba |
1.15 |
<dd>In HTML document, comments must be introduced by |
307 |
|
|
<code class="example"><!--</code> (<code><!</code> |
308 |
|
|
<em>immediately</em> followed |
309 |
wakaba |
1.9 |
by <em>two</em> <code>-</code>s) and must be terminated by |
310 |
wakaba |
1.15 |
<code class="example">--></code>. |
311 |
|
|
Strings <code><!</code> not followed |
312 |
wakaba |
1.9 |
by <code>--</code> and <code><!-</code> not followed by |
313 |
|
|
<code>-</code> are not valid open delimiters for comments.</dd> |
314 |
|
|
<dt>Marked sections, including <code>CDATA</code> sections</dt> |
315 |
wakaba |
1.15 |
<dd>Marked sections are not allowed in HTML document.</dd> |
316 |
wakaba |
1.9 |
<dt>Markup declarations</dt> |
317 |
wakaba |
1.15 |
<dd>Markup declarations, except for <code>DOCTYPE</code> |
318 |
|
|
and comment declarations, are not allowed in HTML document.</dd> |
319 |
wakaba |
1.9 |
<dt>String <code><!</code></dt> |
320 |
|
|
<dd>String <code><!</code> must be escaped as |
321 |
wakaba |
1.15 |
<code class="example">&lt;!</code>.</dd> |
322 |
wakaba |
1.9 |
</dl> |
323 |
|
|
</d:desc> |
324 |
|
|
</d:item> |
325 |
|
|
|
326 |
wakaba |
1.7 |
<d:item name="bogus end tag" |
327 |
|
|
class="tokenize-error"> |
328 |
wakaba |
1.9 |
<d:message xml:lang="en">String <code></</code> is not followed |
329 |
|
|
by tag name.</d:message><!-- </ non-name-start-char-non-EOF --> |
330 |
wakaba |
1.7 |
<d:desc xml:lang="en"> |
331 |
|
|
<p>There is a <code><</code> (<code>U+003C</code> |
332 |
|
|
<code class="charname">LESS-THAN SIGN</code>) character |
333 |
|
|
immediately followed by a <code>/</code> (<code>U+005F</code> |
334 |
|
|
<code>SOLIDUS</code>) character, which is not part |
335 |
|
|
of any end tag, in the input stream. The document |
336 |
|
|
is non-conforming.</p> |
337 |
|
|
|
338 |
|
|
<p>The <code></</code> sequence not followed by a |
339 |
|
|
tag name is parsed as an opening of bogus comment.</p> |
340 |
|
|
|
341 |
|
|
<p>The <code></</code> sequence as string data must |
342 |
|
|
be escaped as: |
343 |
|
|
<pre class="html example"><code>&lt;/</code></pre> |
344 |
|
|
</p> |
345 |
|
|
</d:desc> |
346 |
|
|
</d:item> |
347 |
|
|
|
348 |
wakaba |
1.4 |
<d:item name="dash in comment" |
349 |
|
|
class="tokenize-error"> |
350 |
|
|
<d:message xml:lang="en">There is a <code>--</code> sequence |
351 |
|
|
in a comment.</d:message> |
352 |
|
|
<d:desc xml:lang="en"> |
353 |
|
|
<p>There is a <code>-</code> (<code>U+002D</code> |
354 |
|
|
<code class="charname">HYPHEN-MINUS</code>) character |
355 |
|
|
at the end of the comment or a <code>--</code> sequence |
356 |
|
|
in the comment. The document is non-conforming.</p> |
357 |
|
|
|
358 |
|
|
<p>Comments cannot contain a string <code>--</code>, as in XML. |
359 |
|
|
Unlike SGML, there cannot be more than one comments |
360 |
|
|
(where <i>comment</i> is an SGML term) in the comment |
361 |
|
|
declaration.</p> |
362 |
|
|
</d:desc> |
363 |
|
|
</d:item> |
364 |
|
|
|
365 |
wakaba |
1.1 |
<d:item name="duplicate attribute" |
366 |
|
|
class="tokenize-error"> |
367 |
wakaba |
1.6 |
<d:message xml:lang="en">There are two attributes with name |
368 |
|
|
<code><var>$0</var></code>.</d:message> |
369 |
wakaba |
1.1 |
<d:desc xml:lang="en"> |
370 |
wakaba |
1.3 |
<p>There are more than one attributes with the same |
371 |
|
|
name in a tag. The document is non-conforming.</p> |
372 |
wakaba |
1.1 |
|
373 |
|
|
<p>The <code>motion</code> attribute is not part of the HTML standard. |
374 |
|
|
Use <code>img</code> element with animation GIF instead.</p> |
375 |
|
|
</d:desc> |
376 |
|
|
</d:item> |
377 |
|
|
|
378 |
|
|
<d:item name="nestc" |
379 |
|
|
class="tokenize-error"> |
380 |
wakaba |
1.10 |
<d:message xml:lang="en">Polytheistic slash (<code>/></code>) cannot be |
381 |
wakaba |
1.1 |
used for this element.</d:message> |
382 |
|
|
<d:desc xml:lang="en"> |
383 |
wakaba |
1.10 |
<p>Polytheistic slash (<code>/></code>) must not be used |
384 |
wakaba |
1.3 |
for the element. The document is non-conforming.</p> |
385 |
|
|
|
386 |
wakaba |
1.10 |
<p>The polytheistic slash can only be |
387 |
wakaba |
1.1 |
used for <code>base</code>, <code>link</code>, <code>meta</code>, |
388 |
|
|
<code>hr</code>, <code>br</code>, <code>img</code>, |
389 |
|
|
<code>embed</code>, <code>param</code>, <code>area</code>, |
390 |
wakaba |
1.3 |
<code>col</code>, and <code>input</code> elements.</p> |
391 |
wakaba |
1.1 |
|
392 |
wakaba |
1.12 |
<dl class="switch"> |
393 |
wakaba |
1.9 |
<dt><code><script/></code></dt> |
394 |
wakaba |
1.10 |
<dd><p>The polytheistic slash cannot be used for <code>script</code> |
395 |
wakaba |
1.9 |
element. Even for an empty <code>script</code> element, |
396 |
wakaba |
1.15 |
there must be an explicit end tag |
397 |
|
|
<code class="html example"></script></code>.</p> |
398 |
wakaba |
1.9 |
|
399 |
|
|
<p><strong>NOTE</strong>: Though some user agents interpret |
400 |
wakaba |
1.10 |
polytheistic slash for <code>script</code> element as the |
401 |
wakaba |
1.9 |
closing of the element, such usage is not allowed under |
402 |
|
|
the current standard.</p></dd> |
403 |
|
|
<dt><code><basefont/></code>, <code><bgsound/></code>, |
404 |
|
|
<code><frame/></code>, <code><keygen/></code>, |
405 |
|
|
<code><spacer/></code>, <code><wbr/></code></dt> |
406 |
|
|
<dd>These elements are themselves non-conforming.</dd> |
407 |
|
|
<!-- isindex, image --> |
408 |
|
|
<dt><code><command/></code>, <code><event-source/></code>, |
409 |
wakaba |
1.12 |
<code><nest/></code>, or <code><source/></code></dt> |
410 |
wakaba |
1.9 |
<dd>Future revision of HTML5 parsing algorithm is expected |
411 |
wakaba |
1.10 |
to allow polytheistic slash for these elements.</dd> |
412 |
wakaba |
1.9 |
<dt><code><a/></code>, <code><p/></code></dt> |
413 |
|
|
<dd>These elements are not always empty and therefore |
414 |
wakaba |
1.15 |
polytheistic slash is not allowed. Use explicit end tag |
415 |
|
|
to represent empty element as: |
416 |
|
|
<pre class="example html"><code><p></p></code></pre> |
417 |
|
|
</dd> |
418 |
wakaba |
1.9 |
</dl> |
419 |
|
|
|
420 |
wakaba |
1.10 |
<p>Note that, unlike in XML, the polytheistic slash has |
421 |
wakaba |
1.1 |
no effect in HTML.</p> |
422 |
|
|
</d:desc> |
423 |
|
|
</d:item> |
424 |
|
|
|
425 |
wakaba |
1.5 |
|
426 |
|
|
<d:item name="pio" |
427 |
|
|
class="tokenize-error"> |
428 |
|
|
<d:message xml:lang="en">Processing instruction |
429 |
wakaba |
1.9 |
(<code><?<var>...</var>></code>) cannot be used.</d:message> |
430 |
wakaba |
1.5 |
<d:desc xml:lang="en"> |
431 |
|
|
<p>Processing instructions (<code><?<var>...</var>?></code>), |
432 |
|
|
including XML declaration (<code><?xml <var>...</var>?></code>) |
433 |
|
|
and XML style sheet <abbr title="processing instruction">PI</abbr> |
434 |
wakaba |
1.9 |
(<code><?xml-stylesheet <var>...</var>?></code>), are not allowed |
435 |
wakaba |
1.5 |
in the HTML syntax. The document is non-conforming.</p> |
436 |
|
|
|
437 |
wakaba |
1.12 |
<dl class="switch"> |
438 |
|
|
<dt><code><?xbl?></code> (<abbr>XBL</abbr> Association)</dt> |
439 |
|
|
<dd>An <abbr>XBL</abbr> binding cannot be associated by |
440 |
|
|
<abbr title="processing instruction">PI</abbr> in <abbr>HTML</abbr> |
441 |
|
|
document. Use <code>binding</code> property in <abbr>CSS</abbr> |
442 |
wakaba |
1.15 |
style sheet as: |
443 |
|
|
<pre class="html example"><code><style> |
444 |
|
|
p { |
445 |
|
|
binding: url(binding.xbl); |
446 |
|
|
} |
447 |
|
|
</style></code></pre> |
448 |
|
|
</dd> |
449 |
wakaba |
1.9 |
<dt><code><?xml?></code> (XML declaration)</dt> |
450 |
|
|
<dd>XML declaration is unnecessary for HTML documents.</dd> |
451 |
|
|
<dt><code><?xml-stylesheet?></code> (XML style sheet |
452 |
wakaba |
1.12 |
<abbr title="processing instruction">PI</abbr>)</dt> |
453 |
wakaba |
1.9 |
<dd>Use HTML <code>link</code> element with <code>rel</code> |
454 |
|
|
attribute set to <code>stylesheet</code> (or, |
455 |
|
|
<code>alternate stylesheet</code> for an alternate style |
456 |
wakaba |
1.15 |
sheet). |
457 |
|
|
<pre class="example html"><code><link rel=stylesheet href="path/to/stylesheet.css"></code></pre> |
458 |
|
|
</dd> |
459 |
wakaba |
1.12 |
<dt><code><?php?></code> or |
460 |
|
|
<code><? <var>... <abbr>PHP</abbr> code ...</var> ?></code> |
461 |
|
|
(<abbr>PHP</abbr> code)</dt> |
462 |
wakaba |
1.9 |
<dd>The conformance checker does <em>not</em> support |
463 |
|
|
checking for PHP source documents.</dd> |
464 |
|
|
<dt>Other processing instructions</dt> |
465 |
|
|
<dd>Processing instructions cannot be inserted in an HTML |
466 |
|
|
document. Use XML document or insert |
467 |
|
|
<code>ProcessingInstruction</code> node by scripting.</dd> |
468 |
|
|
</dl> |
469 |
wakaba |
1.5 |
|
470 |
|
|
<p>Web browsers will parse processing instructions as bogus |
471 |
|
|
comments. Some legacy Web browsers, such as IE:mac and |
472 |
wakaba |
1.9 |
some mobile Web browsers, will display processing instructions |
473 |
wakaba |
1.5 |
as string.</p> |
474 |
|
|
</d:desc> |
475 |
|
|
</d:item> |
476 |
|
|
|
477 |
wakaba |
1.1 |
</section> |
478 |
|
|
|
479 |
wakaba |
1.2 |
<section id="html5-parse-errors"> |
480 |
|
|
<h2>HTML5 Parse Errors in Tree Construction Stage</h2> |
481 |
|
|
|
482 |
|
|
<d:item name="after head" |
483 |
|
|
class="parse-error"> |
484 |
|
|
<d:message xml:lang="en">The <code><var>$0</var></code> element cannot be |
485 |
|
|
inserted between <code>head</code> and <code>body</code> elements.</d:message> |
486 |
|
|
<d:desc xml:lang="en"> |
487 |
wakaba |
1.3 |
<p>A start tag appears after the <code>head</code> element is closed |
488 |
wakaba |
1.2 |
but before the <code>body</code> element is opened. |
489 |
|
|
The document is non-conforming.</p> |
490 |
|
|
</d:desc> |
491 |
|
|
</d:item> |
492 |
|
|
|
493 |
wakaba |
1.4 |
<d:item name="DOCTYPE in the middle" |
494 |
|
|
class="parse-error"> |
495 |
|
|
<d:message xml:lang="en">A <code>DOCTYPE</code> appears after any |
496 |
|
|
element or data character has been seen.</d:message> |
497 |
|
|
<d:desc xml:lang="en"> |
498 |
|
|
<p>A <code>DOCTYPE</code> appears after any element or data character |
499 |
|
|
has been seen. The document is non-conforming.</p> |
500 |
|
|
|
501 |
|
|
<p>The <code>DOCTYPE</code> must be placed before any |
502 |
|
|
tag, reference, or data character. Only white space characters |
503 |
|
|
and comments can be inserted before the <code>DOCTYPE</code>.</p> |
504 |
|
|
</d:desc> |
505 |
|
|
</d:item> |
506 |
|
|
|
507 |
wakaba |
1.5 |
<d:item name="in a:a" |
508 |
|
|
class="parse-error"> |
509 |
|
|
<d:message xml:lang="en">Anchor cannot be nested.</d:message> |
510 |
|
|
<d:desc xml:lang="en"> |
511 |
|
|
<p>HTML <code>a</code> elements cannot be nested. |
512 |
|
|
The document is non-conforming.</p> |
513 |
|
|
|
514 |
|
|
<p>In the HTML syntax, a start tag of the <code>a</code> |
515 |
|
|
implies the end tag of any opening <code>a</code> element.</p> |
516 |
|
|
</d:desc> |
517 |
|
|
</d:item> |
518 |
|
|
|
519 |
wakaba |
1.4 |
<d:item name="in body" |
520 |
|
|
class="parse-error"> |
521 |
|
|
<d:message xml:lang="en">Tag <code><<var>$0</var>></code> |
522 |
wakaba |
1.9 |
is not allowed in the <code>body</code> element.</d:message> |
523 |
wakaba |
1.4 |
<d:desc xml:lang="en"> |
524 |
|
|
<p>The start or end tag of an element, which |
525 |
|
|
cannot be a descendant of <code>body</code> element, appears |
526 |
|
|
in the input stream while the <code>body</code> element has been opened. |
527 |
|
|
The document is non-conforming.</p> |
528 |
|
|
</d:desc> |
529 |
|
|
</d:item> |
530 |
|
|
|
531 |
wakaba |
1.5 |
<d:item name="in head:head" |
532 |
|
|
class="parse-error"> |
533 |
wakaba |
1.9 |
<d:message xml:lang="en">Start tag <code><head></code> |
534 |
wakaba |
1.5 |
is not allowed in the <code>head</code> element.</d:message> |
535 |
|
|
<d:desc xml:lang="en"> |
536 |
|
|
<p>There is a start tag <code><head></code> in the |
537 |
|
|
<code><head></code> element. The document is non-conforming.</p> |
538 |
|
|
|
539 |
|
|
<p>In an HTML document there must not be more than |
540 |
|
|
one <code>head</code> element, therefore no more than one |
541 |
|
|
start tag <code><head></code> can appear in the input stream.</p> |
542 |
|
|
</d:desc> |
543 |
|
|
</d:item> |
544 |
|
|
|
545 |
wakaba |
1.3 |
<d:item name="in table" |
546 |
|
|
class="parse-error"> |
547 |
|
|
<d:message xml:lang="en">Tag <code><<var>$0</var>></code> |
548 |
wakaba |
1.5 |
is not allowed in a <code>table</code> element.</d:message> |
549 |
wakaba |
1.3 |
<d:desc xml:lang="en"> |
550 |
wakaba |
1.4 |
<p>The start or end tag of an element, which |
551 |
|
|
cannot be a child of <code>table</code> element, appears |
552 |
|
|
in the input stream while the <code>table</code> element has been opened |
553 |
|
|
but no other element has been opened. The document is non-conforming.</p> |
554 |
wakaba |
1.3 |
|
555 |
|
|
<p>In <code>table</code>, only table related elements |
556 |
|
|
are allowed; any other element must be contained in |
557 |
|
|
<code>td</code> or <code>th</code> element to form |
558 |
|
|
a part of the table, or <code>caption</code> element to create |
559 |
|
|
a table caption.</p> |
560 |
|
|
</d:desc> |
561 |
|
|
</d:item> |
562 |
|
|
|
563 |
|
|
<d:item name="in table:#character" |
564 |
|
|
class="parse-error"> |
565 |
|
|
<d:message xml:lang="en">Data character is not allowed in |
566 |
|
|
<code>table</code>.</d:message> |
567 |
|
|
<d:desc xml:lang="en"> |
568 |
|
|
<p>A data character appears in <code>table</code>. The document |
569 |
|
|
is non-conforming.</p> |
570 |
|
|
|
571 |
|
|
<p>In <code>table</code>, only table related elements |
572 |
|
|
are allowed; any other element and data character must be contained in |
573 |
|
|
<code>td</code> or <code>th</code> element to form |
574 |
|
|
a part of the table, or <code>caption</code> element to create |
575 |
|
|
a table caption.</p> |
576 |
|
|
</d:desc> |
577 |
|
|
</d:item> |
578 |
|
|
|
579 |
|
|
<d:item name="missing start tag:tr" |
580 |
|
|
class="parse-error"> |
581 |
|
|
<d:message xml:lang="en">Start tag of <code>tr</code> |
582 |
|
|
element is missing.</d:message> |
583 |
|
|
<d:desc> |
584 |
|
|
<p>Start tag of a <code>tr</code> element, which is <em>not</em> |
585 |
|
|
optional, is missing. The document is non-conforming.</p> |
586 |
|
|
|
587 |
|
|
<p>In a table section, a <code><tr></code> start tag |
588 |
|
|
must occur before any <code><td></code> or |
589 |
|
|
<code><th></code> start tag. Though the HTML5 parser |
590 |
|
|
implies the <code><tr></code> start tag before |
591 |
|
|
these start tags, it must be explicitly specified.</p> |
592 |
|
|
</d:desc> |
593 |
|
|
</d:item> |
594 |
|
|
|
595 |
wakaba |
1.2 |
<d:item name="no DOCTYPE" |
596 |
|
|
class="parse-error"> |
597 |
wakaba |
1.6 |
<d:message xml:lang="en">This document does not start with a |
598 |
wakaba |
1.3 |
<code>DOCTYPE</code>.</d:message> |
599 |
|
|
<d:desc> |
600 |
|
|
<p>The document does not start with a <code>DOCTYPE</code>. |
601 |
|
|
The document is non-conforming.</p> |
602 |
|
|
|
603 |
|
|
<p>An HTML document must start by a <code>DOCTYPE</code>: |
604 |
|
|
<pre class="html example"><code><!DOCTYPE HTML></code></pre> |
605 |
|
|
</p> |
606 |
|
|
|
607 |
|
|
<p>Only white space characters and comments are allowed |
608 |
wakaba |
1.12 |
before the <code>DOCTYPE</code>. XML declaration is <em>not</em> |
609 |
|
|
allowed in HTML document.</p> |
610 |
wakaba |
1.3 |
</d:desc> |
611 |
wakaba |
1.2 |
</d:item> |
612 |
|
|
|
613 |
|
|
<d:item name="not closed" |
614 |
|
|
class="parse-error"> |
615 |
|
|
<d:message xml:lang="en">Element <code><var>$0</var></code> is not |
616 |
|
|
closed.</d:message> |
617 |
wakaba |
1.3 |
<d:desc> |
618 |
|
|
<p>End tag of an element is not found before, for example, |
619 |
|
|
an end tag of another element appears or |
620 |
|
|
the end of the document. The document is non-conforming.</p> |
621 |
wakaba |
1.10 |
|
622 |
wakaba |
1.11 |
<p>Only <code>body</code>, <code>colgroup</code>, <code>dd</code>, |
623 |
|
|
<code>dt</code>, <code>head</code>, <code>html</code>, <code>li</code>, |
624 |
wakaba |
1.10 |
<code>ol</code>, <code>option</code>, <code>optgroup</code>, |
625 |
wakaba |
1.11 |
<code>p</code>, <code>rb</code>, <code>rp</code>, <code>rt</code>, |
626 |
|
|
<code>tbody</code>, <code>td</code>, <code>tfoot</code>, |
627 |
|
|
<code>th</code>, <code>thead</code>, <code>tr</code>, |
628 |
|
|
<code>ul</code> end tag can be omitted in HTML documents. |
629 |
wakaba |
1.10 |
For any element except for void element, there must be an explicit |
630 |
|
|
end tag.</p> |
631 |
|
|
|
632 |
wakaba |
1.12 |
<dl class="switch"> |
633 |
|
|
<dt>HTML <code>canvas</code> element</dt> |
634 |
|
|
<dd>Though the element is void in earlier versions of Safari, |
635 |
|
|
the <code>canvas</code> element is <em>no</em> longer |
636 |
|
|
defined as empty. There must be an end tag |
637 |
wakaba |
1.15 |
<code class="html example"></canvas></code>.</dd> |
638 |
wakaba |
1.12 |
</dl> |
639 |
|
|
|
640 |
wakaba |
1.10 |
<p>Note that misnesting tags, such as |
641 |
|
|
<code class="bad example"><a><b></a></b></code>, are not |
642 |
|
|
allowed and they also cause this error.</p> |
643 |
wakaba |
1.3 |
</d:desc> |
644 |
wakaba |
1.2 |
</d:item> |
645 |
|
|
|
646 |
wakaba |
1.6 |
<d:item name="not first start tag" |
647 |
|
|
class="parse-error"> |
648 |
|
|
<d:message xml:lang="en">This <code><html></code> tag is not |
649 |
|
|
the first start tag.</d:message> |
650 |
|
|
<d:desc> |
651 |
|
|
<p>There is a start tag of the <code>html</code> element |
652 |
|
|
that it not the first start tag in the input stream. |
653 |
|
|
The document is non-conforming.</p> |
654 |
|
|
|
655 |
|
|
<p>In an HTML document, there cannot be more than one |
656 |
|
|
<code>html</code> element and therefore there cannot be |
657 |
|
|
more than one <code><html></code> tag. In addition, |
658 |
|
|
nothing can be placed before the <code><html></code> tag |
659 |
|
|
except a <code>DOCTYPE</code>, white space characters, |
660 |
|
|
and comments.</p> |
661 |
|
|
</d:desc> |
662 |
|
|
</d:item> |
663 |
|
|
|
664 |
wakaba |
1.2 |
<d:item name="not HTML5" |
665 |
|
|
class="parse-error"> |
666 |
|
|
<d:message xml:lang="en">This document is written in an old version of |
667 |
|
|
HTML.</d:message> |
668 |
wakaba |
1.3 |
<d:desc xml:lang="en"> |
669 |
|
|
<p>The document contains a <code>DOCTYPE</code> declaration |
670 |
wakaba |
1.6 |
that is different from HTML5 <code>DOCTYPE</code> (i.e. |
671 |
wakaba |
1.15 |
<code class="example html"><!DOCTYPE HTML></code>). |
672 |
|
|
The document is non‐conforming.</p> |
673 |
wakaba |
1.3 |
|
674 |
|
|
<p>The document might or might not be conformant to |
675 |
|
|
some version of HTML. However, conformance to any HTML |
676 |
|
|
specification other than HTML5 provides for no practical |
677 |
|
|
convenience, since Web borwsers will parse any |
678 |
|
|
HTML document (roughly) as defined in HTML5.</p> |
679 |
|
|
</d:desc> |
680 |
wakaba |
1.2 |
</d:item> |
681 |
|
|
|
682 |
|
|
<d:item name="unmatched end tag" |
683 |
|
|
class="parse-error"> |
684 |
|
|
<d:message xml:lang="en">Element <code><var>$0</var></code> is not |
685 |
|
|
opened.</d:message> |
686 |
wakaba |
1.4 |
<d:desc> |
687 |
|
|
<p>An end tag appears though no element with the same name |
688 |
|
|
has been opened. The document is non-conforming.</p> |
689 |
|
|
|
690 |
|
|
<p>For any end tag in HTML document, there must be a |
691 |
|
|
corresponding start tag.</p> |
692 |
wakaba |
1.12 |
|
693 |
|
|
<dl class="switch"> |
694 |
|
|
<dt>HTML <code>base</code>, <code>basefont</code>, |
695 |
|
|
<code>bgsound</code>, <code>br</code>, <code>col</code>, |
696 |
|
|
<code>embed</code>, <code>frame</code>, <code>hr</code>, |
697 |
|
|
<code>image</code>, <code>img</code>, <code>input</code>, |
698 |
|
|
<code>isindex</code>, <code>link</code>, <code>meta</code>, |
699 |
|
|
<code>param</code>, <code>spacer</code>, or <code>wbr</code> element</dt> |
700 |
|
|
<dd>End tag is not allowed for these elements, since |
701 |
|
|
those content must always be empty. Remove end tag.</dd> |
702 |
|
|
<!-- keygen --> |
703 |
|
|
<!-- command, event-source, nest, source --> |
704 |
|
|
</dl> |
705 |
wakaba |
1.4 |
</d:desc> |
706 |
wakaba |
1.2 |
</d:item> |
707 |
|
|
|
708 |
|
|
</section> |
709 |
|
|
|
710 |
wakaba |
1.1 |
<section id="element-content-model-errors"> |
711 |
|
|
<h2>Element Content Model Errors</h2> |
712 |
|
|
|
713 |
|
|
<d:item name="character not allowed" |
714 |
|
|
class="content-model-error"> |
715 |
|
|
<d:message xml:lang="en">Data character is not allowed in this |
716 |
|
|
context.</d:message> |
717 |
|
|
<d:desc xml:lang="en"> |
718 |
wakaba |
1.3 |
<p>A data character appears where it is not allowed in this |
719 |
wakaba |
1.1 |
context. The document is non-conforming.</p> |
720 |
|
|
|
721 |
|
|
<p>Possible causes: |
722 |
wakaba |
1.6 |
<ul> |
723 |
|
|
<li><p>A data character cannot be a child |
724 |
|
|
of certain sectioning elements such as <code>body</code>, |
725 |
|
|
<code>section</code>, and <code>blockquote</code>.</p> |
726 |
|
|
|
727 |
|
|
<p>Any inline-level content must be put |
728 |
|
|
in e.g. paragraph element such as <code>p</code>.</p></li> |
729 |
|
|
<li><p>Though some elements such as <code>div</code>, |
730 |
|
|
<code>li</code>, and <code>td</code> allow |
731 |
|
|
<em>either one</em> of block-level or inline-level content |
732 |
|
|
is allowed. If there is a block-level content, |
733 |
|
|
any inline-level content must be put |
734 |
|
|
in e.g. paragraph element such as <code>p</code>.</p></li> |
735 |
|
|
</ul> |
736 |
wakaba |
1.1 |
</p> |
737 |
|
|
</d:desc> |
738 |
|
|
</d:item> |
739 |
|
|
|
740 |
|
|
<d:item name="child element missing" |
741 |
|
|
class="content-model-error"> |
742 |
|
|
<d:message xml:lang="en">There must be a <code><var>$0</var></code> |
743 |
|
|
element as a child of this element.</d:message> |
744 |
|
|
<d:desc xml:lang="en"> |
745 |
|
|
<p>The content model of the element is so defined that it |
746 |
|
|
must contain a <code><var>$0</var></code> child element. |
747 |
wakaba |
1.3 |
The document is non-conforming.</p> |
748 |
wakaba |
1.1 |
|
749 |
wakaba |
1.12 |
<dl class="switch"> |
750 |
|
|
<dt>HTML <code>head</code> element</dt> |
751 |
|
|
<dd>There must be a <code>title</code> child element.</dd> |
752 |
|
|
<dt>HTML <code>html</code> element</dt> |
753 |
|
|
<dd>There must be a <code>head</code> child element followed |
754 |
|
|
by a <code>body</code> element.</dd> |
755 |
|
|
<dt>HTML <code>tr</code> element</dt> |
756 |
|
|
<dd><a href="#child-element-missing:td%7Cth">There must be |
757 |
|
|
one or more <code>td</code> or <code>th</code> child element.</a></dd> |
758 |
|
|
</dl> |
759 |
wakaba |
1.1 |
</d:desc> |
760 |
|
|
</d:item> |
761 |
|
|
|
762 |
|
|
<d:item name="child element missing:td|th" |
763 |
|
|
class="content-model-error"> |
764 |
|
|
<d:message xml:lang="en">There must be a <code>td</code> |
765 |
|
|
or <code>th</code> element as a child of this element.</d:message> |
766 |
|
|
<d:desc xml:lang="en"> |
767 |
|
|
<p>The <code>tr</code> element must contain at least one |
768 |
wakaba |
1.3 |
<code>td</code> or <code>th</code> child element. The document |
769 |
|
|
is non-conforming.</p> |
770 |
wakaba |
1.1 |
</d:desc> |
771 |
|
|
</d:item> |
772 |
|
|
|
773 |
|
|
<d:item name="element not allowed" |
774 |
|
|
class="content-model-error"> |
775 |
|
|
<d:message xml:lang="en">This element is not allowed in this |
776 |
|
|
context.</d:message> |
777 |
|
|
<d:desc xml:lang="en"> |
778 |
wakaba |
1.3 |
<p>An element appears where it is not allowed. The document |
779 |
wakaba |
1.1 |
is non-conforming.</p> |
780 |
|
|
|
781 |
|
|
<p>Possible causes: |
782 |
wakaba |
1.6 |
<dl class="switch"> |
783 |
|
|
<dt>If the element with the error is an inline-level element, |
784 |
|
|
such as <code>a</code>, <code>progress</code>, or <code>img</code></dt> |
785 |
wakaba |
1.1 |
<dd><p>An inline-level element cannot be a child |
786 |
|
|
of certain sectioning elements such as <code>body</code>, |
787 |
|
|
<code>section</code>, and <code>blockquote</code>.</p> |
788 |
|
|
|
789 |
|
|
<p>Any inline-level content must be put |
790 |
|
|
in e.g. paragraph element such as <code>p</code>.</p></dd> |
791 |
wakaba |
1.9 |
<dt>If it is a block-level elements, such as <code>aside</code>, |
792 |
|
|
<code>div</code>, <code>h<var>n</var></code>, |
793 |
|
|
<code>p</code>, or <code>section</code></dt> |
794 |
|
|
<dd><dl class="switch"> |
795 |
|
|
<dt>If the parent element is <code>div</code>, |
796 |
|
|
<code>li</code>, <code>td</code>, or <code>th</code></dt> |
797 |
|
|
<!-- @@ TODO: more... --> |
798 |
|
|
<!-- @@ TODO: <p><ul><li><p> --> |
799 |
|
|
<dd><p>The parent element allows <em>either</em> |
800 |
|
|
block-level or inline-level content. If there is a |
801 |
|
|
block-level content, any inline-level content must be |
802 |
|
|
put in e.g. paragraph element such as <code>p</code>.</p> |
803 |
|
|
<p>For example, an HTML document fragment |
804 |
wakaba |
1.15 |
<code class="html bad example"><div><p>Hello!</p> World!</div></code> |
805 |
wakaba |
1.9 |
is non-conforming, since a word <q>World!</q> does not belong |
806 |
|
|
to any paragraph. (If not part of any paragraph, what is |
807 |
|
|
it!?) A conforming example would be: |
808 |
wakaba |
1.15 |
<pre class="html example"><code><div><p>Hello!</p> <p>World!</p></div></code></pre> |
809 |
wakaba |
1.9 |
</p></dd> |
810 |
|
|
<dt>If the parent element does <em>not</em> allow |
811 |
|
|
block-level elements as content</dt> |
812 |
|
|
<dd>The element is not allowed to be inserted here. |
813 |
|
|
For example, a <code>div</code> element cannot be |
814 |
|
|
a child of an <code>h1</code> element.</dd> |
815 |
|
|
</dl></dd> |
816 |
wakaba |
1.6 |
<dt>If the element with the error is a <code>noscript</code> element</dt> |
817 |
|
|
<dd>The <code>noscript</code> element is allowed only in the context |
818 |
|
|
where a block-level or inline-level content is expected |
819 |
|
|
and in the <code>head</code> element. |
820 |
|
|
It cannot be used in e.g. <code>ul</code>, <code>table</code>, |
821 |
|
|
or <code>select</code>.</dd> |
822 |
wakaba |
1.8 |
<dt>If the element with the error is <code>blink</code>, |
823 |
|
|
<code>center</code>, or <code>marquee</code> element</dt> |
824 |
|
|
<dd>These elements are not part of the HTML standard. |
825 |
|
|
Use CSS for styling control.</dd> |
826 |
wakaba |
1.9 |
|
827 |
wakaba |
1.11 |
<dt><code>button</code>, <code>datalist</code>, |
828 |
|
|
<code>fieldset</code>, <code>form</code>, |
829 |
wakaba |
1.9 |
<code>input</code>, <code>label</code>, |
830 |
|
|
<code>optgroup</code>, <code>option</code>, <code>output</code>, |
831 |
|
|
<code>rb</code>, <code>rp</code>, <code>rt</code>, <code>ruby</code>, |
832 |
|
|
<code>textarea</code>, or <code>textarea</code> element</dt> |
833 |
|
|
<!-- rbc, rtc ? --> |
834 |
|
|
<dd>These elements are intentionally not supported by the conformance |
835 |
|
|
checker <em>yet</em>.</dd> |
836 |
wakaba |
1.1 |
</dl> |
837 |
|
|
</p> |
838 |
|
|
</d:desc> |
839 |
|
|
</d:item> |
840 |
|
|
|
841 |
wakaba |
1.12 |
<d:item name="element not allowed:root" |
842 |
|
|
class="content-model-error"> |
843 |
|
|
<d:message xml:lang="en">This element is not allowed as a root |
844 |
|
|
element.</d:message> |
845 |
|
|
<d:desc xml:lang="en"> |
846 |
|
|
<p>An element that is not allowed as the root element |
847 |
|
|
is used as the root element of the document. The document is |
848 |
|
|
non-conforming, as far as the conformance checker can tell.</p> |
849 |
|
|
|
850 |
|
|
<dl class="switch"> |
851 |
|
|
<dt><code>html</code> element in an XHTML document</dt> |
852 |
wakaba |
1.15 |
<dd><p>In <abbr>XHTML</abbr> document, the root <code>html</code> |
853 |
|
|
element must have an <code>xmlns</code> attribute as: |
854 |
|
|
<pre class="xml example"><code><html xmlns="http://www.w3.org/1999/xhtml"></code></pre></p></dd> |
855 |
wakaba |
1.12 |
<dt><code>rss</code> element</dt> |
856 |
|
|
<dd><p>The document is written in some version of RSS.</p> |
857 |
|
|
<p>The conformance checker does not support any version |
858 |
|
|
of RSS. Use Atom 1.0 for feed documents.</p></dd> |
859 |
|
|
<dt><code>feed</code> element</dt> |
860 |
|
|
<dd><p>The Atom <code>feed</code> element must be |
861 |
wakaba |
1.15 |
in the <code>http://www.w3.org/2005/Atom</code> |
862 |
|
|
namespace as: |
863 |
|
|
<pre class="xml example"><code><feed xmlns="http://www.w3.org/2005/Atom"></code></pre> |
864 |
|
|
</p> |
865 |
wakaba |
1.12 |
<p>The conformance checker does not support Atom 0.3. |
866 |
|
|
Use Atom 1.0 for feed documents.</p></dd> |
867 |
|
|
</dl> |
868 |
|
|
</d:desc> |
869 |
|
|
</d:item> |
870 |
|
|
|
871 |
wakaba |
1.6 |
<d:item name="ps element missing" |
872 |
|
|
class="content-model-error"> |
873 |
|
|
<d:message xml:lang="en">There is no <code><var>$0</var></code> |
874 |
|
|
element before this element.</d:message> |
875 |
|
|
<d:desc xml:lang="en"> |
876 |
|
|
<p>There must be an element before another element, but there |
877 |
|
|
is not. The document is non-conforming.</p> |
878 |
|
|
|
879 |
|
|
<p>For example, there must be a <code>dt</code> element |
880 |
|
|
before any <code>dd</code> element.</p> |
881 |
|
|
</d:desc> |
882 |
|
|
</d:item> |
883 |
|
|
|
884 |
wakaba |
1.2 |
</section> |
885 |
|
|
|
886 |
wakaba |
1.3 |
<section id="attribute-errors"> |
887 |
|
|
<h2>Attribute Errors</h2> |
888 |
|
|
|
889 |
|
|
<d:item name="attribute missing" |
890 |
|
|
class="attribute-error"> |
891 |
|
|
<d:message xml:lang="en">Required attribute <code><var>$0</var></code> |
892 |
|
|
is not specified.</d:message> |
893 |
|
|
<d:desc> |
894 |
|
|
<p>A required attribute is not specified. The document |
895 |
|
|
is non-conforming.</p> |
896 |
|
|
|
897 |
|
|
<p>Some attribute is defined as <i>required</i>. |
898 |
|
|
Without required attributes specified, user agents |
899 |
wakaba |
1.9 |
cannot provide full functionality of the element to the user.</p> |
900 |
|
|
|
901 |
|
|
<dl class="switch"> |
902 |
|
|
<dt>HTML <code>img</code> element</dt> |
903 |
|
|
<dd>The <code>src</code> attribute must be specified. |
904 |
|
|
Additionally, the <code>alt</code> attribute must be specified |
905 |
|
|
in many cases.</dd> |
906 |
|
|
<dt>HTML <code>link</code> element</dt> |
907 |
|
|
<dd>The <code>rel</code> attribute must be specified. |
908 |
|
|
Note that the <code>rev</code> attribute is obsolete.</dd> |
909 |
|
|
</dl> |
910 |
wakaba |
1.3 |
</d:desc> |
911 |
|
|
</d:item> |
912 |
|
|
|
913 |
wakaba |
1.8 |
<d:item name="attribute not allowed" class="attribute-error"> |
914 |
|
|
<d:message xml:lang="en">Attribute |
915 |
|
|
<code><var>{local-name}</var></code> is not allowed for |
916 |
|
|
<code><var>{element-local-name}</var></code> element.</d:message> |
917 |
|
|
<d:desc xml:lang="en"> |
918 |
|
|
<p>An attribute is specified where it is not allowed. |
919 |
|
|
The document is non-conforming.</p> |
920 |
|
|
|
921 |
|
|
<dl> |
922 |
|
|
<dt>HTML <code>meta</code> element</dt> |
923 |
|
|
<dd>For HTML <code>meta</code> element, <em>only one</em> of |
924 |
|
|
<code>name</code>, <code>http-equiv</code>, or <code>charset</code> |
925 |
|
|
attribute is allowed.</dd> |
926 |
|
|
</dl> |
927 |
|
|
</d:desc> |
928 |
|
|
</d:item> |
929 |
|
|
|
930 |
wakaba |
1.3 |
<d:item name="in HTML:xml:lang" |
931 |
|
|
class="attribute-error"> |
932 |
|
|
<d:message xml:lang="en">The <code>xml:lang</code> attribute is not |
933 |
|
|
allowed in HTML document.</d:message> |
934 |
wakaba |
1.8 |
<d:desc xml:lang="en"> |
935 |
wakaba |
1.3 |
<p>The <code>xml:lang</code> attribute is not allowed in |
936 |
|
|
HTML document. The document is non-conforming.</p> |
937 |
|
|
|
938 |
wakaba |
1.9 |
<p>Use of the <code>xml:lang</code> attribute is conforming |
939 |
|
|
<em>only</em> in XML documents.</p> |
940 |
wakaba |
1.3 |
|
941 |
|
|
<p>To specify natural language information in HTML document, |
942 |
|
|
use <code>lang</code> attribute instead.</p> |
943 |
wakaba |
1.6 |
|
944 |
|
|
<p>XHTML 1.0 Appendix C was encouraged to specify both |
945 |
|
|
<code>lang</code> and <code>xml:lang</code> attributes with |
946 |
|
|
the same value. Such a duplication has <em>no effect</em> in practice. |
947 |
|
|
Use only one of <code>lang</code> (in HTML) or <code>xml:lang</code> (in |
948 |
|
|
XML).</p> |
949 |
|
|
|
950 |
wakaba |
1.3 |
<!-- @@ ISSUE: xml:lang in non-HTML element in DOM5 HTML created |
951 |
|
|
from an HTML document? --> |
952 |
|
|
</d:desc> |
953 |
|
|
</d:item> |
954 |
|
|
|
955 |
|
|
<d:item name="in XML:charset" |
956 |
|
|
class="attribute-error"> |
957 |
|
|
<d:message xml:lang="en">The <code>charset</code> attribute is not |
958 |
|
|
allowed in XML document.</d:message> |
959 |
|
|
<d:desc> |
960 |
|
|
<p>The <code>charset</code> attribute of a |
961 |
|
|
<code>meta</code> element is not allowed in XML document. |
962 |
|
|
The document is non-conforming.</p> |
963 |
|
|
|
964 |
|
|
<p>To specify the character encoding used for serialization, |
965 |
|
|
if necessary, use XML declaration instead: |
966 |
|
|
<pre class="xml example"><code><?xml version="1.0" encoding="<var>encoding-name</var>"?></code></pre> |
967 |
|
|
</p> |
968 |
|
|
</d:desc> |
969 |
|
|
</d:item> |
970 |
|
|
|
971 |
|
|
<d:item name="in XML:lang" |
972 |
|
|
class="attribute-error"> |
973 |
|
|
<d:message xml:lang="en">The <code>lang</code> attribute is not |
974 |
|
|
allowed in XML document.</d:message> |
975 |
|
|
<d:desc> |
976 |
|
|
<p>The HTML <code>lang</code> attribute is not allowed in |
977 |
|
|
XML document. The document is non-conforming.</p> |
978 |
|
|
|
979 |
|
|
<p>The <code>lang</code> attribute in <code>null</code> |
980 |
wakaba |
1.9 |
namespace for HTML elements is conforming <em>only</em> in |
981 |
|
|
HTML documents.</p> |
982 |
wakaba |
1.3 |
|
983 |
|
|
<p>To specify natural language information in XML document, |
984 |
|
|
use <code>xml:lang</code> attribute instead.</p> |
985 |
|
|
</d:desc> |
986 |
|
|
</d:item> |
987 |
|
|
|
988 |
|
|
<d:item name="in XML:xmlns" |
989 |
|
|
class="attribute-error"> |
990 |
|
|
<d:message xml:lang="en">The <code>xmlns</code> attribute |
991 |
|
|
in the <code>null</code> namespace is not allowed in |
992 |
|
|
XHTML document. The document is non-conforming.</d:message> |
993 |
|
|
<d:desc> |
994 |
|
|
<p>The <code>xmlns</code> attribute in the <code>null</code> |
995 |
|
|
namespace is not allowed in XHTML document.</p> |
996 |
|
|
|
997 |
wakaba |
1.8 |
<p>This error should not occur in conformance-checking of |
998 |
wakaba |
1.3 |
static documents.</p> |
999 |
|
|
</d:desc> |
1000 |
|
|
</d:item> |
1001 |
|
|
|
1002 |
|
|
</section> |
1003 |
|
|
|
1004 |
wakaba |
1.2 |
<section id="attribute-value-errors"> |
1005 |
|
|
<h2>Attribute Value Errors</h2> |
1006 |
wakaba |
1.1 |
|
1007 |
wakaba |
1.2 |
<d:item name="enumerated:invalid" |
1008 |
wakaba |
1.3 |
class="attribute-value-error"> |
1009 |
wakaba |
1.2 |
<d:message xml:lang="en">This attribute only allow a limited set of |
1010 |
wakaba |
1.6 |
values and the specified value <code><var>{@}</var></code> is not one |
1011 |
|
|
of them.</d:message> |
1012 |
wakaba |
1.8 |
<d:desc xml:lang="en"> |
1013 |
|
|
<p>For this attribute only several values are allowed and the |
1014 |
|
|
value of the attribute is not one of them. The document |
1015 |
|
|
is non-conforming.</p> |
1016 |
|
|
|
1017 |
|
|
<dl> |
1018 |
|
|
<dt>HTML <code>meta</code> element, <code>http-equiv</code> attribute</dt> |
1019 |
wakaba |
1.15 |
<dd><p>Only values <code>Default-Style</code> and <code>Refresh</code> |
1020 |
|
|
are allowed.</p> |
1021 |
wakaba |
1.8 |
<p>Value <code>Content-Type</code> is obsolete; for charset |
1022 |
|
|
declaration, the <code>charset</code> attribute can be used as: |
1023 |
|
|
<pre class="html example"><code><meta charset="<var>charset-name</var>"></code></pre> |
1024 |
|
|
... where <var>charset-name</var> is a name of the character encoding |
1025 |
|
|
of the document, such as <code>utf-8</code>.</p> |
1026 |
|
|
<p>Values <code>Content-Style-Type</code> and |
1027 |
|
|
<code>Content-Script-Type</code> are currently not allowed.</p> |
1028 |
|
|
<p>Value <code>Keywords</code> is not allowed. Use |
1029 |
|
|
<code>name</code> attribute instead of <code>http-equiv</code> |
1030 |
|
|
attribute.</p> |
1031 |
|
|
<p>Values <code>Expires</code>, <code>Pragma</code>, |
1032 |
|
|
and <code>Cache-Control</code> are not allowed; |
1033 |
|
|
use <em>real</em> HTTP header fields for cache control.</p></dd> |
1034 |
|
|
</dl> |
1035 |
|
|
</d:desc> |
1036 |
wakaba |
1.2 |
</d:item> |
1037 |
|
|
|
1038 |
wakaba |
1.14 |
<d:item name="enumerated:invalid:http-equiv:content-type" |
1039 |
|
|
class="attribute-value-error"> |
1040 |
wakaba |
1.16 |
<d:message xml:lang="en">Character encoding declaration syntax |
1041 |
wakaba |
1.15 |
<code class="html bad example"><meta http-equiv="Content-Type" content="text/html; charset=<var>charset-name</var>"></code> |
1042 |
wakaba |
1.14 |
is obsolete.</d:message> |
1043 |
|
|
<d:desc xml:lang="en"> |
1044 |
wakaba |
1.16 |
<p>Old long character encoding declaration syntax |
1045 |
wakaba |
1.15 |
<code class="html bad example"><meta http-equiv="Content-Type" content="text/html; charset=<var>charset-name</var>"></code> |
1046 |
wakaba |
1.14 |
is in use. The document is non‐conforming.</p> |
1047 |
|
|
|
1048 |
wakaba |
1.16 |
<p>The new character encoding declaration syntax is: |
1049 |
wakaba |
1.15 |
<pre class="html example"><code><meta charset="<var>charset-name</var>"></code></pre> |
1050 |
wakaba |
1.14 |
</p> |
1051 |
|
|
</d:desc> |
1052 |
|
|
</d:item> |
1053 |
|
|
|
1054 |
wakaba |
1.3 |
<d:item name="duplicate ID" |
1055 |
|
|
class="attribute-value-error"> |
1056 |
|
|
<d:message xml:lang="en">This identifier has already been |
1057 |
|
|
assigned to another element.</d:message> |
1058 |
|
|
<!-- @@ <id=a xml:id=a>? --> |
1059 |
|
|
</d:item> |
1060 |
|
|
|
1061 |
wakaba |
1.5 |
<d:item name="link type:bad context" |
1062 |
wakaba |
1.4 |
class="attribute-value-error"> |
1063 |
|
|
<d:message xml:lang="en">The link type <code><var>$0</var></code> |
1064 |
|
|
cannot be specified for this element.</d:message> |
1065 |
|
|
<d:desc xml:lang="en"> |
1066 |
|
|
<p>The specified link type cannot be used for the element. |
1067 |
|
|
The document is non-conforming.</p> |
1068 |
|
|
|
1069 |
|
|
<p>Link types are associated with limited set of elements. |
1070 |
|
|
They cannot be used with other elements.</p> |
1071 |
|
|
|
1072 |
|
|
<p>For example, link type <code>bookmark</code> |
1073 |
|
|
can be used with <code>a</code> or <code>area</code> element, |
1074 |
|
|
while it cannot be used with <code>link</code> element.</p> |
1075 |
|
|
</d:desc> |
1076 |
|
|
</d:item> |
1077 |
|
|
|
1078 |
|
|
<d:item name="link type:non-conforming" |
1079 |
|
|
class="attribute-value-error"> |
1080 |
|
|
<d:message xml:lang="en">The link type <code><var>$0</var></code> |
1081 |
|
|
is non-conforming.</d:message> |
1082 |
|
|
<d:desc xml:lang="en"> |
1083 |
wakaba |
1.6 |
<p>The specified link type is non-conforming, and therefore |
1084 |
|
|
the document is non-conforming.</p> |
1085 |
wakaba |
1.4 |
|
1086 |
wakaba |
1.12 |
<dl class="switch"> |
1087 |
wakaba |
1.6 |
<dt>Link type <code>contents</code></dt> |
1088 |
|
|
<dd>Use link type <code>index</code>.</dd> |
1089 |
|
|
<dt>Link type <code>copyright</code></dt> |
1090 |
|
|
<dd>Use link type <code>license</code>.</dd> |
1091 |
|
|
<dt>Link type <code>home</code></dt> |
1092 |
|
|
<dd>Use link type <code>index</code>.</dd> |
1093 |
wakaba |
1.12 |
<dt>Link type <code>previous</code></dt> |
1094 |
|
|
<dd>Use link type <code>prev</code>.</dd> |
1095 |
wakaba |
1.6 |
<dt>Link type <code>start</code></dt> |
1096 |
|
|
<dd>Use link type <code>first</code>.</dd> |
1097 |
wakaba |
1.12 |
<dt>Link type <code>toc</code> or <code>top</code></dt> |
1098 |
wakaba |
1.6 |
<dd>Use link type <code>index</code>.</dd> |
1099 |
|
|
</dl> |
1100 |
wakaba |
1.4 |
</d:desc> |
1101 |
|
|
</d:item> |
1102 |
|
|
|
1103 |
wakaba |
1.3 |
<d:item name="reserved browsing context name" |
1104 |
|
|
class="attribute-value-error"> |
1105 |
wakaba |
1.6 |
<d:message xml:lang="en">Browsing context name |
1106 |
|
|
<code><var>{@}</var></code> is reserved.</d:message> |
1107 |
|
|
<d:desc xml:lang="en"> |
1108 |
wakaba |
1.3 |
<p>The specified browsing context name is reserved. |
1109 |
|
|
The document is non-conforming.</p> |
1110 |
|
|
|
1111 |
|
|
<p>Names of browsing contexts starting with <code>_</code> |
1112 |
|
|
(<code>U+005F</code> <code class="charname">LOW LINE</code>) |
1113 |
|
|
are reserved so that it must not be used.</p> |
1114 |
|
|
|
1115 |
|
|
<p>Old version of HTML, non-HTML markup languages, and |
1116 |
|
|
Web browsers define or implements special reserved |
1117 |
|
|
browsing context names <code>_blank</code>, |
1118 |
|
|
<code>_main</code>, and <code>_replace</code>. |
1119 |
|
|
However, they are <em>not</em> conforming attribute values.</p> |
1120 |
wakaba |
1.6 |
</d:desc> |
1121 |
wakaba |
1.3 |
</d:item> |
1122 |
|
|
|
1123 |
wakaba |
1.2 |
</section> |
1124 |
|
|
|
1125 |
wakaba |
1.4 |
<section id="attribute-value-warnings"> |
1126 |
|
|
<h2>Attribute Value Warnings</h2> |
1127 |
|
|
|
1128 |
|
|
<d:item name="link type:proposed" level="s" |
1129 |
|
|
class="attribute-value-warning should"> |
1130 |
|
|
<d:message xml:lang="en">Link type <code><var>$0</var></code> |
1131 |
|
|
is proposed but not accepted yet; it <em>should not</em> be |
1132 |
|
|
used until it has been accepted.</d:message> |
1133 |
|
|
<d:desc> |
1134 |
|
|
<p>The link type is in the <i>proposed</i> status; it |
1135 |
|
|
<em>should not</em> be used until it has been |
1136 |
|
|
accepted.</p> |
1137 |
|
|
|
1138 |
|
|
<p><strong>Warning</strong>: The data served to the |
1139 |
|
|
conforming checker might be out of date; it might have already |
1140 |
wakaba |
1.12 |
been accepted or rejected. The document might or might not be |
1141 |
|
|
conforming depending on the status. See WHATWG Wiki |
1142 |
wakaba |
1.4 |
for the latest information.</p> |
1143 |
|
|
</d:desc> |
1144 |
|
|
</d:item> |
1145 |
|
|
|
1146 |
|
|
</section> |
1147 |
|
|
|
1148 |
wakaba |
1.2 |
<section id="table-model-errors"> |
1149 |
|
|
<h2>Table Model Errors</h2> |
1150 |
|
|
|
1151 |
wakaba |
1.3 |
<d:item name="table:colspan creates column with no anchored cell" |
1152 |
|
|
class="table-model-error"> |
1153 |
|
|
<d:message xml:lang="en">This <code>colspan</code> attribute |
1154 |
|
|
results in creating a table column that does not contain |
1155 |
|
|
any cell anchored to it.</d:message> |
1156 |
|
|
</d:item> |
1157 |
|
|
|
1158 |
wakaba |
1.2 |
<d:item name="table:no cell in last row" |
1159 |
|
|
class="table-model-error"> |
1160 |
|
|
<d:message xml:lang="en">The table has no cell (<code>td</code> or |
1161 |
|
|
<code>th</code>) in the last row.</d:message> |
1162 |
|
|
</d:item> |
1163 |
|
|
|
1164 |
wakaba |
1.6 |
<d:item name="table:rowspan extends table" |
1165 |
|
|
class="table-model-error"> |
1166 |
|
|
<d:message xml:lang="en">This <code>rowspan</code> attribute |
1167 |
|
|
results in creating a table row that does not contain |
1168 |
|
|
any cell anchored to it.</d:message> |
1169 |
|
|
<d:desc xml:lang="en"> |
1170 |
|
|
<p>The <code>rowspan</code> attribute value of the cell |
1171 |
|
|
is so specified that it extends a table in the row axis. |
1172 |
|
|
However, the extended row does not contain any cell by itself. |
1173 |
|
|
The document is non-conforming.</p> |
1174 |
|
|
|
1175 |
|
|
<p>For example, the table below is non-conforming: |
1176 |
wakaba |
1.15 |
<pre class="html bad example"><code><table> |
1177 |
wakaba |
1.6 |
<tbody> |
1178 |
|
|
<tr><td rowspan=2></td></tr> |
1179 |
|
|
</tbody> |
1180 |
|
|
</table></code></pre> |
1181 |
wakaba |
1.9 |
... since the second row contains only |
1182 |
|
|
a cell that spans between first and second rows.</p> |
1183 |
wakaba |
1.6 |
</d:desc> |
1184 |
|
|
</d:item> |
1185 |
|
|
|
1186 |
wakaba |
1.2 |
</section> |
1187 |
|
|
|
1188 |
|
|
<section id="imt-warnings"> |
1189 |
|
|
<h2>Internet Media Type Warnings</h2> |
1190 |
|
|
|
1191 |
|
|
<d:item name="IMT:obsolete subtype" |
1192 |
|
|
class="should" level="s"> |
1193 |
wakaba |
1.6 |
<d:message xml:lang="en"><code><var>{@}</var></code>: An <em>obsolete</em> |
1194 |
|
|
subtype is used.</d:message> |
1195 |
wakaba |
1.12 |
<d:item xml:lang="en"> |
1196 |
|
|
<p>The specified Internet Media Type is registered with status |
1197 |
|
|
of <i>OBSOLETE</i>.</p><!-- @@ SHOULD NOT? --> |
1198 |
|
|
|
1199 |
|
|
<dl class="swtich"> |
1200 |
|
|
<dt>Media type <code>text/ecmascript</code></dt> |
1201 |
|
|
<dd>Media type <code>text/ecmascript</code> is obsoleted in |
1202 |
|
|
favor of <code>application/ecmascript</code>. Note that |
1203 |
|
|
<code>text/javascript</code> would be better alternative |
1204 |
|
|
for many cases.</dd> |
1205 |
|
|
<dt>Media type <code>text/javascript</code></dt> |
1206 |
|
|
<dd>Media type <code>text/javascript</code> is obsoleted by |
1207 |
|
|
<abbr>IETF</abbr> with backward incompatible alternate |
1208 |
|
|
<code>application/javascript</code> for architectural |
1209 |
|
|
purity.<!-- @@ ref? --> Realist may ignore this warning.</dd> |
1210 |
|
|
</dl> |
1211 |
|
|
</d:item> |
1212 |
wakaba |
1.2 |
</d:item> |
1213 |
|
|
|
1214 |
|
|
<d:item name="IMT:private subtype" |
1215 |
|
|
class="should" level="s"> |
1216 |
wakaba |
1.6 |
<d:message xml:lang="en"><code><var>{@}</var></code>: A private |
1217 |
|
|
(<code>x-</code> or <code>x.</code>) subtype is used.</d:message> |
1218 |
wakaba |
1.2 |
</d:item> |
1219 |
|
|
|
1220 |
|
|
<d:item name="IMT:unregistered subtype" |
1221 |
|
|
class="should" level="s"> |
1222 |
wakaba |
1.6 |
<d:message xml:lang="en"><code><var>{@}</var></code>: The subtype is |
1223 |
|
|
not registered to IANA.</d:message> |
1224 |
wakaba |
1.2 |
<!-- TODO: Unknown message?? --> |
1225 |
|
|
</d:item> |
1226 |
|
|
|
1227 |
|
|
</section> |
1228 |
|
|
|
1229 |
|
|
<section id="uri-errors"> |
1230 |
|
|
<h2>URI (or IRI) Errors</h2> |
1231 |
|
|
|
1232 |
|
|
<d:item name="URI::syntax error" |
1233 |
|
|
class="must" level="m"> |
1234 |
wakaba |
1.6 |
<d:message xml:lang="en">The specified value is syntactically not an IRI |
1235 |
|
|
reference.</d:message> |
1236 |
|
|
<d:desc xml:lang="en"> |
1237 |
|
|
<p>The specified value does not satisfy the syntactical requirements |
1238 |
|
|
for IRI references. The document is non-conforming.</p> |
1239 |
|
|
|
1240 |
|
|
<p>Possible causes: |
1241 |
|
|
<ul> |
1242 |
|
|
<li>The string might contain one or more white space characters. |
1243 |
|
|
Especially, the <code> </code> (<code>U+0020</code> |
1244 |
|
|
<code class="charname">SPACE</code>) character cannot be |
1245 |
|
|
used in IRI references.</li> |
1246 |
|
|
</ul> |
1247 |
|
|
</p> |
1248 |
|
|
</d:desc> |
1249 |
wakaba |
1.2 |
</d:item> |
1250 |
|
|
|
1251 |
|
|
</section> |
1252 |
|
|
|
1253 |
wakaba |
1.9 |
<section id="uri-shoulds"> |
1254 |
|
|
<h2>URI (or IRI) Should-level Errors</h2> |
1255 |
wakaba |
1.3 |
|
1256 |
|
|
<d:item name="URI::dot-segment" |
1257 |
|
|
class="should" level="s"> |
1258 |
wakaba |
1.9 |
<d:message xml:lang="en">A dot-segment (<code>.</code> or |
1259 |
|
|
<code>..</code>) occurs in an absolute reference.</d:message> |
1260 |
wakaba |
1.3 |
<d:desc> |
1261 |
|
|
<p>Dot-segment (<code>.</code> or <code>..</code>) should |
1262 |
|
|
not occur in an absolute reference.</p> |
1263 |
|
|
|
1264 |
|
|
<p>In relative references, dot-segments are used to represent |
1265 |
|
|
the current (<code>.</code>) or the parent (<code>..</code>) |
1266 |
|
|
hierarchy of the path. Though they are also allowed |
1267 |
|
|
in absolute references, it should be resolved to the |
1268 |
|
|
canonical form before it has been published.</p> |
1269 |
|
|
</d:desc> |
1270 |
|
|
</d:item> |
1271 |
wakaba |
1.2 |
|
1272 |
|
|
<d:item name="URI::empty path" |
1273 |
|
|
class="should" level="s"> |
1274 |
wakaba |
1.9 |
<d:message xml:lang="en">This IRI does not end with |
1275 |
|
|
a <code>/</code>.</d:message> |
1276 |
wakaba |
1.12 |
<d:item xml:lang="en"> |
1277 |
|
|
<p>The IRI does not end with a <code>/</code>. If there is an |
1278 |
|
|
authority component in an IRI, a <code>/</code> should be present |
1279 |
|
|
instead of empty path component.</p> |
1280 |
|
|
|
1281 |
|
|
<p>For example, <code>http://www.example.com<strong>/</strong></code> |
1282 |
|
|
is preferred to <code>http://www.example.com</code>.</p> |
1283 |
|
|
</d:item> |
1284 |
wakaba |
1.2 |
</d:item> |
1285 |
wakaba |
1.1 |
|
1286 |
wakaba |
1.4 |
<d:item name="URI::lowercase hexadecimal digit" |
1287 |
|
|
class="should" level="s"> |
1288 |
wakaba |
1.9 |
<d:message xml:lang="en">A lowercase hexadecimal digit is used |
1289 |
|
|
in percent-encoding.</d:message> |
1290 |
wakaba |
1.4 |
<d:desc xml:lang="en"> |
1291 |
|
|
<p>The hexadecimal digit in percent-encoding string in the IRI |
1292 |
|
|
is in lowercase. Though the IRI <em>is</em> conforming, |
1293 |
|
|
it should be in uppercase.</p> |
1294 |
|
|
</d:desc> |
1295 |
|
|
</d:item> |
1296 |
|
|
|
1297 |
|
|
<d:item name="URI::percent-encoded unreserved" |
1298 |
|
|
class="should" level="s"> |
1299 |
|
|
<d:message xml:lang="en">An unreserved character is |
1300 |
|
|
percent-encoded.</d:message> |
1301 |
|
|
<d:desc xml:lang="en"> |
1302 |
|
|
<p>An unreserved character is percent-encoded in the IRI. |
1303 |
|
|
Though it <em>is</em> conforming, it should be in the |
1304 |
|
|
decoded (or bare) form.</p> |
1305 |
|
|
</d:desc> |
1306 |
|
|
</d:item> |
1307 |
|
|
|
1308 |
wakaba |
1.6 |
<d:item name="URI::uppercase scheme name" |
1309 |
|
|
class="should" level="s"> |
1310 |
|
|
<d:message xml:lang="en">URI scheme name is in uppercase.</d:message> |
1311 |
|
|
<d:desc xml:lang="en"> |
1312 |
|
|
<p>The scheme part of the IRI is written in uppercase letter.</p> |
1313 |
|
|
|
1314 |
|
|
<p>Uppercase scheme names are not required to be processed |
1315 |
|
|
correctly.</p> |
1316 |
|
|
<!-- @@ |
1317 |
|
|
RFC 3986 3.1. |
1318 |
|
|
> Although schemes are case- |
1319 |
|
|
insensitive, the canonical form is lowercase and documents that |
1320 |
|
|
specify schemes must do so with lowercase letters. |
1321 |
|
|
|
1322 |
|
|
> An implementation ... should only produce lowercase scheme names for |
1323 |
|
|
consistency. |
1324 |
|
|
--> |
1325 |
|
|
</d:desc> |
1326 |
|
|
</d:item> |
1327 |
|
|
|
1328 |
wakaba |
1.1 |
</section> |
1329 |
|
|
|
1330 |
wakaba |
1.12 |
<section id="cache-manifest-errors"> |
1331 |
|
|
<h2>Cache Manifest Errors</h2> |
1332 |
|
|
|
1333 |
|
|
<d:item name="not manifest" class="must" level="m"> |
1334 |
|
|
<d:message xml:lang="en">This document is not a cache manifest.</d:message> |
1335 |
|
|
<d:desc xml:lang="en"> |
1336 |
|
|
<p>The specified document is <em>not</em> a cache manifest. |
1337 |
|
|
The document is non-conforming.</p> |
1338 |
|
|
|
1339 |
|
|
<p>An entity labeled as Internet media type |
1340 |
|
|
<code>text/cache-manifest</code> must contain a cache manifest.</p> |
1341 |
|
|
|
1342 |
|
|
<p>A cache manifest must start with a line whose content is |
1343 |
wakaba |
1.15 |
<code class="manifest example">CACHE MANIFEST</code> |
1344 |
|
|
(exactly one space character between |
1345 |
wakaba |
1.12 |
<code>CACHE</code> and <code>MANIFEST</code>).</p> |
1346 |
|
|
</d:desc> |
1347 |
|
|
</d:item> |
1348 |
|
|
</section> |
1349 |
|
|
|
1350 |
wakaba |
1.1 |
<section id="unsupported-messages"> |
1351 |
|
|
<h2><i>Unsupported</i> Messages</h2> |
1352 |
|
|
|
1353 |
wakaba |
1.9 |
<d:item name="element" |
1354 |
wakaba |
1.2 |
class="unsupported" level="unsupported"> |
1355 |
wakaba |
1.9 |
<d:message xml:lang="en">Conformance checking for element |
1356 |
|
|
<code><var>{local-name}</var></code> is not supported; <em>it might or |
1357 |
|
|
might not be conforming</em>.</d:message> |
1358 |
wakaba |
1.1 |
<d:desc xml:lang="en"> |
1359 |
wakaba |
1.9 |
<p>The conformant checker does not support the element. |
1360 |
wakaba |
1.1 |
It cannot determine whether the document is conforming or not.</p> |
1361 |
|
|
</d:desc> |
1362 |
|
|
</d:item> |
1363 |
|
|
|
1364 |
wakaba |
1.9 |
<d:item name="attribute" |
1365 |
wakaba |
1.2 |
class="unsupported" level="unsupported"> |
1366 |
wakaba |
1.9 |
<d:message xml:lang="en">Conformance checking for attribute |
1367 |
|
|
<code><var>{local-name}</var></code> of element |
1368 |
|
|
<code><var>{element-local-name}</var></code> is not supported; |
1369 |
|
|
<em>it might or might not be conforming</em>.</d:message> |
1370 |
wakaba |
1.1 |
<d:desc xml:lang="en"> |
1371 |
wakaba |
1.9 |
<p>The conformant checker does not support the attribute. |
1372 |
wakaba |
1.1 |
It cannot determine whether the document is conforming or not.</p> |
1373 |
|
|
</d:desc> |
1374 |
|
|
</d:item> |
1375 |
|
|
|
1376 |
wakaba |
1.2 |
<d:item name="link type" |
1377 |
|
|
class="unsupported" level="unsupported"> |
1378 |
wakaba |
1.9 |
<d:message xml:lang="en">Link type <code><var>$0</var></code> is not |
1379 |
wakaba |
1.4 |
standardized or registered at the time of the release of the conformance |
1380 |
wakaba |
1.9 |
checker; <em>it is non-conforming unless it now has been |
1381 |
wakaba |
1.4 |
registered</em>.</d:message> |
1382 |
wakaba |
1.1 |
<d:desc xml:lang="en"> |
1383 |
|
|
<p>The <code>rel</code> attribute is defined as a list of link types. |
1384 |
|
|
Some common link types are defined in the HTML5 specification. |
1385 |
|
|
Additional link types can be registered to the WHATWG Wiki. |
1386 |
|
|
use of any other link type is non-conforming.</p> |
1387 |
|
|
|
1388 |
|
|
<p>The specified link type is not part of the standard or registry |
1389 |
|
|
when the database used by the conformance cheker is created. |
1390 |
|
|
The link type might have been added to the registry since then. |
1391 |
|
|
In such case it might be conforming. Otherwise, the |
1392 |
|
|
document is non-conforming.</p> |
1393 |
wakaba |
1.8 |
|
1394 |
|
|
<dl> |
1395 |
|
|
<dt>Link types <code>shortcut icon</code></dt> |
1396 |
|
|
<dd>Link type <code>shortcut</code> is not registered. |
1397 |
|
|
Use only <code>icon</code> for linking to so-called favicon.</dd> |
1398 |
|
|
</dl> |
1399 |
wakaba |
1.1 |
</d:desc> |
1400 |
|
|
</d:item> |
1401 |
|
|
|
1402 |
wakaba |
1.4 |
<d:item name="event handler" |
1403 |
|
|
class="unsupported" level="unsupported"> |
1404 |
|
|
<d:message xml:lang="en">Conformance checking for event handler attribute |
1405 |
|
|
is not supported; <em>it might or might not be conforming.</em></d:message> |
1406 |
|
|
</d:item> |
1407 |
|
|
|
1408 |
|
|
<d:item name="media query" |
1409 |
|
|
class="unsupported" level="unsupported"> |
1410 |
|
|
<d:message xml:lang="en">Conformance checking for media query |
1411 |
|
|
is not supported; <em>it might or might not be conforming.</em></d:message> |
1412 |
|
|
</d:item> |
1413 |
|
|
|
1414 |
|
|
<d:item name="script" |
1415 |
|
|
class="unsupported" level="unsupported"> |
1416 |
|
|
<d:message xml:lang="en">Conformance checking for script |
1417 |
|
|
language <code><var>$0</var></code> is not supported; |
1418 |
|
|
<em>it might or might not be conforming.</em></d:message> |
1419 |
|
|
</d:item> |
1420 |
|
|
|
1421 |
|
|
<d:item name="style" |
1422 |
|
|
class="unsupported" level="unsupported"> |
1423 |
|
|
<d:message xml:lang="en">Conformance checking for style |
1424 |
|
|
language <code><var>$0</var></code> is not supported; |
1425 |
|
|
<em>it might or might not be conforming.</em></d:message> |
1426 |
|
|
</d:item> |
1427 |
|
|
|
1428 |
wakaba |
1.1 |
</section> |
1429 |
|
|
|
1430 |
wakaba |
1.2 |
<d:catalog> |
1431 |
|
|
manakaiCompatMode:quirks;;Quirks Mode |
1432 |
|
|
manakaiCompatMode:limited quirks;;Limited Quirks Mode |
1433 |
|
|
manakaiCompatMode:no quirks;;No Quirks Mode |
1434 |
|
|
|
1435 |
|
|
manakaiIsHTML:1;;HTML Document |
1436 |
|
|
manakaiIsHTML:0;;XML Document |
1437 |
|
|
</d:catalog> |
1438 |
|
|
|
1439 |
wakaba |
1.13 |
<section id="levels"> |
1440 |
|
|
<h2>Error Levels</h2> |
1441 |
|
|
|
1442 |
|
|
<table id="levels-table"> |
1443 |
|
|
<thead> |
1444 |
|
|
<tr><th scope="col">Level</th> |
1445 |
|
|
<th scope="col">Conforming?</th> |
1446 |
|
|
<th scope="col">Description</th> |
1447 |
|
|
</tr> |
1448 |
|
|
</thead> |
1449 |
|
|
<tbody> |
1450 |
|
|
<tr id="level-m" class="level-m"> |
1451 |
|
|
<th scope="row"><em class="rfc2119">MUST</em>‐level error</th> |
1452 |
|
|
<td>Non‐conforming.</td> |
1453 |
|
|
<td>A violation to a hard requirement of the specification. |
1454 |
|
|
The document is non‐conforming.</td> |
1455 |
|
|
</tr> |
1456 |
|
|
<tr id="level-s" class="level-s"> |
1457 |
|
|
<th scope="row"><em class="rfc2119">SHOULD</em>‐level error</th> |
1458 |
|
|
<td>Non‐conforming, but <em>in some case</em> |
1459 |
|
|
conforming.</td> |
1460 |
|
|
<td>A violation to a requirement of the specification. |
1461 |
|
|
The violation might be legitimize in some case. Otherwise, |
1462 |
|
|
the document is non‐conforming.</td> |
1463 |
|
|
</tr> |
1464 |
|
|
<tr id="level-w" class="level-w"> |
1465 |
|
|
<th scope="row">Warning</th> |
1466 |
|
|
<td>Conforming.</td> |
1467 |
|
|
<td>A warning is an advice from the conformance checker to avoid |
1468 |
|
|
to solve a problem in a confusing or possibly wrong way. |
1469 |
|
|
It does not affect to the conformance of the document, and |
1470 |
|
|
may sometimes be inappropriate.</td> |
1471 |
|
|
</tr> |
1472 |
|
|
<tr id="level-unsupported" class="level-unsupported"> |
1473 |
|
|
<th scope="row">Not supported</th> |
1474 |
|
|
<td><em>Unknown</em>.</td> |
1475 |
|
|
<td>Some feature that is not supported by the conformance checker |
1476 |
|
|
is used in the document.</td> |
1477 |
|
|
</tr> |
1478 |
|
|
</tbody> |
1479 |
|
|
</table> |
1480 |
|
|
</section> |
1481 |
|
|
|
1482 |
wakaba |
1.1 |
<section id="license"> |
1483 |
|
|
<h2>License of This Document</h2> |
1484 |
|
|
|
1485 |
wakaba |
1.12 |
<p>Copyright <time>2007</time> |
1486 |
|
|
<a href="http://suika.fam.cx/~wakaba/who?" rel="author" xml:lang="ja">Wakaba</a> |
1487 |
|
|
<code class="mail"><<a href="mailto:w@suika.fam.cx">w@suika.fam.cx</a>></code>.</p> |
1488 |
|
|
|
1489 |
wakaba |
1.9 |
<p>This document is free software; you can redistribute it |
1490 |
wakaba |
1.1 |
and/or modify it under the same terms as Perl itself.</p> |
1491 |
|
|
</section> |
1492 |
|
|
|
1493 |
wakaba |
1.16 |
<!-- $Date: 2007/11/07 12:20:44 $ --> |
1494 |
wakaba |
1.1 |
</body> |
1495 |
|
|
</html> |