/[suikacvs]/test/html-webhacc/error-description-source.xml
Suika

Diff of /test/html-webhacc/error-description-source.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by wakaba, Mon Jul 16 08:38:48 2007 UTC revision 1.3 by wakaba, Mon Jul 16 10:55:11 2007 UTC
# Line 14  Web Document Conformance Checker (BETA)< Line 14  Web Document Conformance Checker (BETA)<
14  <section id="html5-tokenize-error">  <section id="html5-tokenize-error">
15  <h2>HTML5 Parse Errors in Tokenization Stage</h2>  <h2>HTML5 Parse Errors in Tokenization Stage</h2>
16    
17    <d:item name="after html"
18        class="parse-error">
19      <d:message xml:lang="en">Tag <code>&lt;<var>$0</var>&gt;</code>
20      is not allowed after the end tag <code>&lt;/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>&amp;</code> character must
34      introduce a reference.</d:message>
35      <d:desc xml:lang="en">
36        <p>An <code>&amp;</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>&amp;</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>&amp;<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>&amp;#<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>&amp;#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>&amp;</code> as a data character, use
60        named entity reference:
61          <pre class="html example"><code>&amp;amp;</code></pre>
62        </p>
63      </d:desc>
64    </d:item>
65    
66    <d:item name="bare nero"
67        class="tokenize-error">
68      <d:message xml:lang="en">The decimal representation of the code position
69      of a character must be specified after <code>&amp;#</code>.</d:message>
70      <d:desc xml:lang="en">
71        <p>An <code>&amp;</code> (<code>U+0026</code>
72        <code class="charname">AMPERSAND</code>) character immediately
73        followed by a <code>#</code> (<code>U+0023</code>
74        <code>NUMBER SIGN</code>) character which
75        is not part of any reference appears in the input stream.
76        The document is non-conforming.</p>
77    
78        <p>The string <code>&amp;#</code> must be the first two characters
79        <code>NUMBER SIGN</code>) character must be the first two characters
80        of a reference:
81          <dl>
82          <dt>Numeric character reference</dt>
83              <dd><pre class="html example"><code>&amp;#<var>d</var>;</code></pre>
84              where <var>d</var> is the decimal representation of
85              the code point of the character to be referenced.</dd>
86          <dt>Hexadecimal character reference</dt>
87              <dd><pre class="html example"><code>&amp;#x<var>h</var>;</code></pre>
88              where <var>h</var> is the hexadecimal representation
89              of the code point of the character to be referenced.</dd>
90          </dl>
91        </p>
92    
93        <p>To represent <code>&amp;#</code> as data characters, use
94        named entity reference:
95          <pre class="html example"><code>&amp;amp;#</code></pre>
96        </p>
97      </d:desc>
98    </d:item>
99    
100    <d:item name="bare hcro"
101        class="tokenize-error">
102      <d:message xml:lang="en">The hexadecimal representation of the code position
103      of a character must be specified after <code>&amp;#x</code>.</d:message>
104      <d:desc xml:lang="en">
105       <p>The string <code>&amp;#x</code> or <code>&amp;#X</code> which
106       is not part of any reference appears in the input stream.
107        The document is non-conforming.</p>
108    
109        <p>The string <code>&amp;#x</code> or <code>&amp;#X</code> must
110        be the first three characters of a hexadecimal reference:
111          <pre class="html example"><code>&amp;#x<var>h</var>;</code></pre>
112        where <var>h</var> is the hexadecimal representation
113        of the code point of the character to be referenced.</p>
114    
115        <p>To represent <code>&amp;#x</code> as data characters, use
116        named entity reference:
117          <pre class="html example"><code>&amp;amp;#x</code></pre>
118        </p>
119      </d:desc>
120    </d:item>
121    
122  <d:item name="duplicate attribute"  <d:item name="duplicate attribute"
123      class="tokenize-error">      class="tokenize-error">
124    <d:message xml:lang="en">There are two attributes with same name.</d:message>    <d:message xml:lang="en">There are two attributes with same name.</d:message>
125    <d:desc xml:lang="en">    <d:desc xml:lang="en">
126      <p>Attributes must be unique in an element.  Specifying      <p>There are more than one attributes with the same
127      attributes with same name more than once is non-conforming.</p>      name in a tag.  The document is non-conforming.</p>
128    
129      <p>The <code>motion</code> attribute is not part of the HTML standard.      <p>The <code>motion</code> attribute is not part of the HTML standard.
130      Use <code>img</code> element with animation GIF instead.</p>      Use <code>img</code> element with animation GIF instead.</p>
# Line 31  Web Document Conformance Checker (BETA)< Line 136  Web Document Conformance Checker (BETA)<
136    <d:message xml:lang="en">Void element syntax (<code>/></code>) cannot be    <d:message xml:lang="en">Void element syntax (<code>/></code>) cannot be
137    used for this element.</d:message>    used for this element.</d:message>
138    <d:desc xml:lang="en">    <d:desc xml:lang="en">
139      <p>The void element syntax <code>/></code> syntax can only be      <p>Void element syntax (<code>/></code>) must not be used
140        for the element.  The document is non-conforming.</p>
141    
142        <p>The void element syntax can only be
143      used for <code>base</code>, <code>link</code>, <code>meta</code>,      used for <code>base</code>, <code>link</code>, <code>meta</code>,
144      <code>hr</code>, <code>br</code>, <code>img</code>,      <code>hr</code>, <code>br</code>, <code>img</code>,
145      <code>embed</code>, <code>param</code>, <code>area</code>,      <code>embed</code>, <code>param</code>, <code>area</code>,
146      <code>col</code>, and <code>input</code> elements.      <code>col</code>, and <code>input</code> elements.</p>
     For any other elements, using that syntax is non-conforming.</p>  
