53 |
is not part of any reference appears in the input stream. |
is not part of any reference appears in the input stream. |
54 |
The document is non-conforming.</p> |
The document is non-conforming.</p> |
55 |
|
|
56 |
|
<p><strong>Any <code>&</code> character in URI (or IRI) |
57 |
|
must be escaped as <code>&amp;</code>.</strong></p> |
58 |
|
|
59 |
<p>The <code>&</code> character must |
<p>The <code>&</code> character must |
60 |
be the first character of a reference: |
be the first character of a reference: |
61 |
<dl> |
<dl> |
175 |
</d:desc> |
</d:desc> |
176 |
</d:item> |
</d:item> |
177 |
|
|
178 |
|
<d:item name="bogus comment" |
179 |
|
class="tokenize-error"> |
180 |
|
<d:message xml:lang="en">String <code><!</code> is not followed |
181 |
|
by <code>--</code>.</d:message> |
182 |
|
<d:desc xml:lang="en"> |
183 |
|
<p>There is a <code><</code> (<code>U+003C</code> |
184 |
|
<code class="charname">LESS-THAN SIGN</code>) character |
185 |
|
followed by a <code>!</code> (<code>U+0021</code> |
186 |
|
<code class="charname">EXCLAMATION MARK</code>) character, |
187 |
|
which is not followed by a <code>--</code> or |
188 |
|
<code>!DOCTYPE</code>. The document is non-conforming.</p> |
189 |
|
|
190 |
|
<dl class="switch"> |
191 |
|
<dt>Comments</dt> |
192 |
|
<dd>In HTML documents, comments must be introduced by |
193 |
|
<code><!--</code> (<code><!</code> <em>immediately</em> followed |
194 |
|
by <em>two</em> <code>-</code>s) and must be terminated by |
195 |
|
<code>--></code>. Strings <code><!</code> not followed |
196 |
|
by <code>--</code> and <code><!-</code> not followed by |
197 |
|
<code>-</code> are not valid open delimiters for comments.</dd> |
198 |
|
<dt>Marked sections, including <code>CDATA</code> sections</dt> |
199 |
|
<dd>Marked sections are not allowed in HTML documents.</dd> |
200 |
|
<dt>Markup declarations</dt> |
201 |
|
<dd>Markup declarations, except <code>DOCTYPE</code> |
202 |
|
and comment declarations, are not allowed in HTML documents.</dd> |
203 |
|
<dt>String <code><!</code></dt> |
204 |
|
<dd>String <code><!</code> must be escaped as |
205 |
|
<code>&lt;!</code>.</dd> |
206 |
|
</dl> |
207 |
|
</d:desc> |
208 |
|
</d:item> |
209 |
|
|
210 |
<d:item name="bogus end tag" |
<d:item name="bogus end tag" |
211 |
class="tokenize-error"> |
class="tokenize-error"> |
212 |
<d:message xml:lang="en">A <code></</code> string is not followed |
<d:message xml:lang="en">String <code></</code> is not followed |
213 |
by a tag name.</d:message><!-- </ non-name-start-char-non-EOF --> |
by tag name.</d:message><!-- </ non-name-start-char-non-EOF --> |
214 |
<d:desc xml:lang="en"> |
<d:desc xml:lang="en"> |
215 |
<p>There is a <code><</code> (<code>U+003C</code> |
<p>There is a <code><</code> (<code>U+003C</code> |
216 |
<code class="charname">LESS-THAN SIGN</code>) character |
<code class="charname">LESS-THAN SIGN</code>) character |
273 |
<code>embed</code>, <code>param</code>, <code>area</code>, |
<code>embed</code>, <code>param</code>, <code>area</code>, |
274 |
<code>col</code>, and <code>input</code> elements.</p> |
<code>col</code>, and <code>input</code> elements.</p> |
275 |
|
|
276 |
|
<dl> |
277 |
|
<dt><code><script/></code></dt> |
278 |
|
<dd><p>The void element syntax cannot be used for <code>script</code> |
279 |
|
element. Even for an empty <code>script</code> element, |
280 |
|
there must be an explicit end tag <code></script></code>.</p> |
281 |
|
|
282 |
|
<p><strong>NOTE</strong>: Though some user agents interpret |
283 |
|
void element syntax for <code>script</code> element as the |
284 |
|
closing of the element, such usage is not allowed under |
285 |
|
the current standard.</p></dd> |
286 |
|
<dt><code><basefont/></code>, <code><bgsound/></code>, |
287 |
|
<code><frame/></code>, <code><keygen/></code>, |
288 |
|
<code><spacer/></code>, <code><wbr/></code></dt> |
289 |
|
<dd>These elements are themselves non-conforming.</dd> |
290 |
|
<!-- isindex, image --> |
291 |
|
<dt><code><command/></code>, <code><event-source/></code>, |
292 |
|
<code><source/></code></dt> |
293 |
|
<dd>Future revision of HTML5 parsing algorithm is expected |
294 |
|
to allow void element syntax for these elements.</dd> |
295 |
|
<dt><code><a/></code>, <code><p/></code></dt> |
296 |
|
<dd>These elements are not always empty and therefore |
297 |
|
void element syntax is not allowed.</dd> |
298 |
|
</dl> |
299 |
|
|
300 |
<p>Note that, unlike in XML, the void element syntax has |
<p>Note that, unlike in XML, the void element syntax has |
301 |
no effect in HTML.</p> |
no effect in HTML.</p> |
302 |
</d:desc> |
</d:desc> |
306 |
<d:item name="pio" |
<d:item name="pio" |
307 |
class="tokenize-error"> |
class="tokenize-error"> |
308 |
<d:message xml:lang="en">Processing instruction |
<d:message xml:lang="en">Processing instruction |
309 |
(<code><?<var>...</var>?></code>) cannot be used.</d:message> |
(<code><?<var>...</var>></code>) cannot be used.</d:message> |
310 |
<d:desc xml:lang="en"> |
<d:desc xml:lang="en"> |
311 |
<p>Processing instructions (<code><?<var>...</var>?></code>), |
<p>Processing instructions (<code><?<var>...</var>?></code>), |
312 |
including XML declaration (<code><?xml <var>...</var>?></code>) |
including XML declaration (<code><?xml <var>...</var>?></code>) |
313 |
and XML style sheet <abbr title="processing instruction">PI</abbr> |
and XML style sheet <abbr title="processing instruction">PI</abbr> |
314 |
(<code><xml-stylesheet <var>...</var>?></code>), are not allowed |
(<code><?xml-stylesheet <var>...</var>?></code>), are not allowed |
315 |
in the HTML syntax. The document is non-conforming.</p> |
in the HTML syntax. The document is non-conforming.</p> |
316 |
|
|
317 |
<p>If it is necessary to embed a processing instruction |
<dl> |
318 |
in the HTML document, you must use the XML syntax instead.</p> |
<dt><code><?xml?></code> (XML declaration)</dt> |
319 |
|
<dd>XML declaration is unnecessary for HTML documents.</dd> |
320 |
<p>In the HTML syntax, XML declaration is not necessary.</p> |
<dt><code><?xml-stylesheet?></code> (XML style sheet |
321 |
|
<abbr title="processing instruction">PI</abbr></dt> |
322 |
<p>Instead of XML style sheet, |
<dd>Use HTML <code>link</code> element with <code>rel</code> |
323 |
<abbr title="processing instruction">PI</abbr>s, you must |
attribute set to <code>stylesheet</code> (or, |
324 |
use the HTML <code>link</code> element whose <code>rel</code> |
<code>alternate stylesheet</code> for an alternate style |
325 |
attribute is set to <code>stylesheet</code> (or |
sheet).</dd> |
326 |
<code>alternate stylesheet</code> for an aleternate style sheet).</p> |
<dt><code><?php?></code> (PHP code)</dt> |
327 |
|
<dd>The conformance checker does <em>not</em> support |
328 |
|
checking for PHP source documents.</dd> |
329 |
|
<dt>Other processing instructions</dt> |
330 |
|
<dd>Processing instructions cannot be inserted in an HTML |
331 |
|
document. Use XML document or insert |
332 |
|
<code>ProcessingInstruction</code> node by scripting.</dd> |
333 |
|
</dl> |
334 |
|
|
335 |
<p>Web browsers will parse processing instructions as bogus |
<p>Web browsers will parse processing instructions as bogus |
336 |
comments. Some legacy Web browsers, such as IE:mac and |
comments. Some legacy Web browsers, such as IE:mac and |
337 |
some mobile browsers, will display processing instructions |
some mobile Web browsers, will display processing instructions |
338 |
as string.</p> |
as string.</p> |
339 |
</d:desc> |
</d:desc> |
340 |
</d:item> |
</d:item> |
384 |
<d:item name="in body" |
<d:item name="in body" |
385 |
class="parse-error"> |
class="parse-error"> |
386 |
<d:message xml:lang="en">Tag <code><<var>$0</var>></code> |
<d:message xml:lang="en">Tag <code><<var>$0</var>></code> |
387 |
is not allowed in a <code>body</code> element.</d:message> |
is not allowed in the <code>body</code> element.</d:message> |
388 |
<d:desc xml:lang="en"> |
<d:desc xml:lang="en"> |
389 |
<p>The start or end tag of an element, which |
<p>The start or end tag of an element, which |
390 |
cannot be a descendant of <code>body</code> element, appears |
cannot be a descendant of <code>body</code> element, appears |
395 |
|
|
396 |
<d:item name="in head:head" |
<d:item name="in head:head" |
397 |
class="parse-error"> |
class="parse-error"> |
398 |
<d:message xml:lang="en">Start tag <code><<var>head</var>></code> |
<d:message xml:lang="en">Start tag <code><head></code> |
399 |
is not allowed in the <code>head</code> element.</d:message> |
is not allowed in the <code>head</code> element.</d:message> |
400 |
<d:desc xml:lang="en"> |
<d:desc xml:lang="en"> |
401 |
<p>There is a start tag <code><head></code> in the |
<p>There is a start tag <code><head></code> in the |
605 |
<p>An element appears where it is not allowed. The document |
<p>An element appears where it is not allowed. The document |
606 |
is non-conforming.</p> |
is non-conforming.</p> |
607 |
|
|
|
<p><strong>Note</strong>: The conformance checker does |
|
|
<em>not</em> support form elements yet.</p> |
|
|
|
|
608 |
<p>Possible causes: |
<p>Possible causes: |
609 |
<dl class="switch"> |
<dl class="switch"> |
610 |
<dt>If the element with the error is an inline-level element, |
<dt>If the element with the error is an inline-level element, |
615 |
|
|
616 |
<p>Any inline-level content must be put |
<p>Any inline-level content must be put |
617 |
in e.g. paragraph element such as <code>p</code>.</p></dd> |
in e.g. paragraph element such as <code>p</code>.</p></dd> |
618 |
<dt>If the element with the error is a block-level element, |
<dt>If it is a block-level elements, such as <code>aside</code>, |
619 |
such as <code>div</code>, <code>h<var>n</var></code>, or |
<code>div</code>, <code>h<var>n</var></code>, |
620 |
<code>section</code></dt> |
<code>p</code>, or <code>section</code></dt> |
621 |
<dd><p>Though some elements such as <code>div</code>, |
<dd><dl class="switch"> |
622 |
<code>li</code>, and <code>td</code> allow |
<dt>If the parent element is <code>div</code>, |
623 |
<em>either one</em> of block-level or inline-level content |
<code>li</code>, <code>td</code>, or <code>th</code></dt> |
624 |
is allowed. If there is a block-level content, |
<!-- @@ TODO: more... --> |
625 |
any inline-level content must be put |
<!-- @@ TODO: <p><ul><li><p> --> |
626 |
in e.g. paragraph element such as <code>p</code>.</p></dd> |
<dd><p>The parent element allows <em>either</em> |
627 |
|
block-level or inline-level content. If there is a |
628 |
|
block-level content, any inline-level content must be |
629 |
|
put in e.g. paragraph element such as <code>p</code>.</p> |
630 |
|
<p>For example, an HTML document fragment |
631 |
|
<code class="bad example"><div><p>Hello!</p> World!</div></code> |
632 |
|
is non-conforming, since a word <q>World!</q> does not belong |
633 |
|
to any paragraph. (If not part of any paragraph, what is |
634 |
|
it!?) A conforming example would be: |
635 |
|
<pre class="example"><code><div><p>Hello!</p> <p>World!</p></div></code></pre> |
636 |
|
</p></dd> |
637 |
|
<dt>If the parent element does <em>not</em> allow |
638 |
|
block-level elements as content</dt> |
639 |
|
<dd>The element is not allowed to be inserted here. |
640 |
|
For example, a <code>div</code> element cannot be |
641 |
|
a child of an <code>h1</code> element.</dd> |
642 |
|
</dl></dd> |
643 |
<dt>If the element with the error is a <code>noscript</code> element</dt> |
<dt>If the element with the error is a <code>noscript</code> element</dt> |
644 |
<dd>The <code>noscript</code> element is allowed only in the context |
<dd>The <code>noscript</code> element is allowed only in the context |
645 |
where a block-level or inline-level content is expected |
where a block-level or inline-level content is expected |
656 |
<code>center</code>, or <code>marquee</code> element</dt> |
<code>center</code>, or <code>marquee</code> element</dt> |
657 |
<dd>These elements are not part of the HTML standard. |
<dd>These elements are not part of the HTML standard. |
658 |
Use CSS for styling control.</dd> |
Use CSS for styling control.</dd> |
659 |
|
|
660 |
|
<dt><code>button</code>, <code>datalist</code>, <code>form</code>, |
661 |
|
<code>input</code>, <code>label</code>, |
662 |
|
<code>optgroup</code>, <code>option</code>, <code>output</code>, |
663 |
|
<code>rb</code>, <code>rp</code>, <code>rt</code>, <code>ruby</code>, |
664 |
|
<code>textarea</code>, or <code>textarea</code> element</dt> |
665 |
|
<!-- rbc, rtc ? --> |
666 |
|
<dd>These elements are intentionally not supported by the conformance |
667 |
|
checker <em>yet</em>.</dd> |
668 |
</dl> |
</dl> |
669 |
</p> |
</p> |
670 |
</d:desc> |
</d:desc> |
697 |
is non-conforming.</p> |
is non-conforming.</p> |
698 |
|
|
699 |
<p>Some attribute is defined as <i>required</i>. |
<p>Some attribute is defined as <i>required</i>. |
|
For example, any <code>img</code> element must have |
|
|
<code>alt</code> and <code>src</code> attributes specified. |
|
700 |
Without required attributes specified, user agents |
Without required attributes specified, user agents |
701 |
cannot provide the full functionality of the element |
cannot provide full functionality of the element to the user.</p> |
702 |
to the user.</p> |
|
703 |
|
<dl class="switch"> |
704 |
|
<dt>HTML <code>img</code> element</dt> |
705 |
|
<dd>The <code>src</code> attribute must be specified. |
706 |
|
Additionally, the <code>alt</code> attribute must be specified |
707 |
|
in many cases.</dd> |
708 |
|
<dt>HTML <code>link</code> element</dt> |
709 |
|
<dd>The <code>rel</code> attribute must be specified. |
710 |
|
Note that the <code>rev</code> attribute is obsolete.</dd> |
711 |
|
</dl> |
712 |
</d:desc> |
</d:desc> |
713 |
</d:item> |
</d:item> |
714 |
|
|
737 |
<p>The <code>xml:lang</code> attribute is not allowed in |
<p>The <code>xml:lang</code> attribute is not allowed in |
738 |
HTML document. The document is non-conforming.</p> |
HTML document. The document is non-conforming.</p> |
739 |
|
|
740 |
<p>The <code>lang</code> attribute in the <code>null</code> |
<p>Use of the <code>xml:lang</code> attribute is conforming |
741 |
namespace for HTML elements is defined as conforming <em>only</em> for |
<em>only</em> in XML documents.</p> |
|
XML document.</p> |
|
742 |
|
|
743 |
<p>To specify natural language information in HTML document, |
<p>To specify natural language information in HTML document, |
744 |
use <code>lang</code> attribute instead.</p> |
use <code>lang</code> attribute instead.</p> |
779 |
XML document. The document is non-conforming.</p> |
XML document. The document is non-conforming.</p> |
780 |
|
|
781 |
<p>The <code>lang</code> attribute in <code>null</code> |
<p>The <code>lang</code> attribute in <code>null</code> |
782 |
namespace for HTML elements is defined as conforming <em>only</em> for |
namespace for HTML elements is conforming <em>only</em> in |
783 |
HTML document.</p> |
HTML documents.</p> |
784 |
|
|
785 |
<p>To specify natural language information in XML document, |
<p>To specify natural language information in XML document, |
786 |
use <code>xml:lang</code> attribute instead.</p> |
use <code>xml:lang</code> attribute instead.</p> |
962 |
<tr><td rowspan=2></td></tr> |
<tr><td rowspan=2></td></tr> |
963 |
</tbody> |
</tbody> |
964 |
</table></code></pre> |
</table></code></pre> |
965 |
... is non-conforming, since the second row contains only |
... since the second row contains only |
966 |
a cell that spans the first and the second rows.</p> |
a cell that spans between first and second rows.</p> |
967 |
</d:desc> |
</d:desc> |
968 |
</d:item> |
</d:item> |
969 |
|
|
1017 |
|
|
1018 |
</section> |
</section> |
1019 |
|
|
1020 |
<section id="uri-warnings"> |
<section id="uri-shoulds"> |
1021 |
<h2>URI (or IRI) Warnings</h2> |
<h2>URI (or IRI) Should-level Errors</h2> |
1022 |
|
|
1023 |
<d:item name="URI::dot-segment" |
<d:item name="URI::dot-segment" |
1024 |
class="should" level="s"> |
class="should" level="s"> |
1025 |
<d:message xml:lang="en">Dot-segment (<code>.</code> or |
<d:message xml:lang="en">A dot-segment (<code>.</code> or |
1026 |
<code>..</code>) should not occur in an absolute reference.</d:message> |
<code>..</code>) occurs in an absolute reference.</d:message> |
1027 |
<d:desc> |
<d:desc> |
1028 |
<p>Dot-segment (<code>.</code> or <code>..</code>) should |
<p>Dot-segment (<code>.</code> or <code>..</code>) should |
1029 |
not occur in an absolute reference.</p> |
not occur in an absolute reference.</p> |
1038 |
|
|
1039 |
<d:item name="URI::empty path" |
<d:item name="URI::empty path" |
1040 |
class="should" level="s"> |
class="should" level="s"> |
1041 |
<d:message xml:lang="en">This IRI should explicitly end with |
<d:message xml:lang="en">This IRI does not end with |
1042 |
<code>/</code>.</d:message> |
a <code>/</code>.</d:message> |
1043 |
</d:item> |
</d:item> |
1044 |
|
|
1045 |
<d:item name="URI::lowercase hexadecimal digit" |
<d:item name="URI::lowercase hexadecimal digit" |
1046 |
class="should" level="s"> |
class="should" level="s"> |
1047 |
<d:message xml:lang="en">Hexadecimal digit in percent-encoding |
<d:message xml:lang="en">A lowercase hexadecimal digit is used |
1048 |
should be in lowercase.</d:message> |
in percent-encoding.</d:message> |
1049 |
<d:desc xml:lang="en"> |
<d:desc xml:lang="en"> |
1050 |
<p>The hexadecimal digit in percent-encoding string in the IRI |
<p>The hexadecimal digit in percent-encoding string in the IRI |
1051 |
is in lowercase. Though the IRI <em>is</em> conforming, |
is in lowercase. Though the IRI <em>is</em> conforming, |
1089 |
<section id="unsupported-messages"> |
<section id="unsupported-messages"> |
1090 |
<h2><i>Unsupported</i> Messages</h2> |
<h2><i>Unsupported</i> Messages</h2> |
1091 |
|
|
1092 |
<d:item name="attribute" |
<d:item name="element" |
1093 |
class="unsupported" level="unsupported"> |
class="unsupported" level="unsupported"> |
1094 |
<d:message xml:lang="en">This attribute is not supported by the |
<d:message xml:lang="en">Conformance checking for element |
1095 |
conformance checker; <em>it might or might not be conforming</em>.</d:message> |
<code><var>{local-name}</var></code> is not supported; <em>it might or |
1096 |
|
might not be conforming</em>.</d:message> |
1097 |
<d:desc xml:lang="en"> |
<d:desc xml:lang="en"> |
1098 |
<p>The conformant checker does not support the attribute. |
<p>The conformant checker does not support the element. |
1099 |
It cannot determine whether the document is conforming or not.</p> |
It cannot determine whether the document is conforming or not.</p> |
1100 |
</d:desc> |
</d:desc> |
1101 |
</d:item> |
</d:item> |
1102 |
|
|
1103 |
<d:item name="element" |
<d:item name="attribute" |
1104 |
class="unsupported" level="unsupported"> |
class="unsupported" level="unsupported"> |
1105 |
<d:message xml:lang="en">This element is not supported by the |
<d:message xml:lang="en">Conformance checking for attribute |
1106 |
conformance checker; <em>it might or might not be conforming</em>.</d:message> |
<code><var>{local-name}</var></code> of element |
1107 |
|
<code><var>{element-local-name}</var></code> is not supported; |
1108 |
|
<em>it might or might not be conforming</em>.</d:message> |
1109 |
<d:desc xml:lang="en"> |
<d:desc xml:lang="en"> |
1110 |
<p>The conformant checker does not support the element. |
<p>The conformant checker does not support the attribute. |
1111 |
It cannot determine whether the document is conforming or not.</p> |
It cannot determine whether the document is conforming or not.</p> |
1112 |
</d:desc> |
</d:desc> |
1113 |
</d:item> |
</d:item> |
1114 |
|
|
1115 |
<d:item name="link type" |
<d:item name="link type" |
1116 |
class="unsupported" level="unsupported"> |
class="unsupported" level="unsupported"> |
1117 |
<d:message xml:lang="en">The link type <code><var>$0</var></code> is not |
<d:message xml:lang="en">Link type <code><var>$0</var></code> is not |
1118 |
standardized or registered at the time of the release of the conformance |
standardized or registered at the time of the release of the conformance |
1119 |
checker; <em>it is non-conforming unless it has now been |
checker; <em>it is non-conforming unless it now has been |
1120 |
registered</em>.</d:message> |
registered</em>.</d:message> |
1121 |
<d:desc xml:lang="en"> |
<d:desc xml:lang="en"> |
1122 |
<p>The <code>rel</code> attribute is defined as a list of link types. |
<p>The <code>rel</code> attribute is defined as a list of link types. |
1184 |
<section id="license"> |
<section id="license"> |
1185 |
<h2>License of This Document</h2> |
<h2>License of This Document</h2> |
1186 |
|
|
1187 |
<p>Copyright 2007 <a href="http://suika.fam.cx/~wakaba/who?">Wakaba</a></p> |
<p>Copyright 2007 <a href="http://suika.fam.cx/~wakaba/who?" rel="author" xml:lang="ja">Wakaba</a></p> |
1188 |
<p>This library is free software; you can redistribute it |
<p>This document is free software; you can redistribute it |
1189 |
and/or modify it under the same terms as Perl itself.</p> |
and/or modify it under the same terms as Perl itself.</p> |
1190 |
</section> |
</section> |
1191 |
|
|