[html5] r1180 - /

whatwg at whatwg.org whatwg at whatwg.org
Thu Jan 31 14:26:17 PST 2008


Author: ianh
Date: 2008-01-31 14:26:14 -0800 (Thu, 31 Jan 2008)
New Revision: 1180

Modified:
   index
   source
Log:
[v] (1) <meta http-equiv=content-type> is now defined as conforming and equivalent to <meta charset>

Modified: index
===================================================================
--- index	2008-01-31 21:55:58 UTC (rev 1179)
+++ index	2008-01-31 22:26:14 UTC (rev 1180)
@@ -7327,15 +7327,21 @@
    <dt>Contexts in which this element may be used:
 
    <dd>If the <code title=attr-meta-charset><a
-    href="#charset0">charset</a></code> attribute is present: as the first
-    element in a <code><a href="#head">head</a></code> element.
+    href="#charset0">charset</a></code> attribute is present, or if the
+    element is in the <a href="#content-type4"
+    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.
 
    <dd>If the <code title=attr-meta-http-equiv><a
-    href="#http-equiv0">http-equiv</a></code> attribute is present: in a
+    href="#http-equiv0">http-equiv</a></code> attribute is present, and the
+    element is not in the <a href="#content-type4"
+    title=attr-meta-http-equiv-content-type>Content-Type 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: in a
+    href="#http-equiv0">http-equiv</a></code> attribute is present, and the
+    element is not in the <a href="#content-type4"
+    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.
 
@@ -7399,9 +7405,9 @@
    must also be specified. Otherwise, it must be omitted.
 
   <p>The <code title=attr-meta-charset><a href="#charset0">charset</a></code>
-   attribute may only be specified in <a href="#html5" title=HTML5>HTML
-   documents</a>, it must not be used in <a href="#xhtml5" title=XHTML>XML
-   documents</a>. If the <code title=attr-meta-charset><a
+   attribute may be specified in <a href="#html5" title=HTML5>HTML
+   documents</a> only, it must not be used in <a href="#xhtml5"
+   title=XHTML>XML documents</a>. If the <code title=attr-meta-charset><a
    href="#charset0">charset</a></code> attribute is specified, the element
    must be the first element in <a href="#the-head0">the <code>head</code>
    element</a> of the file.
@@ -7587,10 +7593,14 @@
      <td><span title="attr-meta-http-equiv-content-language">Content-Language</span>
      <td><code title="">Content-Language</code>
      <td>Non-conforming
+-->
+
     <tr>
-     <td><span title="attr-meta-http-equiv-content-type">Content-Type</span>
-     <td><code title="">Content-Type</code>
-     <td>Non-conforming [ XXX though maybe we should allow it for migration? ]
+     <td><a href="#content-type4"
+      title=attr-meta-http-equiv-content-type>Content-Type</a>
+
+     <td><code title="">Content-Type</code> <!--     <td>Non-conforming -->
+      <!--
     <tr>
      <td><span title="attr-meta-http-equiv-content-script-type">Content-Script-Type</span>
      <td><code title="">Content-Script-Type</code>
@@ -7600,6 +7610,7 @@
      <td><code title="">Content-Style-Type</code>
      <td>Non-conforming
 -->
+      
 
     <tr>
      <td><a href="#refresh" title=attr-meta-http-equiv-refresh>Refresh</a>
@@ -7769,8 +7780,49 @@
     </ol>
 
    <dd>
+
+   <dt><dfn id=content-type4
+    title=attr-meta-http-equiv-content-type>Content-Type</dfn>
+
+   <dd>
+    <p>The <a href="#content-type4"
+     title=attr-meta-http-equiv-content-type>Content-Type state's</a>
+     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="#content-type4"
+     title=attr-meta-http-equiv-content-type>Content-Type state</a>, the
+     <code title=attr-meta-content><a href="#content0">content</a></code>
+     attribute must have a value consisting either of the literal string
+     "<code title="">text/html;</code>", followed by a single U+0020 SPACE
+     character, followed by the literal string "<code
+     title="">charset=</code>", followed by the character encoding name of <a
+     href="#charset">the character encoding declaration</a>.</p>
+
+    <p>If the document contains a <code><a href="#meta0">meta</a></code>
+     element in the <a href="#content-type4"
+     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
+     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="#content-type4"
+     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>
+
+   <dd>
   </dl>
 
+  <p>There must not be more than one <code><a href="#meta0">meta</a></code>
+   element with any particular state in the document at a time.
+
   <h5 id=charset><span class=secno>3.7.5.4. </span>Specifying the document's
    character encoding</h5>
 
