Parent Directory
|
Revision Log
++ ChangeLog 16 Jul 2007 13:55:43 -0000 * cc.cgi: Set |STDOUT| encoding as |utf8|. (htescape): Escape some more invisible characters. * error-description-source.en.xml: More error data. 2007-07-16 Wakaba <wakaba@suika.fam.cx> * error-description-source.en.xml: More error descriptions
| 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.2 | <section id="html5-tokenize-error"> |
| 15 | <h2>HTML5 Parse Errors in Tokenization Stage</h2> | ||
| 16 | wakaba | 1.1 | |
| 17 | wakaba | 1.3 | <d:item name="after html" |
| 18 | class="parse-error"> | ||
| 19 | <d:message xml:lang="en">Tag <code><<var>$0</var>></code> | ||
| 20 | is not allowed after the end tag <code></html></code>.</d:message> | ||
| 21 | <d:desc xml:lang="en"> | ||
| 22 | <p>The start or end tag of an element appears after the | ||
| 23 | <code>html</code> element has been closed. The document is | ||
| 24 | non-conforming.</p> | ||
| 25 | |||
| 26 | <p>Any content of the document other than comments | ||
| 27 | must be put into the <code>html</code> element.</p> | ||
| 28 | </d:desc> | ||
| 29 | </d:item> | ||
| 30 | |||
| 31 | <d:item name="bare ero" | ||
| 32 | class="tokenize-error"> | ||
| 33 | <d:message xml:lang="en">The <code>&</code> character must | ||
| 34 | introduce a reference.</d:message> | ||
| 35 | <d:desc xml:lang="en"> | ||
| 36 | <p>An <code>&</code> (<code>U+0026</code> | ||
| 37 | <code class="charname">AMPERSAND</code>) character which | ||
| 38 | is not part of any reference appears in the input stream. | ||
| 39 | The document is non-conforming.</p> | ||
| 40 | |||
| 41 | <p>The <code>&</code> character must | ||
| 42 | be the first character of a reference: | ||
| 43 | <dl> | ||
| 44 | <dt>Named entity reference</dt> | ||
| 45 | <dd><pre class="html example"><code>&<var>entity-name</var>;</code></pre> | ||
| 46 | where <var>entity-name</var> is the name of the | ||
| 47 | character entity to be referenced.</dd> | ||
| 48 | <dt>Numeric character reference</dt> | ||
| 49 | <dd><pre class="html example"><code>&#<var>d</var>;</code></pre> | ||
| 50 | where <var>d</var> is the decimal representation of | ||
| 51 | the code position of the character to be referenced.</dd> | ||
| 52 | <dt>Hexadecimal character reference</dt> | ||
| 53 | <dd><pre class="html example"><code>&#x<var>h</var>;</code></pre> | ||
| 54 | where <var>h</var> is the hexadecimal representation | ||
| 55 | of the code position of the character to be referenced.</dd> | ||
| 56 | </dl> | ||
| 57 | </p> | ||
| 58 | |||
| 59 | <p>To represent <code>&</code> as a data character, use | ||
| 60 | named entity reference: | ||
| 61 | <pre class="html example"><code>&amp;</code></pre> | ||
| 62 | </p> | ||
| 63 | </d:desc> | ||
| 64 | </d:item> | ||
| 65 | |||
| 66 | wakaba | 1.4 | <d:item name="bare stago" |
| 67 | class="tokenize-error"> | ||
| 68 | <d:message xml:lang="en">A <code><</code> character is not followed | ||
| 69 | by tag name or by a <code>!</code> character.</d:message> | ||
| 70 | <d:desc xml:lang="en"> | ||
| 71 | <p>A <code><</code> (<code>U+003C</code> <code class="charname">LESS-THAN | ||
| 72 | SIGN</code>) character which is not part of any markup appears | ||
| 73 | in the input stream.</p> | ||
| 74 | |||
| 75 | <p>The <code><</code> character as a data character must | ||
| 76 | be escaped as: | ||
| 77 | <pre class="html example"><code><lt;</code></pre> | ||
| 78 | </p> | ||
| 79 | </d:desc> | ||
| 80 | </d:item> | ||
| 81 | |||
| 82 | wakaba | 1.3 | <d:item name="bare nero" |
| 83 | class="tokenize-error"> | ||
| 84 | <d:message xml:lang="en">The decimal representation of the code position | ||
| 85 | of a character must be specified after <code>&#</code>.</d:message> | ||
| 86 | <d:desc xml:lang="en"> | ||
| 87 | <p>An <code>&</code> (<code>U+0026</code> | ||
| 88 | <code class="charname">AMPERSAND</code>) character immediately | ||
| 89 | followed by a <code>#</code> (<code>U+0023</code> | ||
| 90 | <code>NUMBER SIGN</code>) character which | ||
| 91 | is not part of any reference appears in the input stream. | ||
| 92 | The document is non-conforming.</p> | ||
| 93 | |||
| 94 | <p>The string <code>&#</code> must be the first two characters | ||
| 95 | <code>NUMBER SIGN</code>) character must be the first two characters | ||
| 96 | of a reference: | ||
| 97 | <dl> | ||
| 98 | <dt>Numeric character reference</dt> | ||
| 99 | <dd><pre class="html example"><code>&#<var>d</var>;</code></pre> | ||
| 100 | where <var>d</var> is the decimal representation of | ||
| 101 | the code point of the character to be referenced.</dd> | ||
| 102 | <dt>Hexadecimal character reference</dt> | ||
| 103 | <dd><pre class="html example"><code>&#x<var>h</var>;</code></pre> | ||
| 104 | where <var>h</var> is the hexadecimal representation | ||
| 105 | of the code point of the character to be referenced.</dd> | ||
| 106 | </dl> | ||
| 107 | </p> | ||
| 108 | |||
| 109 | <p>To represent <code>&#</code> as data characters, use | ||
| 110 | named entity reference: | ||
| 111 | <pre class="html example"><code>&amp;#</code></pre> | ||
| 112 | </p> | ||
| 113 | </d:desc> | ||
| 114 | </d:item> | ||
| 115 | |||
| 116 | <d:item name="bare hcro" | ||
| 117 | class="tokenize-error"> | ||
| 118 | <d:message xml:lang="en">The hexadecimal representation of the code position | ||
| 119 | of a character must be specified after <code>&#x</code>.</d:message> | ||
| 120 | <d:desc xml:lang="en"> | ||
| 121 | <p>The string <code>&#x</code> or <code>&#X</code> which | ||
| 122 | is not part of any reference appears in the input stream. | ||
| 123 | The document is non-conforming.</p> | ||
| 124 | |||
| 125 | <p>The string <code>&#x</code> or <code>&#X</code> must | ||
| 126 | be the first three characters of a hexadecimal reference: | ||
| 127 | <pre class="html example"><code>&#x<var>h</var>;</code></pre> | ||
| 128 | where <var>h</var> is the hexadecimal representation | ||
| 129 | of the code point of the character to be referenced.</p> | ||
| 130 | |||
| 131 | <p>To represent <code>&#x</code> as data characters, use | ||
| 132 | named entity reference: | ||
| 133 | <pre class="html example"><code>&amp;#x</code></pre> | ||
| 134 | </p> | ||
| 135 | </d:desc> | ||
| 136 | </d:item> | ||
| 137 | |||
| 138 | wakaba | 1.4 | <d:item name="dash in comment" |
| 139 | class="tokenize-error"> | ||
| 140 | <d:message xml:lang="en">There is a <code>--</code> sequence | ||
| 141 | in a comment.</d:message> | ||
| 142 | <d:desc xml:lang="en"> | ||
| 143 | <p>There is a <code>-</code> (<code>U+002D</code> | ||
| 144 | <code class="charname">HYPHEN-MINUS</code>) character | ||
| 145 | at the end of the comment or a <code>--</code> sequence | ||
| 146 | in the comment. The document is non-conforming.</p> | ||
| 147 | |||
| 148 | <p>Comments cannot contain a string <code>--</code>, as in XML. | ||
| 149 | Unlike SGML, there cannot be more than one comments | ||
| 150 | (where <i>comment</i> is an SGML term) in the comment | ||
| 151 | declaration.</p> | ||
| 152 | </d:desc> | ||
| 153 | </d:item> | ||
| 154 | |||
| 155 | wakaba | 1.1 | <d:item name="duplicate attribute" |
| 156 | class="tokenize-error"> | ||
| 157 | <d:message xml:lang="en">There are two attributes with same name.</d:message> | ||
| 158 | <d:desc xml:lang="en"> | ||
| 159 | wakaba | 1.3 | <p>There are more than one attributes with the same |
| 160 | name in a tag. The document is non-conforming.</p> | ||
| 161 | wakaba | 1.1 | |
| 162 | <p>The <code>motion</code> attribute is not part of the HTML standard. | ||
| 163 | Use <code>img</code> element with animation GIF instead.</p> | ||
| 164 | </d:desc> | ||
| 165 | </d:item> | ||
| 166 | |||
| 167 | <d:item name="nestc" | ||
| 168 | class="tokenize-error"> | ||
| 169 | <d:message xml:lang="en">Void element syntax (<code>/></code>) cannot be | ||
| 170 | used for this element.</d:message> | ||
| 171 | <d:desc xml:lang="en"> | ||
| 172 | wakaba | 1.3 | <p>Void element syntax (<code>/></code>) must not be used |
| 173 | for the element. The document is non-conforming.</p> | ||
| 174 | |||
| 175 | <p>The void element syntax can only be | ||
| 176 | wakaba | 1.1 | used for <code>base</code>, <code>link</code>, <code>meta</code>, |
| 177 | <code>hr</code>, <code>br</code>, <code>img</code>, | ||
| 178 | <code>embed</code>, <code>param</code>, <code>area</code>, | ||
| 179 | wakaba | 1.3 | <code>col</code>, and <code>input</code> elements.</p> |
| 180 | wakaba | 1.1 | |
| 181 | wakaba | 1.3 | <p>Note that, unlike in XML, the void element syntax has |
| 182 | wakaba | 1.1 | no effect in HTML.</p> |
| 183 | </d:desc> | ||
| 184 | </d:item> | ||
| 185 | |||
| 186 | </section> | ||
| 187 | |||
| 188 | wakaba | 1.2 | <section id="html5-parse-errors"> |
| 189 | <h2>HTML5 Parse Errors in Tree Construction Stage</h2> | ||
| 190 | |||
| 191 | <d:item name="after head" | ||
| 192 | class="parse-error"> | ||
| 193 | <d:message xml:lang="en">The <code><var>$0</var></code> element cannot be | ||
| 194 | inserted between <code>head</code> and <code>body</code> elements.</d:message> | ||
| 195 | <d:desc xml:lang="en"> | ||
| 196 | wakaba | 1.3 | <p>A start tag appears after the <code>head</code> element is closed |
| 197 | wakaba | 1.2 | but before the <code>body</code> element is opened. |
| 198 | The document is non-conforming.</p> | ||
| 199 | </d:desc> | ||
| 200 | </d:item> | ||
| 201 | |||
| 202 | wakaba | 1.4 | <d:item name="DOCTYPE in the middle" |
| 203 | class="parse-error"> | ||
| 204 | <d:message xml:lang="en">A <code>DOCTYPE</code> appears after any | ||
| 205 | element or data character has been seen.</d:message> | ||
| 206 | <d:desc xml:lang="en"> | ||
| 207 | <p>A <code>DOCTYPE</code> appears after any element or data character | ||
| 208 | has been seen. The document is non-conforming.</p> | ||
| 209 | |||
| 210 | <p>The <code>DOCTYPE</code> must be placed before any | ||
| 211 | tag, reference, or data character. Only white space characters | ||
| 212 | and comments can be inserted before the <code>DOCTYPE</code>.</p> | ||
| 213 | </d:desc> | ||
| 214 | </d:item> | ||
| 215 | |||
| 216 | <d:item name="in body" | ||
| 217 | class="parse-error"> | ||
| 218 | <d:message xml:lang="en">Tag <code><<var>$0</var>></code> | ||
| 219 | is not allowed in <code>body</code>.</d:message> | ||
| 220 | <d:desc xml:lang="en"> | ||
| 221 | <p>The start or end tag of an element, which | ||
| 222 | cannot be a descendant of <code>body</code> element, appears | ||
| 223 | in the input stream while the <code>body</code> element has been opened. | ||
| 224 | The document is non-conforming.</p> | ||
| 225 | </d:desc> | ||
| 226 | </d:item> | ||
| 227 | |||
| 228 | wakaba | 1.3 | <d:item name="in table" |
| 229 | class="parse-error"> | ||
| 230 | <d:message xml:lang="en">Tag <code><<var>$0</var>></code> | ||
| 231 | is not allowed in <code>table</code>.</d:message> | ||
| 232 | <d:desc xml:lang="en"> | ||
| 233 | wakaba | 1.4 | <p>The start or end tag of an element, which |
| 234 | cannot be a child of <code>table</code> element, appears | ||
| 235 | in the input stream while the <code>table</code> element has been opened | ||
| 236 | but no other element has been opened. The document is non-conforming.</p> | ||
| 237 | wakaba | 1.3 | |
| 238 | <p>In <code>table</code>, only table related elements | ||
| 239 | are allowed; any other element must be contained in | ||
| 240 | <code>td</code> or <code>th</code> element to form | ||
| 241 | a part of the table, or <code>caption</code> element to create | ||
| 242 | a table caption.</p> | ||
| 243 | </d:desc> | ||
| 244 | </d:item> | ||
| 245 | |||
| 246 | <d:item name="in table:#character" | ||
| 247 | class="parse-error"> | ||
| 248 | <d:message xml:lang="en">Data character is not allowed in | ||
| 249 | <code>table</code>.</d:message> | ||
| 250 | <d:desc xml:lang="en"> | ||
| 251 | <p>A data character appears in <code>table</code>. The document | ||
| 252 | is non-conforming.</p> | ||
| 253 | |||
| 254 | <p>In <code>table</code>, only table related elements | ||
| 255 | are allowed; any other element and data character must be contained in | ||
| 256 | <code>td</code> or <code>th</code> element to form | ||
| 257 | a part of the table, or <code>caption</code> element to create | ||
| 258 | a table caption.</p> | ||
| 259 | </d:desc> | ||
| 260 | </d:item> | ||
| 261 | |||
| 262 | <d:item name="missing start tag:tr" | ||
| 263 | class="parse-error"> | ||
| 264 | <d:message xml:lang="en">Start tag of <code>tr</code> | ||
| 265 | element is missing.</d:message> | ||
| 266 | <d:desc> | ||
| 267 | <p>Start tag of a <code>tr</code> element, which is <em>not</em> | ||
| 268 | optional, is missing. The document is non-conforming.</p> | ||
| 269 | |||
| 270 | <p>In a table section, a <code><tr></code> start tag | ||
| 271 | must occur before any <code><td></code> or | ||
| 272 | <code><th></code> start tag. Though the HTML5 parser | ||
| 273 | implies the <code><tr></code> start tag before | ||
| 274 | these start tags, it must be explicitly specified.</p> | ||
| 275 | </d:desc> | ||
| 276 | </d:item> | ||
| 277 | |||
| 278 | wakaba | 1.2 | <d:item name="no DOCTYPE" |
| 279 | class="parse-error"> | ||
| 280 | <d:message xml:lang="en">This document does not start with the | ||
| 281 | wakaba | 1.3 | <code>DOCTYPE</code>.</d:message> |
| 282 | <d:desc> | ||
| 283 | <p>The document does not start with a <code>DOCTYPE</code>. | ||
| 284 | The document is non-conforming.</p> | ||
| 285 | |||
| 286 | <p>An HTML document must start by a <code>DOCTYPE</code>: | ||
| 287 | <pre class="html example"><code><!DOCTYPE HTML></code></pre> | ||
| 288 | </p> | ||
| 289 | |||
| 290 | <p>Only white space characters and comments are allowed | ||
| 291 | before the <code>DOCTYPE</code>.</p> | ||
| 292 | </d:desc> | ||
| 293 | wakaba | 1.2 | </d:item> |
| 294 | |||
| 295 | <d:item name="not closed" | ||
| 296 | class="parse-error"> | ||
| 297 | <d:message xml:lang="en">Element <code><var>$0</var></code> is not | ||
| 298 | closed.</d:message> | ||
| 299 | wakaba | 1.3 | <d:desc> |
| 300 | <p>End tag of an element is not found before, for example, | ||
| 301 | an end tag of another element appears or | ||
| 302 | the end of the document. The document is non-conforming.</p> | ||
| 303 | </d:desc> | ||
| 304 | wakaba | 1.2 | </d:item> |
| 305 | |||
| 306 | <d:item name="not HTML5" | ||
| 307 | class="parse-error"> | ||
| 308 | <d:message xml:lang="en">This document is written in an old version of | ||
| 309 | HTML.</d:message> | ||
| 310 | wakaba | 1.3 | <d:desc xml:lang="en"> |
| 311 | <p>The document contains a <code>DOCTYPE</code> declaration | ||
| 312 | that is different from HTML5 <code>DOCTYPE</code> (i.e. <code><!DOCTYPE | ||
| 313 | HTML></code>). The document is non-conforming.</p> | ||
| 314 | |||
| 315 | <p>The document might or might not be conformant to | ||
| 316 | some version of HTML. However, conformance to any HTML | ||
| 317 | specification other than HTML5 provides for no practical | ||
| 318 | convenience, since Web borwsers will parse any | ||
| 319 | HTML document (roughly) as defined in HTML5.</p> | ||
| 320 | </d:desc> | ||
| 321 | wakaba | 1.2 | </d:item> |
| 322 | |||
| 323 | <d:item name="unmatched end tag" | ||
| 324 | class="parse-error"> | ||
| 325 | <d:message xml:lang="en">Element <code><var>$0</var></code> is not | ||
| 326 | opened.</d:message> | ||
| 327 | wakaba | 1.4 | <d:desc> |
| 328 | <p>An end tag appears though no element with the same name | ||
| 329 | has been opened. The document is non-conforming.</p> | ||
| 330 | |||
| 331 | <p>For any end tag in HTML document, there must be a | ||
| 332 | corresponding start tag.</p> | ||
| 333 | </d:desc> | ||
| 334 | wakaba | 1.2 | </d:item> |
| 335 | |||
| 336 | </section> | ||
| 337 | |||
| 338 | wakaba | 1.1 | <section id="element-content-model-errors"> |
| 339 | <h2>Element Content Model Errors</h2> | ||
| 340 | |||
| 341 | <d:item name="character not allowed" | ||
| 342 | class="content-model-error"> | ||
| 343 | <d:message xml:lang="en">Data character is not allowed in this | ||
| 344 | context.</d:message> | ||
| 345 | <d:desc xml:lang="en"> | ||
| 346 | wakaba | 1.3 | <p>A data character appears where it is not allowed in this |
| 347 | wakaba | 1.1 | context. The document is non-conforming.</p> |
| 348 | |||
| 349 | <p>Possible causes: | ||
| 350 | <dl> | ||
| 351 | <dt>If the erred element is an inline-level element (such | ||
| 352 | as <code>a</code> or <code>span</code>)</dt> | ||
| 353 | <dd><p>A data character cannot be a child | ||
| 354 | of certain sectioning elements such as <code>body</code>, | ||
| 355 | <code>section</code>, and <code>blockquote</code>.</p> | ||
| 356 | |||
| 357 | <p>Any inline-level content must be put | ||
| 358 | in e.g. paragraph element such as <code>p</code>.</p></dd> | ||
| 359 | <dt>If the erred element is a block-level element (such as | ||
| 360 | <code>div</code> or <code>h<var>n</var></code>)</dt> | ||
| 361 | <dd><p>Though some elements such as <code>div</code>, | ||
| 362 | <code>li</code>, and <code>td</code> allow | ||
| 363 | <em>either one</em> of block-level or inline-level content | ||
| 364 | is allowed. If there is a block-level content, | ||
| 365 | any inline-level content must be put | ||
| 366 | in e.g. paragraph element such as <code>p</code>.</p></dd> | ||
| 367 | </dl> | ||
| 368 | </p> | ||
| 369 | </d:desc> | ||
| 370 | </d:item> | ||
| 371 | |||
| 372 | <d:item name="child element missing" | ||
| 373 | class="content-model-error"> | ||
| 374 | <d:message xml:lang="en">There must be a <code><var>$0</var></code> | ||
| 375 | element as a child of this element.</d:message> | ||
| 376 | <d:desc xml:lang="en"> | ||
| 377 | <p>The content model of the element is so defined that it | ||
| 378 | must contain a <code><var>$0</var></code> child element. | ||
| 379 | wakaba | 1.3 | The document is non-conforming.</p> |
| 380 | wakaba | 1.1 | |
| 381 | <p>For example: | ||
| 382 | <ul> | ||
| 383 | <li>The <code>head</code> element must contain exactly one | ||
| 384 | <code>title</code> child element.</li> | ||
| 385 | <li><a href="#child-element-missing:td%7Cth">The <code>tr</code> | ||
| 386 | element must contain one or more <code>td</code> or <code>th</code> | ||
| 387 | child element.</a></li> | ||
| 388 | </ul> | ||
| 389 | </p> | ||
| 390 | </d:desc> | ||
| 391 | </d:item> | ||
| 392 | |||
| 393 | <d:item name="child element missing:td|th" | ||
| 394 | class="content-model-error"> | ||
| 395 | <d:message xml:lang="en">There must be a <code>td</code> | ||
| 396 | or <code>th</code> element as a child of this element.</d:message> | ||
| 397 | <d:desc xml:lang="en"> | ||
| 398 | <p>The <code>tr</code> element must contain at least one | ||
| 399 | wakaba | 1.3 | <code>td</code> or <code>th</code> child element. The document |
| 400 | is non-conforming.</p> | ||
| 401 | wakaba | 1.1 | </d:desc> |
| 402 | </d:item> | ||
| 403 | |||
| 404 | <d:item name="element not allowed" | ||
| 405 | class="content-model-error"> | ||
| 406 | <d:message xml:lang="en">This element is not allowed in this | ||
| 407 | context.</d:message> | ||
| 408 | <d:desc xml:lang="en"> | ||
| 409 | wakaba | 1.3 | <p>An element appears where it is not allowed. The document |
| 410 | wakaba | 1.1 | is non-conforming.</p> |
| 411 | |||
| 412 | wakaba | 1.3 | <p><strong>Note</strong>: The conformance checker does |
| 413 | <em>not</em> support form elements yet.</p> | ||
| 414 | |||
| 415 | wakaba | 1.1 | <p>Possible causes: |
| 416 | <dl> | ||
| 417 | <dt>If the erred element is an inline-level element (such | ||
| 418 | as <code>a</code> or <code>span</code>)</dt> | ||
| 419 | <dd><p>An inline-level element cannot be a child | ||
| 420 | of certain sectioning elements such as <code>body</code>, | ||
| 421 | <code>section</code>, and <code>blockquote</code>.</p> | ||
| 422 | |||
| 423 | <p>Any inline-level content must be put | ||
| 424 | in e.g. paragraph element such as <code>p</code>.</p></dd> | ||
| 425 | <dt>If the erred element is a block-level element (such as | ||
| 426 | <code>div</code> or <code>h<var>n</var></code>)</dt> | ||
| 427 | <dd><p>Though some elements such as <code>div</code>, | ||
| 428 | <code>li</code>, and <code>td</code> allow | ||
| 429 | <em>either one</em> of block-level or inline-level content | ||
| 430 | is allowed. If there is a block-level content, | ||
| 431 | any inline-level content must be put | ||
| 432 | in e.g. paragraph element such as <code>p</code>.</p></dd> | ||
| 433 | <dt>If the erred element is the root <code>html</code> element</dt> | ||
| 434 | <dd><p>In an XHTML document, the root <code>html</code> | ||
| 435 | element must have an <code>xmlns</code> attribute | ||
| 436 | whose value is set to | ||
| 437 | <code>http://www.w3.org/1999/xhtml</code>.</p></dd> | ||
| 438 | </dl> | ||
| 439 | </p> | ||
| 440 | </d:desc> | ||
| 441 | </d:item> | ||
| 442 | |||
| 443 | wakaba | 1.2 | </section> |
| 444 | |||
| 445 | wakaba | 1.3 | <section id="attribute-errors"> |
| 446 | <h2>Attribute Errors</h2> | ||
| 447 | |||
| 448 | <d:item name="attribute missing" | ||
| 449 | class="attribute-error"> | ||
| 450 | <d:message xml:lang="en">Required attribute <code><var>$0</var></code> | ||
| 451 | is not specified.</d:message> | ||
| 452 | <d:desc> | ||
| 453 | <p>A required attribute is not specified. The document | ||
| 454 | is non-conforming.</p> | ||
| 455 | |||
| 456 | <p>Some attribute is defined as <i>required</i>. | ||
| 457 | For example, any <code>img</code> element must have | ||
| 458 | <code>alt</code> and <code>src</code> attributes specified. | ||
| 459 | Without required attributes specified, user agents | ||
| 460 | cannot provide the full functionality of the element | ||
| 461 | to the user.</p> | ||
| 462 | </d:desc> | ||
| 463 | </d:item> | ||
| 464 | |||
| 465 | <d:item name="in HTML:xml:lang" | ||
| 466 | class="attribute-error"> | ||
| 467 | <d:message xml:lang="en">The <code>xml:lang</code> attribute is not | ||
| 468 | allowed in HTML document.</d:message> | ||
| 469 | <d:desc> | ||
| 470 | <p>The <code>xml:lang</code> attribute is not allowed in | ||
| 471 | HTML document. The document is non-conforming.</p> | ||
| 472 | |||
| 473 | wakaba | 1.4 | <p>The <code>lang</code> attribute in the <code>null</code> |
| 474 | namespace for HTML elements is defined as conforming <em>only</em> for | ||
| 475 | wakaba | 1.3 | XML document.</p> |
| 476 | |||
| 477 | <p>To specify natural language information in HTML document, | ||
| 478 | use <code>lang</code> attribute instead.</p> | ||
| 479 | <!-- @@ ISSUE: xml:lang in non-HTML element in DOM5 HTML created | ||
| 480 | from an HTML document? --> | ||
| 481 | </d:desc> | ||
| 482 | </d:item> | ||
| 483 | |||
| 484 | <d:item name="in XML:charset" | ||
| 485 | class="attribute-error"> | ||
| 486 | <d:message xml:lang="en">The <code>charset</code> attribute is not | ||
| 487 | allowed in XML document.</d:message> | ||
| 488 | <d:desc> | ||
| 489 | <p>The <code>charset</code> attribute of a | ||
| 490 | <code>meta</code> element is not allowed in XML document. | ||
| 491 | The document is non-conforming.</p> | ||
| 492 | |||
| 493 | <p>To specify the character encoding used for serialization, | ||
| 494 | if necessary, use XML declaration instead: | ||
| 495 | <pre class="xml example"><code><?xml version="1.0" encoding="<var>encoding-name</var>"?></code></pre> | ||
| 496 | </p> | ||
| 497 | </d:desc> | ||
| 498 | </d:item> | ||
| 499 | |||
| 500 | <d:item name="in XML:lang" | ||
| 501 | class="attribute-error"> | ||
| 502 | <d:message xml:lang="en">The <code>lang</code> attribute is not | ||
| 503 | allowed in XML document.</d:message> | ||
| 504 | <d:desc> | ||
| 505 | <p>The HTML <code>lang</code> attribute is not allowed in | ||
| 506 | XML document. The document is non-conforming.</p> | ||
| 507 | |||
| 508 | <p>The <code>lang</code> attribute in <code>null</code> | ||
| 509 | wakaba | 1.4 | namespace for HTML elements is defined as conforming <em>only</em> for |
| 510 | wakaba | 1.3 | HTML document.</p> |
| 511 | |||
| 512 | <p>To specify natural language information in XML document, | ||
| 513 | use <code>xml:lang</code> attribute instead.</p> | ||
| 514 | </d:desc> | ||
| 515 | </d:item> | ||
| 516 | |||
| 517 | <d:item name="in XML:xmlns" | ||
| 518 | class="attribute-error"> | ||
| 519 | <d:message xml:lang="en">The <code>xmlns</code> attribute | ||
| 520 | in the <code>null</code> namespace is not allowed in | ||
| 521 | XHTML document. The document is non-conforming.</d:message> | ||
| 522 | <d:desc> | ||
| 523 | <p>The <code>xmlns</code> attribute in the <code>null</code> | ||
| 524 | namespace is not allowed in XHTML document.</p> | ||
| 525 | |||
| 526 | <p>This error should not occur in conformance-checking | ||
| 527 | static documents.</p> | ||
| 528 | </d:desc> | ||
| 529 | </d:item> | ||
| 530 | |||
| 531 | </section> | ||
| 532 | |||
| 533 | wakaba | 1.2 | <section id="attribute-value-errors"> |
| 534 | <h2>Attribute Value Errors</h2> | ||
| 535 | wakaba | 1.1 | |
| 536 | wakaba | 1.2 | <d:item name="enumerated:invalid" |
| 537 | wakaba | 1.3 | class="attribute-value-error"> |
| 538 | wakaba | 1.2 | <d:message xml:lang="en">This attribute only allow a limited set of |
| 539 | values and the specified value is not one of them.</d:message> | ||
| 540 | </d:item> | ||
| 541 | |||
| 542 | wakaba | 1.3 | <d:item name="duplicate ID" |
| 543 | class="attribute-value-error"> | ||
| 544 | <d:message xml:lang="en">This identifier has already been | ||
| 545 | assigned to another element.</d:message> | ||
| 546 | <!-- @@ <id=a xml:id=a>? --> | ||
| 547 | </d:item> | ||
| 548 | |||
| 549 | wakaba | 1.4 | <d:item name="link type:bad-context" |
| 550 | class="attribute-value-error"> | ||
| 551 | <d:message xml:lang="en">The link type <code><var>$0</var></code> | ||
| 552 | cannot be specified for this element.</d:message> | ||
| 553 | <d:desc xml:lang="en"> | ||
| 554 | <p>The specified link type cannot be used for the element. | ||
| 555 | The document is non-conforming.</p> | ||
| 556 | |||
| 557 | <p>Link types are associated with limited set of elements. | ||
| 558 | They cannot be used with other elements.</p> | ||
| 559 | |||
| 560 | <p>For example, link type <code>bookmark</code> | ||
| 561 | can be used with <code>a</code> or <code>area</code |