Parent Directory
|
Revision Log
++ ChangeLog 24 Feb 2008 02:17:37 -0000 2008-02-24 Wakaba <wakaba@suika.fam.cx> * cc.cgi: Support for level-i (informational). * cc-style.css: New style rules for informational messages added. * error-description-source.xml (#information, #level-i): Added.
| 1 | wakaba | 1.1 | <!DOCTYPE html> |
| 2 | <html xmlns="http://www.w3.org/1999/xhtml" | ||
| 3 | xmlns:d="http://suika.fam.cx/~wakaba/archive/2007/wdcc-desc/" | ||
| 4 | id="error-description"> | ||
| 5 | <head> | ||
| 6 | <title xml:lang="en">Description of Errors — | ||
| 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 | wakaba | 1.17 | <d:item name="character encoding" class="format-charset unsupported" |
| 47 | level="unsupported"> | ||
| 48 | <d:message xml:lang="en">Conformance for character encoding requirements | ||
| 49 | cannot be checked.</d:message> | ||
| 50 | <d:desc xml:lang="en"> | ||
| 51 | <p>The conformance checker cannot detect whether the input document | ||
| 52 | met the requirements on character encoding, since the document | ||
| 53 | is not inputed as a serialized byte sequence. The document is | ||
| 54 | not conforming if it is not encoded in an appropriate character | ||
| 55 | encoding with appropriate labeling.</p> | ||
| 56 | </d:desc> | ||
| 57 | </d:item> | ||
| 58 | |||
| 59 | wakaba | 1.16 | <d:item name="no character encoding declaration" class="format-charset error" |
| 60 | level="m"> | ||
| 61 | <d:message xml:lang="en">There is no character encoding | ||
| 62 | declaration.</d:message> | ||
| 63 | <d:desc xml:lang="en"> | ||
| 64 | <p>The document does not contain a character encoding | ||
| 65 | declaration. Unless the character encoding is explicitly | ||
| 66 | wakaba | 1.17 | specified in lower‐level protocol, e.g. in <abbr>HTTP</abbr>, |
| 67 | wakaba | 1.16 | or is implied by <abbr>BOM</abbr>, there must be a character |
| 68 | encoding declaration. The document is non‐conforming.</p> | ||
| 69 | |||
| 70 | <p>The long character encoding declaration syntax | ||
| 71 | <code class="html bad example"><meta http-equiv="Content-Type" content="text/html; charset=<var>charset-name</var>"></code> | ||
| 72 | is obsolete. The new syntax is:</p> | ||
| 73 | <pre class="html example"><code><meta charset="<var>charset-name</var>"></code></pre> | ||
| 74 | |||
| 75 | <p>Note that the <code>encoding</code> declaration in <abbr>XML</abbr> | ||
| 76 | declaration has no effect for <abbr>HTML</abbr> document.</p> | ||
| 77 | </d:desc> | ||
| 78 | </d:item> | ||
| 79 | |||
| 80 | <d:item name="non ascii superset" class="format-charset error" | ||
| 81 | level="m"> | ||
| 82 | <d:message xml:lang="en">No character encoding metadata is found | ||
| 83 | wakaba | 1.17 | in lower‐level protocol nor is there <abbr>BOM</abbr>, while |
| 84 | wakaba | 1.16 | character encoding <code><var>$0</var></code> |
| 85 | is not a superset of <abbr>ASCII</abbr>.</d:message> | ||
| 86 | <d:desc xml:lang="en"> | ||
| 87 | <p>The document is not labeled with character encoding name | ||
| 88 | wakaba | 1.17 | in lower‐level protocol, e.g. in <abbr>HTTP</abbr>, and |
| 89 | wakaba | 1.16 | the document is not begin with <abbr>BOM</abbr>. In addition, |
| 90 | the character encoding of the document is not a superset of | ||
| 91 | <abbr>ASCII</abbr>. The document is non‐conforming.</p> | ||
| 92 | |||
| 93 | <p>Unless there is a <abbr>BOM</abbr>, the character encoding | ||
| 94 | for the document must be specified in e.g. <abbr>HTTP</abbr>‐level, | ||
| 95 | as:</p> | ||
| 96 | <pre class="http example"><code>Content-Type: text/html; charset=<var>charset-name</var></code></pre> | ||
| 97 | |||
| 98 | <p>Existence of <abbr>HTML</abbr> character encoding declaration, i.e. | ||
| 99 | <code class="html example"><meta charset="<var>charset-name</var>"></code>, | ||
| 100 | does not allow to omit <code>charset</code> parameter | ||
| 101 | for <abbr>HTML</abbr> document encoded in non‐<abbr>ASCII</abbr> | ||
| 102 | compatible encoding.</p> | ||
| 103 | |||
| 104 | <p>Character encodings <code>Shift_JIS</code>, <code>Windows-31J</code>, | ||
| 105 | and <code>ISO-2022-JP</code> are <em>not</em> a superset of | ||
| 106 | <abbr>ASCII</abbr> for the purpose of <abbr>HTML</abbr> conformance.</p> | ||
| 107 | </d:desc> | ||
| 108 | </d:item> | ||
| 109 | |||
| 110 | <d:item name="charset label detected" class="format-charset warning" | ||
| 111 | level="w"> | ||
| 112 | <d:message xml:lang="en">While parsing the document as | ||
| 113 | <code><var>$0</var></code>, a character encoding declaration specifying | ||
| 114 | character encoding as <code><var>$1</var></code> is found. The document | ||
| 115 | is reparsed.</d:message> | ||
| 116 | <d:desc xml:lang="en"> | ||
| 117 | <p>While parsing a document in a character encoding, | ||
| 118 | a character encoding declaration which declares the character | ||
| 119 | encoding of the document as another character encoding is found. | ||
| 120 | The occurence of this warning itself does not make the document | ||
| 121 | non‐conforming. However, the failure of the first attempt to | ||
| 122 | to detect the character encoding might be the result of non‐conformance | ||
| 123 | of the document.</p> | ||
| 124 | |||
| 125 | <p>The document will be reparsed from the beginning. Some error | ||
| 126 | or warning might be reported again.</p> | ||
| 127 | |||
| 128 | <p>These are suggestions to avoid this warning:</p> | ||
| 129 | <ul> | ||
| 130 | <li>Specify <code>charset</code> parameter in the <code>Content-Type</code> | ||
| 131 | field in the <abbr>HTTP</abbr> header, as: | ||
| 132 | <pre class="HTTP example"><code>Content-Type: text/html; charset="<var>charset-name</var>"</code></pre></li> | ||
| 133 | <li>Put the character encoding declaration | ||
| 134 | (<code class="html example"><meta charset="<var>charset-name</var>"></code>) | ||
| 135 | just after <code class="html example"><head></code> start tag.</li> | ||
| 136 | <li>Use <code>UTF-8</code>.</li> | ||
| 137 | </ul> | ||
| 138 | </d:desc> | ||
| 139 | </d:item> | ||
| 140 | </section> | ||
| 141 | |||
| 142 | wakaba | 1.2 | <section id="html5-tokenize-error"> |
| 143 | <h2>HTML5 Parse Errors in Tokenization Stage</h2> | ||
| 144 | wakaba | 1.1 | |
| 145 | wakaba | 1.3 | <d:item name="after html" |
| 146 | class="parse-error"> | ||
| 147 | <d:message xml:lang="en">Tag <code><<var>$0</var>></code> | ||
| 148 | is not allowed after the end tag <code></html></code>.</d:message> | ||
| 149 | <d:desc xml:lang="en"> | ||
| 150 | <p>The start or end tag of an element appears after the | ||
| 151 | <code>html</code> element has been closed. The document is | ||
| 152 | non-conforming.</p> | ||
| 153 | |||
| 154 | <p>Any content of the document other than comments | ||
| 155 | must be put into the <code>html</code> element.</p> | ||
| 156 | </d:desc> | ||
| 157 | </d:item> | ||
| 158 | |||
| 159 | wakaba | 1.7 | <d:item name="after body" |
| 160 | class="parse-error"> | ||
| 161 | <d:message xml:lang="en">Tag <code><<var>$0</var>></code> | ||
| 162 | is not allowed after the end tag <code></body></code>.</d:message> | ||
| 163 | <d:desc xml:lang="en"> | ||
| 164 | <p>The start or end tag of an element appears after the | ||
| 165 | <code>body</code> element has been closed. The document is | ||
| 166 | non-conforming.</p> | ||
| 167 | |||
| 168 | <p>Any content of the document other than <code>head</code> | ||
| 169 | contents and comments must be put into the <code>body</code> | ||
| 170 | element.</p> | ||
| 171 | </d:desc> | ||
| 172 | </d:item> | ||
| 173 | |||
| 174 | wakaba | 1.3 | <d:item name="bare ero" |
| 175 | class="tokenize-error"> | ||
| 176 | <d:message xml:lang="en">The <code>&</code> character must | ||
| 177 | introduce a reference.</d:message> | ||
| 178 | <d:desc xml:lang="en"> | ||
| 179 | wakaba | 1.15 | <p>An <code>&</code> character which |
| 180 | wakaba | 1.3 | is not part of any reference appears in the input stream. |
| 181 | wakaba | 1.15 | The document is non‐conforming.</p> |
| 182 | wakaba | 1.3 | |
| 183 | wakaba | 1.15 | <p><em>Any <code>&</code> character in URI (or IRI) |
| 184 | must be escaped as <code class="example">&amp;</code>.</em></p> | ||
| 185 | wakaba | 1.9 | |
| 186 | wakaba | 1.3 | <p>The <code>&</code> character must |
| 187 | be the first character of a reference: | ||
| 188 | wakaba | 1.15 | <dl class="switch"> |
| 189 | wakaba | 1.3 | <dt>Named entity reference</dt> |
| 190 | <dd><pre class="html example"><code>&<var>entity-name</var>;</code></pre> | ||
| 191 | where <var>entity-name</var> is the name of the | ||
| 192 | character entity to be referenced.</dd> | ||
| 193 | <dt>Numeric character reference</dt> | ||
| 194 | <dd><pre class="html example"><code>&#<var>d</var>;</code></pre> | ||
| 195 | where <var>d</var> is the decimal representation of | ||
| 196 | the code position of the character to be referenced.</dd> | ||
| 197 | <dt>Hexadecimal character reference</dt> | ||
| 198 | <dd><pre class="html example"><code>&#x<var>h</var>;</code></pre> | ||
| 199 | where <var>h</var> is the hexadecimal representation | ||
| 200 | of the code position of the character to be referenced.</dd> | ||
| 201 | </dl> | ||
| 202 | </p> | ||
| 203 | |||
| 204 | <p>To represent <code>&</code> as a data character, use | ||
| 205 | named entity reference: | ||
| 206 | <pre class="html example"><code>&amp;</code></pre> | ||
| 207 | </p> | ||
| 208 | </d:desc> | ||
| 209 | </d:item> | ||
| 210 | |||
| 211 | wakaba | 1.7 | <d:item name="bare etago" |
| 212 | class="tokenize-error"> | ||
| 213 | <d:message xml:lang="en">A <code></</code> string is not followed | ||
| 214 | by a tag name.</d:message><!-- </ EOF --> | ||
| 215 | <d:desc xml:lang="en"> | ||
| 216 | <p>There is a <code><</code> (<code>U+003C</code> | ||
| 217 | <code class="charname">LESS-THAN SIGN</code>) character | ||
| 218 | immediately followed by a <code>/</code> (<code>U+005F</code> | ||
| 219 | <code>SOLIDUS</code>) character, which is not part | ||
| 220 | of any end tag, in the input stream. The document | ||
| 221 | is non-conforming.</p> | ||
| 222 | |||
| 223 | <p>The <code></</code> sequence immediately followed | ||
| 224 | by an <abbr title="End of file pseudo-character">EOF</abbr> is | ||
| 225 | interpreted as a string data of <code></</code>.</p> | ||
| 226 | |||
| 227 | <p>The <code></</code> sequence as string data must | ||
| 228 | be escaped as: | ||
| 229 | <pre class="html example"><code>&lt;/</code></pre> | ||
| 230 | </p> | ||
| 231 | </d:desc> | ||
| 232 | </d:item> | ||
| 233 | |||
| 234 | wakaba | 1.4 | <d:item name="bare stago" |
| 235 | class="tokenize-error"> | ||
| 236 | <d:message xml:lang="en">A <code><</code> character is not followed | ||
| 237 | by tag name or by a <code>!</code> character.</d:message> | ||
| 238 | <d:desc xml:lang="en"> | ||
| 239 | wakaba | 1.6 | <p>A <code><</code> (<code>U+003C</code> |
| 240 | <code class="charname">LESS-THAN SIGN</code>) character which is not part | ||
| 241 | of any markup appears in the input stream.</p> | ||
| 242 | wakaba | 1.4 | |
| 243 | <p>The <code><</code> character as a data character must | ||
| 244 | be escaped as: | ||
| 245 | wakaba | 1.6 | <pre class="html example"><code>&lt;</code></pre> |
| 246 | wakaba | 1.4 | </p> |
| 247 | </d:desc> | ||
| 248 | </d:item> | ||
| 249 | |||
| 250 | wakaba | 1.3 | <d:item name="bare nero" |
| 251 | class="tokenize-error"> | ||
| 252 | <d:message xml:lang="en">The decimal representation of the code position | ||
| 253 | of a character must be specified after <code>&#</code>.</d:message> | ||
| 254 | <d:desc xml:lang="en"> | ||
| 255 | <p>An <code>&</code> (<code>U+0026</code> | ||
| 256 | <code class="charname">AMPERSAND</code>) character immediately | ||
| 257 | followed by a <code>#</code> (<code>U+0023</code> | ||
| 258 | <code>NUMBER SIGN</code>) character which | ||
| 259 | is not part of any reference appears in the input stream. | ||
| 260 | The document is non-conforming.</p> | ||
| 261 | |||
| 262 | <p>The string <code>&#</code> must be the first two characters | ||
| 263 | of a reference: | ||
| 264 | wakaba | 1.15 | <dl class="switch"> |
| 265 | wakaba | 1.3 | <dt>Numeric character reference</dt> |
| 266 | <dd><pre class="html example"><code>&#<var>d</var>;</code></pre> | ||
| 267 | where <var>d</var> is the decimal representation of | ||
| 268 | the code point of the character to be referenced.</dd> | ||
| 269 | <dt>Hexadecimal character reference</dt> | ||
| 270 | <dd><pre class="html example"><code>&#x<var>h</var>;</code></pre> | ||
| 271 | where <var>h</var> is the hexadecimal representation | ||
| 272 | of the code point of the character to be referenced.</dd> | ||
| 273 | </dl> | ||
| 274 | </p> | ||
| 275 | |||
| 276 | <p>To represent <code>&#</code> as data characters, use | ||
| 277 | wakaba | 1.6 | a named entity reference for the <code>&</code> character: |
| 278 | wakaba | 1.3 | <pre class="html example"><code>&amp;#</code></pre> |
| 279 | </p> | ||
| 280 | </d:desc> | ||
| 281 | </d:item> | ||
| 282 | |||
| 283 | <d:item name="bare hcro" | ||
| 284 | class="tokenize-error"> | ||
| 285 | <d:message xml:lang="en">The hexadecimal representation of the code position | ||
| 286 | of a character must be specified after <code>&#x</code>.</d:message> | ||
| 287 | <d:desc xml:lang="en"> | ||
| 288 | <p>The string <code>&#x</code> or <code>&#X</code> which | ||
| 289 | is not part of any reference appears in the input stream. | ||
| 290 | The document is non-conforming.</p> | ||
| 291 | |||
| 292 | <p>The string <code>&#x</code> or <code>&#X</code> must | ||
| 293 | be the first three characters of a hexadecimal reference: | ||
| 294 | <pre class="html example"><code>&#x<var>h</var>;</code></pre> | ||
| 295 | where <var>h</var> is the hexadecimal representation | ||
| 296 | of the code point of the character to be referenced.</p> | ||
| 297 | |||
| 298 | <p>To represent <code>&#x</code> as data characters, use | ||
| 299 | wakaba | 1.6 | a named entity reference for the <code>&</code> character: |
| 300 | wakaba | 1.3 | <pre class="html example"><code>&amp;#x</code></pre> |
| 301 | </p> | ||
| 302 | </d:desc> | ||
| 303 | </d:item> | ||
| 304 | |||
| 305 | wakaba | 1.9 | <d:item name="bogus comment" |
| 306 | class="tokenize-error"> | ||
| 307 | <d:message xml:lang="en">String <code><!</code> is not followed | ||
| 308 | by <code>--</code>.</d:message> | ||
| 309 | <d:desc xml:lang="en"> | ||
| 310 | <p>There is a <code><</code> (<code>U+003C</code> | ||
| 311 | <code class="charname">LESS-THAN SIGN</code>) character | ||
| 312 | followed by a <code>!</code> (<code>U+0021</code> | ||
| 313 | <code class="charname">EXCLAMATION MARK</code>) character, | ||
| 314 | which is not followed by a <code>--</code> or | ||
| 315 | <code>!DOCTYPE</code>. The document is non-conforming.</p> | ||
| 316 | |||
| 317 | <dl class="switch"> | ||
| 318 | <dt>Comments</dt> | ||
| 319 | wakaba | 1.15 | <dd>In HTML document, comments must be introduced by |
| 320 | <code class="example"><!--</code> (<code><!</code> | ||
| 321 | <em>immediately</em> followed | ||
| 322 | wakaba | 1.9 | by <em>two</em> <code>-</code>s) and must be terminated by |
| 323 | wakaba | 1.15 | <code class="example">--></code>. |
| 324 | Strings <code><!</code> not followed | ||
| 325 | wakaba | 1.9 | by <code>--</code> and <code><!-</code> not followed by |
| 326 | <code>-</code> are not valid open delimiters for comments.</dd> | ||
| 327 | <dt>Marked sections, including <code>CDATA</code> sections</dt> | ||
| 328 | wakaba | 1.15 | <dd>Marked sections are not allowed in HTML document.</dd> |
| 329 | wakaba | 1.9 | <dt>Markup declarations</dt> |
| 330 | wakaba | 1.15 | <dd>Markup declarations, except for <code>DOCTYPE</code> |
| 331 | and comment declarations, are not allowed in HTML document.</dd> | ||
| 332 | wakaba | 1.9 | <dt>String <code><!</code></dt> |
| 333 | <dd>String <code><!</code> must be escaped as | ||
| 334 | wakaba | 1.15 | <code class="example">&lt;!</code>.</dd> |
| 335 | wakaba | 1.9 | </dl> |
| 336 | </d:desc> | ||
| 337 | </d:item> | ||
| 338 | |||
| 339 | wakaba | 1.7 | <d:item name="bogus end tag" |
| 340 | class="tokenize-error"> | ||
| 341 | wakaba | 1.9 | <d:message xml:lang="en">String <code></</code> is not followed |
| 342 | by tag name.</d:message><!-- </ non-name-start-char-non-EOF --> | ||
| 343 | wakaba | 1.7 | <d:desc xml:lang="en"> |
| 344 | <p>There is a <code><</code> (<code>U+003C</code> | ||
| 345 | <code class="charname">LESS-THAN SIGN</code>) character | ||
| 346 | immediately followed by a <code>/</code> (<code>U+005F</code> | ||
| 347 | <code>SOLIDUS</code>) character, which is not part | ||
| 348 | of any end tag, in the input stream. The document | ||
| 349 | is non-conforming.</p> | ||
| 350 | |||
| 351 | <p>The <code></</code> sequence not followed by a | ||
| 352 | tag name is parsed as an opening of bogus comment.</p> | ||
| 353 | |||
| 354 | <p>The <code></</code> sequence as string data must | ||
| 355 | be escaped as: | ||
| 356 | <pre class="html example"><code>&lt;/</code></pre> | ||
| 357 | </p> | ||
| 358 | </d:desc> | ||
| 359 | </d:item> | ||
| 360 | |||
| 361 | wakaba | 1.4 | <d:item name="dash in comment" |
| 362 | class="tokenize-error"> | ||
| 363 | <d:message xml:lang="en">There is a <code>--</code> sequence | ||
| 364 | in a comment.</d:message> | ||
| 365 | <d:desc xml:lang="en"> | ||
| 366 | <p>There is a <code>-</code> (<code>U+002D</code> | ||
| 367 | <code class="charname">HYPHEN-MINUS</code>) character | ||
| 368 | at the end of the comment or a <code>--</code> sequence | ||
| 369 | in the comment. The document is non-conforming.</p> | ||
| 370 | |||
| 371 | <p>Comments cannot contain a string <code>--</code>, as in XML. | ||
| 372 | Unlike SGML, there cannot be more than one comments | ||
| 373 | (where <i>comment</i> is an SGML term) in the comment | ||
| 374 | declaration.</p> | ||
| 375 | </d:desc> | ||
| 376 | </d:item> | ||
| 377 | |||
| 378 | wakaba | 1.1 | <d:item name="duplicate attribute" |
| 379 | class="tokenize-error"> | ||
| 380 | wakaba | 1.6 | <d:message xml:lang="en">There are two attributes with name |
| 381 | <code><var>$0</var></code>.</d:message> | ||
| 382 | wakaba | 1.1 | <d:desc xml:lang="en"> |
| 383 | wakaba | 1.3 | <p>There are more than one attributes with the same |
| 384 | name in a tag. The document is non-conforming.</p> | ||
| 385 | wakaba | 1.1 | |
| 386 | <p>The <code>motion</code> attribute is not part of the HTML standard. | ||
| 387 | Use <code>img</code> element with animation GIF instead.</p> | ||
| 388 | </d:desc> | ||
| 389 | </d:item> | ||
| 390 | |||
| 391 | <d:item name="nestc" | ||
| 392 | class="tokenize-error"> | ||
| 393 | wakaba | 1.10 | <d:message xml:lang="en">Polytheistic slash (<code>/></code>) cannot be |
| 394 | wakaba | 1.1 | used for this element.</d:message> |
| 395 | <d:desc xml:lang="en"> | ||
| 396 | wakaba | 1.10 | <p>Polytheistic slash (<code>/></code>) must not be used |
| 397 | wakaba | 1.3 | for the element. The document is non-conforming.</p> |
| 398 | |||
| 399 | wakaba | 1.10 | <p>The pol |