@@ -7797,7 +7849,7 @@
   <!-- 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"
+   explicitly given by <a href="#content-type9"
    title=Content-Type>Content-Type metadata</a>, then the character encoding
    used must be a superset of US-ASCII (specifically, ANSI_X3.4-1968) for
    bytes in the range 0x09 - 0x0D, 0x20, 0x21, 0x22, 0x26, 0x27, 0x2C - 0x3F,
@@ -8024,7 +8076,7 @@
      the <code title=attr-style-type><a href="#type1">type</a></code> content
      attribute's value, or <code title="">text/css</code> if that is omitted.
      For <code><a href="#link">link</a></code> elements, this is the <a
-     href="#content-type8" title=Content-Type>Content-Type metadata of the
+     href="#content-type9" title=Content-Type>Content-Type metadata of the
      specified resource</a>.
 
    <dt>The location (<code title=dom-stylesheet-href>href</code> DOM
@@ -12593,7 +12645,7 @@
    the <code><a href="#img">img</a></code> element.
 
   <p>The remote server's response metadata (e.g. an HTTP 404 status code, or
-   <a href="#content-type8" title=Content-Type>associated Content-Type
+   <a href="#content-type9" title=Content-Type>associated Content-Type
    headers</a>) must be ignored when determining whether the resource
    obtained is a valid image or not.
 
@@ -12859,7 +12911,7 @@
     title=attr-embed-type><a href="#type4">type</a></code> attribute is the
     <span>content's type</span>.
 
-   <li>Otherwise, if the specified resource has <a href="#content-type8"
+   <li>Otherwise, if the specified resource has <a href="#content-type9"
     title=Content-Type>explicit Content-Type metadata</a>, then that is the
     <span>content's type</span>.
 
@@ -13005,10 +13057,10 @@
        the same mechanism as for browsing contexts?</p>
 
       <dl class=switch>
-       <dt>If the resource has <a href="#content-type8"
+       <dt>If the resource has <a href="#content-type9"
         title=Content-Type>associated Content-Type metadata</a>
 
-       <dd>The type is the type specified in <a href="#content-type8"
+       <dd>The type is the type specified in <a href="#content-type9"
         title=Content-Type>the resource's Content-Type metadata</a>.
 
        <dt>Otherwise, if the <code title=attr-object-type><a
@@ -25626,13 +25678,13 @@
    HTTP 204 No Content response.
 
   <p>Otherwise, the URI must be treated in a manner equivalent to an HTTP
-   resource with a 200 OK response whose <a href="#content-type8"
+   resource with a 200 OK response whose <a href="#content-type9"
    title=Content-Type>Content-Type metadata</a> is <code
    title="">text/html</code> and whose response body is the dereference
    by-product, converted to a string value.
 
   <p class=note>Certain contexts, in particular <code><a
-   href="#img">img</a></code> elements, ignore the <a href="#content-type8"
+   href="#img">img</a></code> elements, ignore the <a href="#content-type9"
    title=Content-Type>Content-Type metadata</a>.
 
   <div class=example>
@@ -28649,7 +28701,7 @@
 
    <li>
     <p>If the document's out-of-band metadata (e.g. HTTP headers), not
-     counting any <a href="#content-type8" title=Content-Type>type
+     counting any <a href="#content-type9" title=Content-Type>type
      information</a> (such as the Content-Type HTTP header), requires some
      sort of processing that will not affect the browsing context, then
      perform that processing and abort these steps.</p>
@@ -28811,7 +28863,7 @@
    characters for use in the <span>tokeniser</span><!-- XXX xref
   -->. This
    process relies, in part, on character encoding information found in the
-   real <a href="#content-type8" title=Content-Type>Content-Type metadata</a>
+   real <a href="#content-type9" title=Content-Type>Content-Type metadata</a>
    of the resource; the "sniffed type" is not used for this purpose.</p>
   <!-- next two paragraphs are nearly identical to the navigate-text
   section, keep them in sync -->
@@ -29137,20 +29189,20 @@
     </table>
 
     <p>...then jump to the <em title="content-type sniffing: text or
-     binary"><a href="#content-type4">text or binary</a></em> section below.</p>
+     binary"><a href="#content-type5">text or binary</a></em> section below.</p>
 
    <li>
     <p>Let <var title="">official type</var> be the type given by the <a
-     href="#content-type8" title=Content-Type>Content-Type metadata</a> for
+     href="#content-type9" title=Content-Type>Content-Type metadata</a> for
      the resource (in lowercase<!-- XXX ASCII case folding -->, ignoring any
      parameters). If there is no such type, jump to the <em
      title="content-type sniffing: unknown type"><a
