[html5] r1267 - /
whatwg at whatwg.org
whatwg at whatwg.org
Wed Feb 27 13:55:35 PST 2008
Author: ianh
Date: 2008-02-27 13:55:34 -0800 (Wed, 27 Feb 2008)
New Revision: 1267
Modified:
index
source
Log:
[c] (1) Clarify requirements for character encoding declarations
Modified: index
===================================================================
--- index 2008-02-27 21:31:36 UTC (rev 1266)
+++ index 2008-02-27 21:55:34 UTC (rev 1267)
@@ -7336,21 +7336,21 @@
<dd>If the <code title=attr-meta-charset><a
href="#charset0">charset</a></code> attribute is present, or if the
element is in the <a href="#encoding"
- title=attr-meta-http-equiv-content-type>Content-Type state</a>: as the
- first element in a <code><a href="#head">head</a></code> element.
+ title=attr-meta-http-equiv-content-type>Encoding declaraton state</a>: as
+ the first element in a <code><a href="#head">head</a></code> element.
<dd>If the <code title=attr-meta-http-equiv><a
href="#http-equiv0">http-equiv</a></code> attribute is present, and the
element is not in the <a href="#encoding"
- title=attr-meta-http-equiv-content-type>Content-Type state</a>: in a
- <code><a href="#head">head</a></code> element.
+ title=attr-meta-http-equiv-content-type>Encoding declaraton state</a>: in
+ a <code><a href="#head">head</a></code> element.
<dd>If the <code title=attr-meta-http-equiv><a
href="#http-equiv0">http-equiv</a></code> attribute is present, and the
element is not in the <a href="#encoding"
- title=attr-meta-http-equiv-content-type>Content-Type state</a>: in a
- <code><a href="#noscript">noscript</a></code> element that is a child of
- a <code><a href="#head">head</a></code> element.
+ title=attr-meta-http-equiv-content-type>Encoding declaraton state</a>: in
+ a <code><a href="#noscript">noscript</a></code> element that is a child
+ of a <code><a href="#head">head</a></code> element.
<dd>If the <code title=attr-meta-name><a href="#name">name</a></code>
attribute is present: where <a href="#metadata0">metadata content</a> is
@@ -7678,19 +7678,19 @@
<dl>
<dt><dfn id=encoding title=attr-meta-http-equiv-content-type>Encoding
- declaration</dfn>
+ declaration state</dfn>
<dd>
<p>The <a href="#encoding"
- title=attr-meta-http-equiv-content-type>Content-Type state's</a>
- requirements are all handled by the parsing section of the
+ title=attr-meta-http-equiv-content-type>Encoding declaration state's</a>
+ user agent requirements are all handled by the parsing section of the
specification. The state is just an alternative form of setting the
<code title=meta-charset>charset</code> attribute: it is <a
href="#charset">a character encoding declaration</a>.</p>
<p>For <code><a href="#meta0">meta</a></code> elements in the <a
- href="#encoding" title=attr-meta-http-equiv-content-type>Content-Type
- state</a>, the <code title=attr-meta-content><a
+ href="#encoding" title=attr-meta-http-equiv-content-type>Encoding
+ declaraton state</a>, the <code title=attr-meta-content><a
href="#content0">content</a></code> attribute must have a value
consisting of the literal string "<code title="">text/html;</code>",
optionally followed by a single U+0020 SPACE character, followed by the
@@ -7700,18 +7700,18 @@
<p>If the document contains a <code><a href="#meta0">meta</a></code>
element in the <a href="#encoding"
- title=attr-meta-http-equiv-content-type>Content-Type state</a> then that
- element must be the first element in the document's <code><a
+ title=attr-meta-http-equiv-content-type>Encoding declaraton state</a>
+ then that element must be the first element in the document's <code><a
href="#head">head</a></code> element, and the document must not contain
a <code><a href="#meta0">meta</a></code> element with the <code
title=attr-meta-charset><a href="#charset0">charset</a></code> attribute
present.</p>
<p>The <a href="#encoding"
- title=attr-meta-http-equiv-content-type>Content-Type state</a> may be
- used in <a href="#html5" title=HTML5>HTML documents</a> only, elements
- in that state must not be used in <a href="#xhtml5" title=XHTML>XML
- documents</a>.</p>
+ title=attr-meta-http-equiv-content-type>Encoding declaraton state</a>
+ may be used in <a href="#html5" title=HTML5>HTML documents</a> only,
+ elements in that state must not be used in <a href="#xhtml5"
+ title=XHTML>XML documents</a>.</p>
<dt><dfn id=default title=attr-meta-http-equiv-default-style>Default style
state</dfn>
@@ -7889,7 +7889,8 @@
provide UAs with character encoding information for <a href="#html5"
title=HTML5>HTML</a> files, by setting the <dfn id=charset0
title=attr-meta-charset><code>charset</code></dfn> attribute to the name
- of a character encoding. This is called a character encoding declaration.
+ of a character encoding. This is called a character encoding declaration.</p>
+ <!-- XXX maybe the rest should move to "writing html" section -->
<p>The following restrictions apply to character encoding declarations:
@@ -7905,7 +7906,6 @@
<li>The attribute value must be serialised without the use of character
entity references of any kind.
</ul>
- <!-- XXX next three paragraphs maybe should move to "writing html" section -->
<p>If the document does not start with a BOM, and if its encoding is not
explicitly given by <a href="#content-type8"
@@ -7919,7 +7919,9 @@
and, in addition, if that encoding isn't US-ASCII itself, then the
encoding must be specified using a <code><a href="#meta0">meta</a></code>
element with a <code title=attr-meta-charset><a
- href="#charset0">charset</a></code> attribute.
+ href="#charset0">charset</a></code> attribute or a <code><a
+ href="#meta0">meta</a></code> element in the <a href="#encoding"
+ title=attr-meta-http-equiv-content-type>Encoding declaraton state</a>.
<p>Authors should not use JIS_X0212-1990, x-JIS0208, and encodings based on
EBCDIC. Authors should not use UTF-32. Authors must not use the CESU-8,
Modified: source
===================================================================
--- source 2008-02-27 21:31:36 UTC (rev 1266)
+++ source 2008-02-27 21:55:34 UTC (rev 1267)
@@ -5832,9 +5832,9 @@
<dt>Categories</dt>
<dd><span>Metadata content</span>.</dd>
<dt>Contexts in which this element may be used:</dt>
- <dd>If the <code title="attr-meta-charset">charset</code> attribute is present, or if the element is in the <span title="attr-meta-http-equiv-content-type">Content-Type state</span>: as the first element in a <code>head</code> element.</dd>
- <dd>If the <code title="attr-meta-http-equiv">http-equiv</code> attribute is present, and the element is not in the <span title="attr-meta-http-equiv-content-type">Content-Type state</span>: in a <code>head</code> element.</dd>
- <dd>If the <code title="attr-meta-http-equiv">http-equiv</code> attribute is present, and the element is not in the <span title="attr-meta-http-equiv-content-type">Content-Type state</span>: in a <code>noscript</code> element that is a child of a <code>head</code> element.</dd>
+ <dd>If the <code title="attr-meta-charset">charset</code> attribute is present, or if the element is in the <span title="attr-meta-http-equiv-content-type">Encoding declaraton state</span>: as the first element in a <code>head</code> element.</dd>
+ <dd>If the <code title="attr-meta-http-equiv">http-equiv</code> attribute is present, and the element is not in the <span title="attr-meta-http-equiv-content-type">Encoding declaraton state</span>: in a <code>head</code> element.</dd>
+ <dd>If the <code title="attr-meta-http-equiv">http-equiv</code> attribute is present, and the element is not in the <span title="attr-meta-http-equiv-content-type">Encoding declaraton state</span>: in a <code>noscript</code> element that is a child of a <code>head</code> element.</dd>
<dd>If the <code title="attr-meta-name">name</code> attribute is present: where <span>metadata content</span> is expected.</dd>
<dt>Content model:</dt>
<dd>Empty.</dd>
@@ -6150,19 +6150,19 @@
<dl>
- <dt><dfn title="attr-meta-http-equiv-content-type">Encoding declaration</dfn>
+ <dt><dfn title="attr-meta-http-equiv-content-type">Encoding declaration state</dfn>
<dd>
- <p>The <span
- title="attr-meta-http-equiv-content-type">Content-Type
- state's</span> requirements are all handled by the parsing section
- of the specification. The state is just an alternative form of
- setting the <code title="meta-charset">charset</code> attribute:
- it is <a href="#charset">a character encoding declaration</a>.</p>
+ <p>The <span title="attr-meta-http-equiv-content-type">Encoding
+ declaration state's</span> user agent requirements are all handled
+ by the parsing section of the specification. The state is just an
+ alternative form of setting the <code
+ title="meta-charset">charset</code> attribute: it is <a
+ href="#charset">a character encoding declaration</a>.</p>
<p>For <code>meta</code> elements in the <span
- title="attr-meta-http-equiv-content-type">Content-Type
+ title="attr-meta-http-equiv-content-type">Encoding declaraton
state</span>, the <code title="attr-meta-content">content</code>
attribute must have a value consisting of the literal string
"<code title="">text/html;</code>", optionally followed by a
@@ -6172,15 +6172,15 @@
declaration</a>.</p>
<p>If the document contains a <code>meta</code> element in the
- <span title="attr-meta-http-equiv-content-type">Content-Type
- state</span> then that element must be the first element in the
- document's <code>head</code> element, and the document must not
- contain a <code>meta</code> element with the <code
- title="attr-meta-charset">charset</code> attribute present.</p>
+ <span title="attr-meta-http-equiv-content-type">Encoding
+ declaraton state</span> then that element must be the first
+ element in the document's <code>head</code> element, and the
+ document must not contain a <code>meta</code> element with the
+ <code title="attr-meta-charset">charset</code> attribute
+ present.</p>
- <p>The <span
- title="attr-meta-http-equiv-content-type">Content-Type
- state</span> may be used in <span title="HTML5">HTML
+ <p>The <span title="attr-meta-http-equiv-content-type">Encoding
+ declaraton state</span> may be used in <span title="HTML5">HTML
documents</span> only, elements in that state must not be used in
<span title="XHTML">XML documents</span>.</p>
@@ -6364,6 +6364,8 @@
the name of a character encoding. This is called a character
encoding declaration.</p>
+ <!-- XXX maybe the rest should move to "writing html" section -->
+
<p>The following restrictions apply to character encoding
declarations:</p>
@@ -6382,8 +6384,6 @@
</ul>
- <!-- XXX next three paragraphs maybe should move to "writing html" section -->
-
<p>If the document does not start with a BOM, and if its encoding is
not explicitly given by <span title="Content-Type">Content-Type
metadata</span>, then the character encoding used must be a superset
@@ -6393,7 +6393,10 @@
any character sets we want to support do things outside that range?
-->, and, in addition, if that encoding isn't US-ASCII itself, then
the encoding must be specified using a <code>meta</code> element
- with a <code title="attr-meta-charset">charset</code> attribute.</p>
+ with a <code title="attr-meta-charset">charset</code> attribute or a
+ <code>meta</code> element in the <span
+ title="attr-meta-http-equiv-content-type">Encoding declaraton
+ state</span>.</p>
<p>Authors should not use JIS_X0212-1990, x-JIS0208, and encodings
based on EBCDIC. Authors should not use UTF-32. Authors must not use
More information about the Commit-Watchers
mailing list