Parent Directory
|
Revision Log
++ ChangeLog 11 Mar 2008 14:10:08 -0000 2008-03-11 Wakaba <wakaba@suika.fam.cx> * cc.cgi: |value| should be output in |dt| in Parse Errors section.
| 1 | wakaba | 1.1 | <!DOCTYPE html><html id="error-description" lang="en" xmlns:d="http://suika.fam.cx/~wakaba/archive/2007/wdcc-desc/" xmlns="http://www.w3.org/1999/xhtml"> |
| 2 | <head> | ||
| 3 | <title xml:lang="en">Description of Errors — | ||
| 4 | Web Document Conformance Checker (BETA)</title> | ||
| 5 | <link href="cc-style" rel="stylesheet"> | ||
| 6 | <link href="#license" rel="license"> | ||
| 7 | </head> | ||
| 8 | <body> | ||
| 9 | <h1>Description of Errors</h1> | ||
| 10 | |||
| 11 | wakaba | 1.15 | <section id="html5-character-encoding"> |
| 12 | <h2>HTML5 Character Encoding Errors</h2> | ||
| 13 | |||
| 14 | <div class="section format-charset must" id="m:character-encoding"><h3>Character encoding <code><var>$0</var></code> | ||
| 15 | is not allowed for <abbr>HTML</abbr> document.</h3> | ||
| 16 | <p>The character encoding used for the document is not allowed | ||
| 17 | for <abbr>HTML</abbr> document. The document is non‐conforming.</p> | ||
| 18 | </div> | ||
| 19 | |||
| 20 | <div class="section format-charset should" id="s:character-encoding"><h3>Character encoding <code><var>$0</var></code> | ||
| 21 | should not be used for <abbr>HTML</abbr> document.</h3> | ||
| 22 | <p>The character encoding used for the document is not recommended | ||
| 23 | for <abbr>HTML</abbr> document. The document is non‐conforming | ||
| 24 | unless there is any good reason to use that encoding.</p> | ||
| 25 | </div> | ||
| 26 | |||
| 27 | <div class="section format-charset warning" id="w:character-encoding"><h3>Use of UTF-8 is encouraged.</h3> | ||
| 28 | <p>Use of UTF-8 as the character encoding of the document is encouraged, | ||
| 29 | though the use of another character encoding is conforming.</p> | ||
| 30 | </div> | ||
| 31 | |||
| 32 | wakaba | 1.16 | <div class="section format-charset unsupported" id="unsupported:character-encoding"><h3>Conformance for character encoding requirements |
| 33 | cannot be checked.</h3> | ||
| 34 | <p>The conformance checker cannot detect whether the input document | ||
| 35 | met the requirements on character encoding, since the document | ||
| 36 | is not inputed as a serialized byte sequence. The document is | ||
| 37 | not conforming if it is not encoded in an appropriate character | ||
| 38 | encoding with appropriate labeling.</p> | ||
| 39 | </div> | ||
| 40 | |||
| 41 | wakaba | 1.15 | <div class="section format-charset error" id="m:no-character-encoding-declaration"><h3>There is no character encoding |
| 42 | declaration.</h3> | ||
| 43 | <p>The document does not contain a character encoding | ||
| 44 | declaration. Unless the character encoding is explicitly | ||
| 45 | wakaba | 1.16 | specified in lower‐level protocol, e.g. in <abbr>HTTP</abbr>, |
| 46 | wakaba | 1.15 | or is implied by <abbr>BOM</abbr>, there must be a character |
| 47 | encoding declaration. The document is non‐conforming.</p> | ||
| 48 | |||
| 49 | <p>The long character encoding declaration syntax | ||
| 50 | <code class="html bad example"><meta http-equiv="Content-Type" content="text/html; charset=<var>charset-name</var>"></code> | ||
| 51 | is obsolete. The new syntax is:</p> | ||
| 52 | <pre class="html example"> | ||
| 53 | <code><meta charset="<var>charset-name</var>"></code></pre> | ||
| 54 | |||
| 55 | <p>Note that the <code>encoding</code> declaration in <abbr>XML</abbr> | ||
| 56 | declaration has no effect for <abbr>HTML</abbr> document.</p> | ||
| 57 | </div> | ||
| 58 | |||
| 59 | <div class="section format-charset error" id="m:non-ascii-superset"><h3>No character encoding metadata is found | ||
| 60 | wakaba | 1.16 | in lower‐level protocol nor is there <abbr>BOM</abbr>, while |
| 61 | wakaba | 1.15 | character encoding <code><var>$0</var></code> |
| 62 | is not a superset of <abbr>ASCII</abbr>.</h3> | ||
| 63 | <p>The document is not labeled with character encoding name | ||
| 64 | wakaba | 1.16 | in lower‐level protocol, e.g. in <abbr>HTTP</abbr>, and |
| 65 | wakaba | 1.15 | the document is not begin with <abbr>BOM</abbr>. In addition, |
| 66 | the character encoding of the document is not a superset of | ||
| 67 | <abbr>ASCII</abbr>. The document is non‐conforming.</p> | ||
| 68 | |||
| 69 | <p>Unless there is a <abbr>BOM</abbr>, the character encoding | ||
| 70 | for the document must be specified in e.g. <abbr>HTTP</abbr>‐level, | ||
| 71 | as:</p> | ||
| 72 | <pre class="http example"> | ||
| 73 | <code>Content-Type: text/html; charset=<var>charset-name</var></code></pre> | ||
| 74 | |||
| 75 | <p>Existence of <abbr>HTML</abbr> character encoding declaration, i.e. | ||
| 76 | <code class="html example"><meta charset="<var>charset-name</var>"></code>, | ||
| 77 | does not allow to omit <code>charset</code> parameter | ||
| 78 | for <abbr>HTML</abbr> document encoded in non‐<abbr>ASCII</abbr> | ||
| 79 | compatible encoding.</p> | ||
| 80 | |||
| 81 | <p>Character encodings <code>Shift_JIS</code>, <code>Windows-31J</code>, | ||
| 82 | and <code>ISO-2022-JP</code> are <em>not</em> a superset of | ||
| 83 | <abbr>ASCII</abbr> for the purpose of <abbr>HTML</abbr> conformance.</p> | ||
| 84 | </div> | ||
| 85 | |||
| 86 | <div class="section format-charset warning" id="w:charset-label-detected"><h3>While parsing the document as | ||
| 87 | <code><var>$0</var></code>, a character encoding declaration specifying | ||
| 88 | character encoding as <code><var>$1</var></code> is found. The document | ||
| 89 | is reparsed.</h3> | ||
| 90 | <p>While parsing a document in a character encoding, | ||
| 91 | a character encoding declaration which declares the character | ||
| 92 | encoding of the document as another character encoding is found. | ||
| 93 | The occurence of this warning itself does not make the document | ||
| 94 | non‐conforming. However, the failure of the first attempt to | ||
| 95 | to detect the character encoding might be the result of non‐conformance | ||
| 96 | of the document.</p> | ||
| 97 | |||
| 98 | <p>The document will be reparsed from the beginning. Some error | ||
| 99 | or warning might be reported again.</p> | ||
| 100 | |||
| 101 | <p>These are suggestions to avoid this warning:</p> | ||
| 102 | <ul> | ||
| 103 | <li>Specify <code>charset</code> parameter in the <code>Content-Type</code> | ||
| 104 | field in the <abbr>HTTP</abbr> header, as: | ||
| 105 | <pre class="HTTP example"> | ||
| 106 | <code>Content-Type: text/html; charset="<var>charset-name</var>"</code></pre></li> | ||
| 107 | <li>Put the character encoding declaration | ||
| 108 | (<code class="html example"><meta charset="<var>charset-name</var>"></code>) | ||
| 109 | just after <code class="html example"><head></code> start tag.</li> | ||
| 110 | <li>Use <code>UTF-8</code>.</li> | ||
| 111 | </ul> | ||
| 112 | </div> | ||
| 113 | </section> | ||
| 114 | |||
| 115 | wakaba | 1.2 | <section id="html5-tokenize-error"> |
| 116 | <h2>HTML5 Parse Errors in Tokenization Stage</h2> | ||
| 117 | wakaba | 1.1 | |
| 118 | wakaba | 1.3 | <div class="section parse-error" id="after-html"><h3>Tag <code><<var>$0</var>></code> |
| 119 | is not allowed after the end tag <code></html></code>.</h3> | ||
| 120 | <p>The start or end tag of an element appears after the | ||
| 121 | <code>html</code> element has been closed. The document is | ||
| 122 | non-conforming.</p> | ||
| 123 | |||
| 124 | <p>Any content of the document other than comments | ||
| 125 | must be put into the <code>html</code> element.</p> | ||
| 126 | </div> | ||
| 127 | |||
| 128 | wakaba | 1.7 | <div class="section parse-error" id="after-body"><h3>Tag <code><<var>$0</var>></code> |
| 129 | is not allowed after the end tag <code></body></code>.</h3> | ||
| 130 | <p>The start or end tag of an element appears after the | ||
| 131 | <code>body</code> element has been closed. The document is | ||
| 132 | non-conforming.</p> | ||
| 133 | |||
| 134 | <p>Any content of the document other than <code>head</code> | ||
| 135 | contents and comments must be put into the <code>body</code> | ||
| 136 | element.</p> | ||
| 137 | </div> | ||
| 138 | |||
| 139 | wakaba | 1.3 | <div class="section tokenize-error" id="bare-ero"><h3>The <code>&</code> character must |
| 140 | introduce a reference.</h3> | ||
| 141 | wakaba | 1.14 | <p>An <code>&</code> character which |
| 142 | wakaba | 1.3 | is not part of any reference appears in the input stream. |
| 143 | wakaba | 1.14 | The document is non‐conforming.</p> |
| 144 | wakaba | 1.3 | |
| 145 | wakaba | 1.14 | <p><em>Any <code>&</code> character in URI (or IRI) |
| 146 | must be escaped as <code class="example">&amp;</code>.</em></p> | ||
| 147 | wakaba | 1.9 | |
| 148 | wakaba | 1.3 | <p>The <code>&</code> character must |
| 149 | be the first character of a reference: | ||
| 150 | wakaba | 1.14 | <dl class="switch"> |
| 151 | wakaba | 1.3 | <dt>Named entity reference</dt> |
| 152 | <dd><pre class="html example"> | ||
| 153 | <code>&<var>entity-name</var>;</code></pre> | ||
| 154 | where <var>entity-name</var> is the name of the | ||
| 155 | character entity to be referenced.</dd> | ||
| 156 | <dt>Numeric character reference</dt> | ||
| 157 | <dd><pre class="html example"> | ||
| 158 | <code>&#<var>d</var>;</code></pre> | ||
| 159 | where <var>d</var> is the decimal representation of | ||
| 160 | the code position of the character to be referenced.</dd> | ||
| 161 | <dt>Hexadecimal character reference</dt> | ||
| 162 | <dd><pre class="html example"> | ||
| 163 | <code>&#x<var>h</var>;</code></pre> | ||
| 164 | where <var>h</var> is the hexadecimal representation | ||
| 165 | of the code position of the character to be referenced.</dd> | ||
| 166 | </dl> | ||
| 167 | </p> | ||
| 168 | |||
| 169 | <p>To represent <code>&</code> as a data character, use | ||
| 170 | named entity reference: | ||
| 171 | <pre class="html example"> | ||
| 172 | <code>&amp;</code></pre> | ||
| 173 | </p> | ||
| 174 | </div> | ||
| 175 | |||
| 176 | wakaba | 1.7 | <div class="section tokenize-error" id="bare-etago"><h3>A <code></</code> string is not followed |
| 177 | by a tag name.</h3> | ||
| 178 | <p>There is a <code><</code> (<code>U+003C</code> | ||
| 179 | <code class="charname">LESS-THAN SIGN</code>) character | ||
| 180 | immediately followed by a <code>/</code> (<code>U+005F</code> | ||
| 181 | <code>SOLIDUS</code>) character, which is not part | ||
| 182 | of any end tag, in the input stream. The document | ||
| 183 | is non-conforming.</p> | ||
| 184 | |||
| 185 | <p>The <code></</code> sequence immediately followed | ||
| 186 | by an <abbr title="End of file pseudo-character">EOF</abbr> is | ||
| 187 | interpreted as a string data of <code></</code>.</p> | ||
| 188 | |||
| 189 | <p>The <code></</code> sequence as string data must | ||
| 190 | be escaped as: | ||
| 191 | <pre class="html example"> | ||
| 192 | <code>&lt;/</code></pre> | ||
| 193 |