-     href="#content-type5">unknown type</a></em> step below.
+     href="#content-type6">unknown type</a></em> step below.
 
    <li>
     <p>If <var title="">official type</var> is "unknown/unknown" or
      "application/unknown", jump to the <em title="content-type sniffing:
-     unknown type"><a href="#content-type5">unknown type</a></em> step below.</p>
+     unknown type"><a href="#content-type6">unknown type</a></em> step below.</p>
     <!-- In a study looking at many billions of pages whose first five
    characters were "<HTML", "unknown/unknown" was used to label
    documents about once for every 5000 pages labelled "text/html", and
@@ -29171,12 +29223,12 @@
     <p>If <var title="">official type</var> is an image type supported by the
      user agent (e.g. "image/png", "image/gif", "image/jpeg", etc), then jump
      to the <em title="content-type sniffing: image"><a
-     href="#content-type6">images</a></em> section below.
+     href="#content-type7">images</a></em> section below.
 
    <li>
     <p>If <var title="">official type</var> is "text/html", then jump to the
      <em title="content-type sniffing: feed or html"><a
-     href="#content-type7">feed or HTML</a></em> section below.
+     href="#content-type8">feed or HTML</a></em> section below.
 
    <li>
     <p>Otherwise, the sniffed type of the resource is <var title="">official
@@ -29184,7 +29236,7 @@
   </ol>
 
   <h4 id=content-type0><span class=secno>4.9.1. </span><dfn
-   id=content-type4>Content-Type sniffing: text or binary</dfn></h4>
+   id=content-type5>Content-Type sniffing: text or binary</dfn></h4>
 
   <ol>
    <li>
@@ -29274,7 +29326,7 @@
   </ul>
 
   <h4 id=content-type1><span class=secno>4.9.2. </span><dfn
-   id=content-type5>Content-Type sniffing: unknown type</dfn></h4>
+   id=content-type6>Content-Type sniffing: unknown type</dfn></h4>
 
   <ol>
    <li>
@@ -29379,7 +29431,7 @@
     </dl>
 
    <li>
-    <p>As a last-ditch effort, jump to the <a href="#content-type4"
+    <p>As a last-ditch effort, jump to the <a href="#content-type5"
      title="content-type sniffing: text or binary">text or binary</a>
      section.
   </ol>
@@ -29526,7 +29578,7 @@
    then a user agent detects it as HTML anyway and allows script to execute).
 
   <h4 id=content-type2><span class=secno>4.9.3. </span><dfn
-   id=content-type6>Content-Type sniffing: image</dfn></h4>
+   id=content-type7>Content-Type sniffing: image</dfn></h4>
 
   <p>If the first bytes of the file match one of the byte sequences in the
    first columns of the following table, then the sniffed type of the
@@ -29588,7 +29640,7 @@
    <var title="">official type</var>.
 
   <h4 id=content-type3><span class=secno>4.9.4. </span><dfn
-   id=content-type7>Content-Type sniffing: feed or HTML</dfn></h4>
+   id=content-type8>Content-Type sniffing: feed or HTML</dfn></h4>
   <!-- mostly based on:
    http://blogs.msdn.com/rssteam/articles/PublishersGuide.aspx
    http://lxr.mozilla.org/seamonkey/source/browser/components/feeds/src/nsFeedSniffer.cpp#192
@@ -29759,7 +29811,7 @@
 
   <h4 id=content-type><span class=secno>4.9.5. </span>Content-Type metadata</h4>
 
-  <p>What explicit <dfn id=content-type8 title=Content-Type>Content-Type
+  <p>What explicit <dfn id=content-type9 title=Content-Type>Content-Type
    metadata</dfn> is associated with the resource (the resource's type
    information) depends on the protocol that was used to fetch the resource.
 
@@ -34808,7 +34860,7 @@
    domain</a>, the semantics of the Access-Control HTTP header must be
    followed. <a href="#refsACCESSCONTROL">[ACCESSCONTROL]</a>
 
-  <p>HTTP 200 OK responses with a <a href="#content-type8">Content-Type</a>
+  <p>HTTP 200 OK responses with a <a href="#content-type9">Content-Type</a>
    header specifying the type <code>application/x-dom-event-stream</code>
    that are either from <a href="#domain0">the document's domain</a> or
    explicitly allowed by the Access-Control HTTP headers must be processed
@@ -34825,7 +34877,7 @@
    five seconds.
 
   <p>HTTP 200 OK responses that have a <a
