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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.24 - (hide annotations) (download) (as text)
Mon Jul 21 12:56:34 2008 UTC (18 years, 3 months ago) by wakaba
Branch: MAIN
Changes since 1.23: +267 -9 lines
File MIME type: text/xml
++ ChangeLog	21 Jul 2008 12:51:50 -0000
	* .htaccess: error-description-source.xml is in UTF-8
	actually.

	* Makefile: Rule to make Japanese language catalog file
	is added.

	* cc-script.js: Line and column numbers are now taken
	from data-* attributes, not from textContent.

	* cc.cgi: Tentative support for Japanese/English conneg.
	(load_text_catalog, get_text): Removed (catalog text selection
	is now handled by WebHACC::Output).

	* error-description-source.xml: Catalog entries in new
	format are added.  Old catalog element is removed.

	* mkcatalog.pl: Support for non-English languages.
	Drop support for old catalog element.  Add support
	for new cat element.

	* mkdescription.pl: Drop support for old catalog element.
	Add support for new cat element.

2008-07-21  Wakaba  <wakaba@suika.fam.cx>

++ html/WebHACC/Language/ChangeLog	21 Jul 2008 12:56:30 -0000
	* DOM.pm (generate_structure_dump_section): Use catalog
	for human-readable texts.
	(generate_table_section): Use catalog for human readable texts.

2008-07-21  Wakaba  <wakaba@suika.fam.cx>

++ html/WebHACC/ChangeLog	21 Jul 2008 12:55:41 -0000
	* Input.pm: Most human-readable texts are now handled by
	catalog.
	(id_prefix): Support for nested subdocuments.

	* Output.pm (start_section, dt, xref): Section/item names and
	link labels are now handled by catalog.
	(load_text_catalog, nl_text): New methods.
	(html_header): Application name is moved to catalog.

	* Result.pm (add_error): Important error properties are
	now exposed to client-side script as data-* attributes.
	Labels are now handled by catalog.  Error descriptions
	are now taken from catalog as it were.

2008-07-21  Wakaba  <wakaba@suika.fam.cx>

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