147    
148      <p>Unlike XML, the void element syntax (<code>/></code>) has      <p>Note that, unlike in XML, the void element syntax has
149      no effect in HTML.</p>      no effect in HTML.</p>
150    </d:desc>    </d:desc>
151  </d:item>  </d:item>
# Line 53  Web Document Conformance Checker (BETA)< Line 160  Web Document Conformance Checker (BETA)<
160    <d:message xml:lang="en">The <code><var>$0</var></code> element cannot be    <d:message xml:lang="en">The <code><var>$0</var></code> element cannot be
161    inserted between <code>head</code> and <code>body</code> elements.</d:message>    inserted between <code>head</code> and <code>body</code> elements.</d:message>
162    <d:desc xml:lang="en">    <d:desc xml:lang="en">
163      <p>A start tag occurs after the <code>head</code> element is closed      <p>A start tag appears after the <code>head</code> element is closed
164      but before the <code>body</code> element is opened.      but before the <code>body</code> element is opened.
165      The document is non-conforming.</p>      The document is non-conforming.</p>
166    </d:desc>    </d:desc>
167  </d:item>  </d:item>
168    
169    <d:item name="in table"
170        class="parse-error">
171      <d:message xml:lang="en">Tag <code>&lt;<var>$0</var>&gt;</code>
172      is not allowed in <code>table</code>.</d:message>
173      <d:desc xml:lang="en">
174        <p>The start or end tag of an element appears in <code>table</code>.
175        The document is non-conforming.</p>
176    
177        <p>In <code>table</code>, only table related elements
178        are allowed; any other element must be contained in
179        <code>td</code> or <code>th</code> element to form
180        a part of the table, or <code>caption</code> element to create
181        a table caption.</p>
182      </d:desc>
183    </d:item>
184    
185    <d:item name="in table:#character"
186        class="parse-error">
187      <d:message xml:lang="en">Data character is not allowed in
188      <code>table</code>.</d:message>
189      <d:desc xml:lang="en">
190        <p>A data character appears in <code>table</code>.  The document
191        is non-conforming.</p>
192    
193        <p>In <code>table</code>, only table related elements
194        are allowed; any other element and data character must be contained in
195        <code>td</code> or <code>th</code> element to form
196        a part of the table, or <code>caption</code> element to create
197        a table caption.</p>
198      </d:desc>
199    </d:item>
200    
201    <d:item name="missing start tag:tr"
202        class="parse-error">
203      <d:message xml:lang="en">Start tag of <code>tr</code>
204      element is missing.</d:message>
205      <d:desc>
206        <p>Start tag of a <code>tr</code> element, which is <em>not</em>
207        optional, is missing.  The document is non-conforming.</p>
208    
209        <p>In a table section, a <code>&lt;tr></code> start tag
210        must occur before any <code>&lt;td></code> or
211        <code>&lt;th></code> start tag.  Though the HTML5 parser
212        implies the <code>&lt;tr></code> start tag before
213        these start tags, it must be explicitly specified.</p>
214      </d:desc>
215    </d:item>
216    
217  <d:item name="no DOCTYPE"  <d:item name="no DOCTYPE"
218      class="parse-error">      class="parse-error">
219    <d:message xml:lang="en">This document does not start with the    <d:message xml:lang="en">This document does not start with the
220    <code>DOCTYPE</code> declaration.</d:message>    <code>DOCTYPE</code>.</d:message>
221      <d:desc>
222        <p>The document does not start with a <code>DOCTYPE</code>.
223        The document is non-conforming.</p>
224    
225        <p>An HTML document must start by a <code>DOCTYPE</code>:
226          <pre class="html example"><code>&lt;!DOCTYPE HTML></code></pre>
227        </p>
228    
229        <p>Only white space characters and comments are allowed
230        before the <code>DOCTYPE</code>.</p>
231      </d:desc>
232  </d:item>  </d:item>
233    
234  <d:item name="not closed"  <d:item name="not closed"
235      class="parse-error">      class="parse-error">
236    <d:message xml:lang="en">Element <code><var>$0</var></code> is not    <d:message xml:lang="en">Element <code><var>$0</var></code> is not
237    closed.</d:message>    closed.</d:message>
238      <d:desc>
239        <p>End tag of an element is not found before, for example,
240        an end tag of another element appears or
241        the end of the document.  The document is non-conforming.</p>
242      </d:desc>
243  </d:item>  </d:item>
244    
245  <d:item name="not HTML5"  <d:item name="not HTML5"
246      class="parse-error">      class="parse-error">
247    <d:message xml:lang="en">This document is written in an old version of    <d:message xml:lang="en">This document is written in an old version of
248    HTML.</d:message>    HTML.</d:message>
249      <d:desc xml:lang="en">
250        <p>The document contains a <code>DOCTYPE</code> declaration
251        that is different from HTML5 <code>DOCTYPE</code> (i.e. <code>&lt;!DOCTYPE
252        HTML&gt;</code>).  The document is non-conforming.</p>
253    
254        <p>The document might or might not be conformant to
255        some version of HTML.  However, conformance to any HTML
256        specification other than HTML5 provides for no practical
257        convenience, since Web borwsers will parse any
258        HTML document (roughly) as defined in HTML5.</p>
259      </d:desc>
260  </d:item>  </d:item>
261    
262  <d:item name="unmatched end tag"  <d:item name="unmatched end tag"
# Line 93  Web Document Conformance Checker (BETA)< Line 275  Web Document Conformance Checker (BETA)<
275    <d:message xml:lang="en">Data character is not allowed in this    <d:message xml:lang="en">Data character is not allowed in this
276    context.</d:message>    context.</d:message>
277    <d:desc xml:lang="en">    <d:desc xml:lang="en">
278      <p>A data character occurs where it is not allowed in this      <p>A data character appears where it is not allowed in this
279      context.  The document is non-conforming.</p>      context.  The document is non-conforming.</p>
280    
281      <p>Possible causes:      <p>Possible causes:
# Line 126  Web Document Conformance Checker (BETA)< Line 308  Web Document Conformance Checker (BETA)<
308    <d:desc xml:lang="en">    <d:desc xml:lang="en">
309      <p>The content model of the element is so defined that it      <p>The content model of the element is so defined that it
310      must contain a <code><var>$0</var></code> child element.      must contain a <code><var>$0</var></code> child element.
311      Without such an element, the document is non-conforming.</p>      The document is non-conforming.</p>
312    
313      <p>For example:      <p>For example:
314        <ul>        <ul>
# Line 146  Web Document Conformance Checker (BETA)< Line 328  Web Document Conformance Checker (BETA)<
328    or <code>th</code> element as a child of this element.</d:message>    or <code>th</code> element as a child of this element.</d:message>
329    <d:desc xml:lang="en">    <d:desc xml:lang="en">
330      <p>The <code>tr</code> element must contain at least one      <p>The <code>tr</code> element must contain at least one
331      <code>td</code> or <code>th</code> child element.  Without      <code>td</code> or <code>th</code> child element.  The document
332      such an element, the document is non-conforming.</p>      is non-conforming.</p>
333    </d:desc>    </d:desc>
334  </d:item>  </d:item>
335    
# Line 156  Web Document Conformance Checker (BETA)< Line 338  Web Document Conformance Checker (BETA)<
338    <d:message xml:lang="en">This element is not allowed in this    <d:message xml:lang="en">This element is not allowed in this
339    context.</d:message>    context.</d:message>
340    <d:desc xml:lang="en">    <d:desc xml:lang="en">
341      <p>An element occurs where it is not allowed.  The document      <p>An element appears where it is not allowed.  The document
342      is non-conforming.</p>      is non-conforming.</p>
343    
344        <p><strong>Note</strong>: The conformance checker does
345        <em>not</em> support form elements yet.</p>
346    
347      <p>Possible causes:      <p>Possible causes:
348        <dl>        <dl>
349        <dt>If the erred element is an inline-level element (such        <dt>If the erred element is an inline-level element (such
# Line 189  Web Document Conformance Checker (BETA)< Line 374  Web Document Conformance Checker (BETA)<
374    
375  </section>  </section>
376    
377    <section id="attribute-errors">
378    <h2>Attribute Errors</h2>
379    
380    <d:item name="attribute missing"
381        class="attribute-error">
382      <d:message xml:lang="en">Required attribute <code><var>$0</var></code>
383      is not specified.</d:message>
384      <d:desc>
385        <p>A required attribute is not specified.  The document
386        is non-conforming.</p>
387    
388        <p>Some attribute is defined as <i>required</i>.
389        For example, any <code>img</code> element must have
390        <code>alt</code> and <code>src</code> attributes specified.
391        Without required attributes specified, user agents
392        cannot provide the full functionality of the element
393        to the user.</p>
394      </d:desc>
395    </d:item>
396    
397    <d:item name="in HTML:xml:lang"
398        class="attribute-error">
399      <d:message xml:lang="en">The <code>xml:lang</code> attribute is not
400      allowed in HTML document.</d:message>
401      <d:desc>
402        <p>The <code>xml:lang</code> attribute is not allowed in
403        HTML document.  The document is non-conforming.</p>
404    
405        <p>The <code>xml:lang</code> attribute in <code>null</code>
406        namespace for HTML elements is defined as conforming only for
407        XML document.</p>
408    
409        <p>To specify natural language information in HTML document,
410        use <code>lang</code> attribute instead.</p>
411        <!-- @@ ISSUE: xml:lang in non-HTML element in DOM5 HTML created
412             from an HTML document? -->
413      </d:desc>
414    </d:item>
415    
416    <d:item name="in XML:charset"
417        class="attribute-error">
418      <d:message xml:lang="en">The <code>charset</code> attribute is not
419      allowed in XML document.</d:message>
420      <d:desc>
421        <p>The <code>charset</code> attribute of a
422        <code>meta</code> element is not allowed in XML document.
423        The document is non-conforming.</p>
424    
425        <p>To specify the character encoding used for serialization,
426        if necessary, use XML declaration instead:
427          <pre class="xml example"><code>&lt;?xml version="1.0" encoding="<var>encoding-name</var>"?></code></pre>
428        </p>
429      </d:desc>
430    </d:item>
431    
432    <d:item name="in XML:lang"
433        class="attribute-error">
434      <d:message xml:lang="en">The <code>lang</code> attribute is not
435      allowed in XML document.</d:message>
436      <d:desc>
437        <p>The HTML <code>lang</code> attribute is not allowed in
438        XML document.  The document is non-conforming.</p>
439    
440        <p>The <code>lang</code> attribute in <code>null</code>
441        namespace for HTML elements is defined as conforming only for
442        HTML document.</p>
443    
444        <p>To specify natural language information in XML document,
445        use <code>xml:lang</code> attribute instead.</p>
446      </d:desc>
447    </d:item>
448    
449    <d:item name="in XML:xmlns"
450        class="attribute-error">
451      <d:message xml:lang="en">The <code>xmlns</code> attribute
452      in the <code>null</code> namespace is not allowed in
453      XHTML document.  The document is non-conforming.</d:message>
454      <d:desc>
455        <p>The <code>xmlns</code> attribute in the <code>null</code>
456        namespace is not allowed in XHTML document.</p>
457    
458        <p>This error should not occur in conformance-checking
459        static documents.</p>
460      </d:desc>
461    </d:item>
462    
463    </section>
464    
465  <section id="attribute-value-errors">  <section id="attribute-value-errors">
466  <h2>Attribute Value Errors</h2>  <h2>Attribute Value Errors</h2>
467    
468  <d:item name="enumerated:invalid"  <d:item name="enumerated:invalid"
469      class="attribute-error">      class="attribute-value-error">
470    <d:message xml:lang="en">This attribute only allow a limited set of    <d:message xml:lang="en">This attribute only allow a limited set of
471    values and the specified value is not one of them.</d:message>    values and the specified value is not one of them.</d:message>
472  </d:item>  </d:item>
473    
474    <d:item name="duplicate ID"
475        class="attribute-value-error">
476      <d:message xml:lang="en">This identifier has already been
477      assigned to another element.</d:message>
478      <!-- @@ <id=a xml:id=a>? -->
479    </d:item>
480    
481    <d:item name="reserved browsing context name"
482        class="attribute-value-error">
483      <d:message xml:lang="en">This browsing context name is reserved.</d:message>
484      <d:item>
485        <p>The specified browsing context name is reserved.
486        The document is non-conforming.</p>
487    
488        <p>Names of browsing contexts starting with <code>_</code>
489        (<code>U+005F</code> <code class="charname">LOW LINE</code>)
490        are reserved so that it must not be used.</p>
491    
492        <p>Old version of HTML, non-HTML markup languages, and
493        Web browsers define or implements special reserved
494        browsing context names <code>_blank</code>,
495        <code>_main</code>, and <code>_replace</code>.
496        However, they are <em>not</em> conforming attribute values.</p>
497      </d:item>
498    </d:item>
499    
500  </section>  </section>
501    
502  <section id="table-model-errors">  <section id="table-model-errors">
503  <h2>Table Model Errors</h2>  <h2>Table Model Errors</h2>
504    
505    <d:item name="table:colspan creates column with no anchored cell"
506        class="table-model-error">
507      <d:message xml:lang="en">This <code>colspan</code> attribute
508      results in creating a table column that does not contain
509      any cell anchored to it.</d:message>
510    </d:item>
511    
512  <d:item name="table:no cell in last row"  <d:item name="table:no cell in last row"
513      class="table-model-error">      class="table-model-error">
514    <d:message xml:lang="en">The table has no cell (<code>td</code> or    <d:message xml:lang="en">The table has no cell (<code>td</code> or
# Line 243  Web Document Conformance Checker (BETA)< Line 549  Web Document Conformance Checker (BETA)<
549    
550  </section>  </section>
551    
552  <section id="uri-errors">  <section id="uri-warnings">
553  <h2>URI (or IRI) Errors</h2>  <h2>URI (or IRI) Warnings</h2>
554    
555    <d:item name="URI::dot-segment"
556        class="should" level="s">
557      <d:message xml:lang="en">Dot-segment (<code>.</code> or
558      <code>..</code>) should not occur in an absolute reference.</d:message>
559      <d:desc>
560        <p>Dot-segment (<code>.</code> or <code>..</code>) should
561        not occur in an absolute reference.</p>
562    
563        <p>In relative references, dot-segments are used to represent
564        the current (<code>.</code>) or the parent (<code>..</code>)
565        hierarchy of the path.  Though they are also allowed
566        in absolute references, it should be resolved to the
567        canonical form before it has been published.</p>
568      </d:desc>
569    </d:item>
570    
571  <d:item name="URI::empty path"  <d:item name="URI::empty path"
572      class="should" level="s">      class="should" level="s">

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24