-   href="#content-type8">Content-Type</a> other than
+   href="#content-type9">Content-Type</a> other than
    <code>application/x-dom-event-stream</code> (or some other supported
    type), and HTTP responses whose Access-Control headers indicate that the
    resource are not to be used, must be ignored and must prevent the user
@@ -36269,9 +36321,9 @@
   <p>The various types of content mentioned above are described in the next
    few sections.
 
-  <p>In addition, there are some restrictions on how <a href="#charset0"
-   title=attr-meta-charset>character encoding declarations</a> are to be
-   serialised, as discussed in the section on that topic.
+  <p>In addition, there are some restrictions on how <a
+   href="#charset">character encoding declarations</a> are to be serialised,
+   as discussed in the section on that topic.
 
   <p>The U+0000 NULL character must not appear anywhere in a document.
 
@@ -37096,7 +37148,7 @@
    <dfn id=encoding>encoding sniffing algorithm</dfn>) to determine the
    character encoding to use when decoding a document in the first pass. This
    algorithm takes as input any out-of-band metadata available to the user
-   agent (e.g. the <a href="#content-type8" title=Content-Type>Content-Type
+   agent (e.g. the <a href="#content-type9" title=Content-Type>Content-Type
    metadata</a> of the document) and all the bytes available so far, and
    returns an encoding and a <dfn id=confidence
    title=concept-encoding-confidence>confidence</dfn>. The confidence is

Modified: source
===================================================================
--- source	2008-01-31 21:55:58 UTC (rev 1179)
+++ source	2008-01-31 22:26:14 UTC (rev 1180)
@@ -5827,9 +5827,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: 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: in a <code>head</code> element.</dd>
-   <dd>If the <code title="attr-meta-http-equiv">http-equiv</code> attribute is present: 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">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-name">name</code> attribute is present: where <span>metadata content</span> is expected.</dd>
    <dt>Content model:</dt>
    <dd>Empty.</dd>
@@ -5873,7 +5873,7 @@
   also be specified. Otherwise, it must be omitted.</p>
 
   <p>The <code title="attr-meta-charset">charset</code> attribute may
-  only be specified in <span title="HTML5">HTML documents</span>, it
+  be specified in <span title="HTML5">HTML documents</span> only, it
   must not be used in <span title="XHTML">XML documents</span>. If the
   <code title="attr-meta-charset">charset</code> attribute is
   specified, the element must be the first element in <span>the
@@ -6072,10 +6072,12 @@
      <td><span title="attr-meta-http-equiv-content-language">Content-Language</span>
      <td><code title="">Content-Language</code>
      <td>Non-conforming
+-->
     <tr>
      <td><span title="attr-meta-http-equiv-content-type">Content-Type</span>
      <td><code title="">Content-Type</code>
-     <td>Non-conforming [ XXX though maybe we should allow it for migration? ]
+<!--     <td>Non-conforming -->
+<!--
     <tr>
      <td><span title="attr-meta-http-equiv-content-script-type">Content-Script-Type</span>
      <td><code title="">Content-Script-Type</code>
@@ -6243,9 +6245,47 @@
 
    <dd>
 
+   <dt><dfn title="attr-meta-http-equiv-content-type">Content-Type</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>For <code>meta</code> elements in the <span
+    title="attr-meta-http-equiv-content-type">Content-Type
+    state</span>, the <code title="attr-meta-content">content</code>
+    attribute must have a value consisting either of the literal
+    string "<code title="">text/html;</code>", followed by a single
+    U+0020 SPACE character, followed by the literal string "<code
+    title="">charset=</code>", followed by the character encoding name
+    of <a href="#charset">the character encoding 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>
+
+    <p>The <span
+    title="attr-meta-http-equiv-content-type">Content-Type
+    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>
+
+   <dd>
+
   </dl>
 
+  <p>There must not be more than one <code>meta</code> element with
+  any particular state in the document at a time.</p>
 
+
   <h5 id="charset">Specifying the document's character encoding</h5>
 
   <p>The <code>meta</code> element may also be used to provide UAs
@@ -33607,9 +33647,9 @@
   <p>The various types of content mentioned above are described in the
   next few sections.</p>
 
-  <p>In addition, there are some restrictions on how <span
-  title="attr-meta-charset">character encoding declarations</span> are
-  to be serialised, as discussed in the section on that topic.</p>
+  <p>In addition, there are some restrictions on how <a
+  href="#charset">character encoding declarations</a> are to be
+  serialised, as discussed in the section on that topic.</p>
 
   <p>The U+0000 NULL character must not appear anywhere in a
   document.</p>




More information about the Commit-Watchers mailing list