HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2057

File a bug

SVNBugCommentTime (UTC)
2057Define the Content-Language pragma, since apparently ~1% of sites use it in some way or another.2008-08-12 10:02
Index: source
===================================================================
--- source	(revision 2056)
+++ source	(revision 2057)
@@ -5814,15 +5814,15 @@
   <span>HTML documents</span>.</p> <!-- technically this is redundant
   with the XML spec -->
 
+  <hr>
+
   <p>To determine the language of a node, user agents must look at the
   nearest ancestor element (including the element itself if the node
   is an element) that has an <code
   title="attr-xml-lang">xml:lang</code> attribute set or is an <span
   title="HTML elements">HTML element</span> and has a <code
   title="attr-lang">lang</code> attribute set. That attribute
-  specifies the language of the node. If that attribute's value is not
-  a recognised language code, then it must be treated as an unknown
-  language (as if the value was the empty string).</p>
+  specifies the language of the node.</p>
 
   <p>If both the <code title="attr-xml-lang">xml:lang</code> attribute
   and the <code title="attr-lang">lang</code> attribute are set on an
@@ -5833,11 +5833,21 @@
   element's language.</p>
 
   <p>If no explicit language is given for the <span>root
-  element</span>, then language information from a higher-level
-  protocol (such as HTTP), if any, must be used as the final
-  fallback language. In the absence of any language information, the
-  default value is unknown (the empty string).</p>
+  element</span>, but there is a <span>document-wide default
+  language</span> set, then that is the language of the node.</p>
 
+  <p>If there is no <span>document-wide default language</span>, then
+  language information from a higher-level protocol (such as HTTP), if
+  any, must be used as the final fallback language. In the absence of
+  any language information, the default value is unknown (the empty
+  string).</p>
+
+  <p>If the resulting value is not a recognised language code, then it
+  must be treated as an unknown language (as if the value was the
+  empty string).</p>
+
+  <hr>
+
   <p>User agents may use the element's language to determine proper
   processing or rendering (e.g. in the selection of appropriate
   fonts or pronunciations, or for dictionary selection). <!--User
@@ -8169,6 +8179,7 @@
   those keywords map.<!-- Some of the keywords are non-conforming, as
   noted in the last column.--></p>
 
+<!-- things that are neither conforming nor do anything are commented out -->
   <table>
    <thead>
     <tr>
@@ -8176,12 +8187,10 @@
      <th>Keywords
 <!--     <th>Notes-->
    <tbody>
-<!-- things that are neither conforming nor do anything are commented out
     <tr>
-     <td><span title="attr-meta-http-equiv-content-language">Content-Language</span>
+     <td><span title="attr-meta-http-equiv-content-language">Content Language</span>
      <td><code title="">Content-Language</code>
-     <td>Non-conforming [ XXX but maybe we should make this an alternative to <html lang="">? ]
--->
+<!--     <td>Non-conforming -->
     <tr>
      <td><span title="attr-meta-http-equiv-content-type">Encoding declaration</span>
      <td><code title="">Content-Type</code>
@@ -8254,6 +8263,58 @@
 
   <dl>
 
+   <dt><dfn title="attr-meta-http-equiv-content-language">Content language</dfn>
+
+   <dd>
+
+    <p>This pragma sets the <dfn>document-wide default
+    language</dfn>. Until the pragma is successfully processed, there
+    is no <span>document-wide default language</span>.</p>
+
+    <ol>
+
+     <li><p>If another <code>meta</code> element in the <span
+     title="attr-meta-http-equiv-content-language">Content Language
+     state</span> has already been successfully processed (i.e. when
+     it was inserted the user agent processed it and reached the last
+     step of this list of steps), then abort these steps.</p></li>
+
+     <li><p>If the <code>meta</code> element has no <code
+     title="attr-meta-content">content</code> attribute, or if that
+     attribute's value is the empty string, then abort these
+     steps.</p></li>
+
+     <li><p>Let <var title="">input</var> be the value of the
+     element's <code title="attr-meta-content">content</code>
+     attribute.</p></li>
+
+     <li><p>Let <var title="">position</var> point at the first
+     character of <var title="">input</var>.</p></li>
+
+     <li><p><span>Skip whitespace</span>.</p></li>
+
+     <li><p><span title="collect a sequence of characters">Collect a
+     sequence of characters</span> that are neither <span title="space
+     character">space characters</span> nor a U+002C COMMA character
+     (",").</p></li>
+
+     <li><p>Let the <span>document-wide default language</span> be the
+     string that resulted from the previous step.</p></li>
+
+    </ol>
+
+    <p>For <code>meta</code> elements in the <span
+    title="attr-meta-http-equiv-content-language">Content Language
+    state</span>, the <code title="attr-meta-content">content</code>
+    attribute must have a value consisting of a valid RFC 3066
+    language code. <a href="#refsRFC3066">[RFC3066]</a></p>
+
+    <p class="note">This pragma not exactly equivalent to the HTTP
+    <code>Content-Language</code> header, for instance it only
+    supports one language. <a href="#refsRFC2616">[RFC2616]</a></p>
+
+   </dd>
+
    <dt><dfn title="attr-meta-http-equiv-content-type">Encoding declaration state</dfn>
 
    <dd>

|