[html5] r3175 - [e] (0) Make xml:lang requirements more clear. (bug 6949)

whatwg at whatwg.org whatwg at whatwg.org
Mon Jun 1 19:57:03 PDT 2009


Author: ianh
Date: 2009-06-01 19:57:01 -0700 (Mon, 01 Jun 2009)
New Revision: 3175

Modified:
   index
   source
Log:
[e] (0) Make xml:lang requirements more clear. (bug 6949)

Modified: index
===================================================================
--- index	2009-06-02 02:37:47 UTC (rev 3174)
+++ index	2009-06-02 02:57:01 UTC (rev 3175)
@@ -321,8 +321,7 @@
       <ol>
        <li><a href=#the-id-attribute><span class=secno>3.3.3.1 </span>The <code>id</code> attribute</a></li>
        <li><a href=#the-title-attribute><span class=secno>3.3.3.2 </span>The <code>title</code> attribute</a></li>
-       <li><a href=#the-lang-and-xml:lang-attributes><span class=secno>3.3.3.3 </span>The <code>lang</code> and <code>xml:lang</code>
-  attributes</a></li>
+       <li><a href=#the-lang-and-xml:lang-attributes><span class=secno>3.3.3.3 </span>The <code title=attr-lang>lang</code> and <code title=attr-xml-lang>xml:lang</code> attributes</a></li>
        <li><a href=#the-xml:base-attribute-(xml-only)><span class=secno>3.3.3.4 </span>The <code>xml:base</code>
   attribute (XML only)</a></li>
        <li><a href=#the-dir-attribute><span class=secno>3.3.3.5 </span>The <code>dir</code> attribute</a></li>
@@ -7990,7 +7989,7 @@
   <p>Elements, attributes, and attribute values in HTML are defined
   (by this specification) to have certain meanings (semantics). For
   example, the <code><a href=#the-ol-element>ol</a></code> element represents an ordered list, and
-  the <code title=attr-lang><a href=#the-lang-and-xml:lang-attributes>lang</a></code> attribute represents the
+  the <code title=attr-lang><a href=#attr-lang>lang</a></code> attribute represents the
   language of the content.</p>
 
   <p>Authors must not use elements, attributes, and attribute values
@@ -8227,7 +8226,7 @@
    <li><code title=attr-id><a href=#the-id-attribute>id</a></code></li>
    <li><code title=attr-item><a href=#items:-the-item-attribute>item</a></code></li>
    <li><code title=attr-hidden><a href=#the-hidden-attribute>hidden</a></code></li>
-   <li><code title=attr-lang><a href=#the-lang-and-xml:lang-attributes>lang</a></code></li>
+   <li><code title=attr-lang><a href=#attr-lang>lang</a></code></li>
    <li><code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code></li>
    <li><code title=attr-spellcheck><a href=#attr-spellcheck>spellcheck</a></code></li>
    <li><code title=attr-style><a href=#the-style-attribute>style</a></code></li>
@@ -8406,17 +8405,16 @@
 
 
 
-  <h5 id=the-lang-and-xml:lang-attributes><span class=secno>3.3.3.3 </span>The <dfn title=attr-lang><code>lang</code></dfn> and <dfn title=attr-xml-lang><code>xml:lang</code></dfn>
-  attributes</h5>
+  <h5 id=the-lang-and-xml:lang-attributes><span class=secno>3.3.3.3 </span>The <code title=attr-lang><a href=#attr-lang>lang</a></code> and <code title=attr-xml-lang><a href=#attr-xml-lang>xml:lang</a></code> attributes</h5>
 
-  <p>The <code title=attr-lang><a href=#the-lang-and-xml:lang-attributes>lang</a></code> attribute specifies the
-  primary <dfn id=language>language</dfn> for the element's contents and for any
-  of the element's attributes that contain text. Its value must be a
-  valid RFC 3066 language code, or the empty string. <a href=#refsRFC3066>[RFC3066]</a></p>
+  <p>The <dfn id=attr-lang title=attr-lang><code>lang</code></dfn> attribute (in
+  no namespace) specifies the primary <dfn id=language>language</dfn> for the
+  element's contents and for any of the element's attributes that
+  contain text. Its value must be a valid RFC 3066 language code, or
+  the empty string. <a href=#refsRFC3066>[RFC3066]</a></p>
 
-  <p>The <code title=attr-xml-lang><a href=#the-lang-and-xml:lang-attributes>xml:lang</a></code> attribute (that
-  is, the <code title="">lang</code> attribute with the <code title="">xml</code> prefix in the <code title="">http://www.w3.org/XML/1998/namespace</code> namespace) is
-  defined in XML. <a href=#refsXML>[XML]</a></p>
+  <p>The <dfn id=attr-xml-lang title=attr-xml-lang><code title="">lang</code></dfn>
+  attribute in the <a href=#xml-namespace>XML namespace</a> is defined in XML. <a href=#refsXML>[XML]</a></p>
 
   <p>If these attributes are omitted from an element, then the
   language of this element is the same as the language of its parent
@@ -8424,27 +8422,29 @@
   that the primary language is unknown.</p> <!-- UA conformance
   requires for this are below -->
 
-  <p>The <code title=attr-lang><a href=#the-lang-and-xml:lang-attributes>lang</a></code> attribute may be used on
-  any <a href=#html-elements title="HTML elements">HTML element</a>.</p>
+  <p>The <code title=attr-lang><a href=#attr-lang>lang</a></code> attribute in no namespace
+  may be used on any <a href=#html-elements title="HTML elements">HTML
+  element</a>.</p>
 
-  <p>The <code title=attr-xml-lang><a href=#the-lang-and-xml:lang-attributes>xml:lang</a></code> attribute may be
-  used on <a href=#html-elements>HTML elements</a> in <a href=#xml-documents>XML documents</a>, as
-  well as elements in other namespaces if the relevant specifications
-  allow it (in particular, MathML and SVG allow <code title=attr-xml-lang><a href=#the-lang-and-xml:lang-attributes>xml:lang</a></code> attributes to be specified on
-  their elements). If both the <code title=attr-lang><a href=#the-lang-and-xml:lang-attributes>lang</a></code>
-  attribute and the <code title=attr-xml-lang><a href=#the-lang-and-xml:lang-attributes>xml:lang</a></code>
-  attribute are specified on the same element, they must have exactly
-  the same value when compared in an <a href=#ascii-case-insensitive>ASCII
+  <p>The <a href=#attr-xml-lang title=attr-xml-lang><code title="">lang</code>
+  attribute in the <span>XML namespace</span></a> may be used on
+  <a href=#html-elements>HTML elements</a> in <a href=#xml-documents>XML documents</a>, as well as
+  elements in other namespaces if the relevant specifications allow it
+  (in particular, MathML and SVG allow <a href=#attr-xml-lang title=attr-xml-lang><code title="">lang</code> attributes in the
+  <span>XML namespace</span></a> to be specified on their
+  elements). If both the <code title=attr-lang><a href=#attr-lang>lang</a></code> attribute
+  in no namespace and the <a href=#attr-xml-lang title=attr-xml-lang><code title="">lang</code> attribute in the <span>XML
+  namespace</span></a> are specified on the same element, they must
+  have exactly the same value when compared in an <a href=#ascii-case-insensitive>ASCII
   case-insensitive</a> manner.</p>
 
-  <p>Authors must not use the <code title=attr-xml-lang><a href=#the-lang-and-xml:lang-attributes>xml:lang</a></code> attribute (that is, the <code title="">lang</code> attribute with the <code title="">xml</code>
-  prefix in the <code title="">http://www.w3.org/XML/1998/namespace</code> namespace) in
-  <a href=#html-documents>HTML documents</a>. To ease migration to and from XHTML,
-  authors may specify an attribute in no namespace with no prefix and
-  with the localname <code title="">xml:lang</code> on <a href=#html-elements>HTML
-  elements</a> in <a href=#html-documents>HTML documents</a>, but such attributes
-  must only be specified if a <code title=attr-lang><a href=#the-lang-and-xml:lang-attributes>lang</a></code>
-  attribute is also specified, and both attributes must have the same
+  <p>Authors must not use the <a href=#attr-xml-lang title=attr-xml-lang><code title="">lang</code> attribute in the <span>XML
+  namespace</span></a> in <a href=#html-documents>HTML documents</a>. To ease
+  migration to and from XHTML, authors may specify an attribute in no
+  namespace with no prefix and with the literal localname "<code title="">xml:lang</code>" on <a href=#html-elements>HTML elements</a> in
+  <a href=#html-documents>HTML documents</a>, but such attributes must only be
+  specified if a <code title=attr-lang><a href=#attr-lang>lang</a></code> attribute in no
+  namespace is also specified, and both attributes must have the same
   value when compared in an <a href=#ascii-case-insensitive>ASCII case-insensitive</a>
   manner.</p>
 
@@ -8452,13 +8452,18 @@
 
   <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><a href=#the-lang-and-xml:lang-attributes>xml:lang</a></code> attribute set or is an <a href=#html-elements title="HTML elements">HTML element</a> and has a <code title=attr-lang><a href=#the-lang-and-xml:lang-attributes>lang</a></code> attribute set. That attribute
-  specifies the language of the node.</p>
+  is an element) that has a <a href=#attr-xml-lang title=attr-xml-lang><code title="">lang</code> attribute in the <span>XML
+  namespace</span></a> set or is an <a href=#html-elements title="HTML
+  elements">HTML element</a> and has a <code title=attr-lang><a href=#attr-lang>lang</a></code> in no namespace attribute set. That
+  attribute specifies the language of the node.</p>
 
-  <p>If both the <code title=attr-xml-lang><a href=#the-lang-and-xml:lang-attributes>xml:lang</a></code> attribute
-  and the <code title=attr-lang><a href=#the-lang-and-xml:lang-attributes>lang</a></code> attribute are set on an
-  element, user agents must use the <code title=attr-xml-lang><a href=#the-lang-and-xml:lang-attributes>xml:lang</a></code> attribute, and the <code title=attr-lang><a href=#the-lang-and-xml:lang-attributes>lang</a></code> attribute must be <a href=#ignore title=ignore>ignored</a> for the purposes of determining the
-  element's language.</p>
+  <p>If both the <code title=attr-lang><a href=#attr-lang>lang</a></code> attribute in no
+  namespace and the <a href=#attr-xml-lang title=attr-xml-lang><code title="">lang</code> attribute in the <span>XML
+  namespace</span></a> are set on an element, user agents must use
+  the <a href=#attr-xml-lang title=attr-xml-lang><code title="">lang</code> attribute
+  in the <span>XML namespace</span></a>, and the <code title=attr-lang><a href=#attr-lang>lang</a></code> attribute in no namespace must be
+  <a href=#ignore title=ignore>ignored</a> for the purposes of determining
+  the element's language.</p>
 
   <p>If no explicit language is given for the <a href=#root-element>root
   element</a>, but there is a <a href=#document-wide-default-language>document-wide default
@@ -8482,8 +8487,8 @@
   rendering-level concern.)--></p>
 
   <hr><p>The <dfn id=dom-lang title=dom-lang><code>lang</code></dfn> DOM attribute
-  must <a href=#reflect>reflect</a> the <code title=attr-lang><a href=#the-lang-and-xml:lang-attributes>lang</a></code>
-  content attribute.</p>
+  must <a href=#reflect>reflect</a> the <code title=attr-lang><a href=#attr-lang>lang</a></code>
+  content attribute in no namespace.</p>
 
   </div>
 
@@ -16474,7 +16479,7 @@
    <dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
   </dl><p>The <code><a href=#the-span-element>span</a></code> element doesn't mean anything on its own,
   but can be useful when used together with other attributes,
-  e.g. <code title=attr-class><a href=#classes>class</a></code>, <code title=attr-lang><a href=#the-lang-and-xml:lang-attributes>lang</a></code>, or <code title=attr-dir><a href=#the-dir-attribute>dir</a></code>. It <a href=#represents>represents</a> its
+  e.g. <code title=attr-class><a href=#classes>class</a></code>, <code title=attr-lang><a href=#attr-lang>lang</a></code>, or <code title=attr-dir><a href=#the-dir-attribute>dir</a></code>. It <a href=#represents>represents</a> its
   children.</p>
 
 
@@ -16499,7 +16504,9 @@
   italicized.</p>
 
   <p>Terms in languages different from the main text should be
-  annotated with <code title=attr-lang><a href=#the-lang-and-xml:lang-attributes>lang</a></code> attributes (<code title=attr-xml-lang><a href=#the-lang-and-xml:lang-attributes>xml:lang</a></code> in XML).</p>
+  annotated with <code title=attr-lang><a href=#attr-lang>lang</a></code> attributes (or,
+  in XML, <a href=#attr-xml-lang title=attr-xml-lang><code title="">lang</code>
+  attributes in the <span>XML namespace</span></a>).</p>
 
   <div class=example>
    <p>The examples below show uses of the <code><a href=#the-i-element>i</a></code> element:</p>
@@ -40423,7 +40430,7 @@
    <dt>DOM interface:</dt>
    <dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
   </dl><p>The <code><a href=#the-div-element>div</a></code> element has no special meaning at all. It
-  <a href=#represents>represents</a> its children. It can be used with the <code title=attr-class><a href=#classes>class</a></code>, <code title=attr-lang><a href=#the-lang-and-xml:lang-attributes>lang</a></code>/<code title=attr-xml-lang><a href=#the-lang-and-xml:lang-attributes>xml:lang</a></code>, and <code title=attr-title><a href=#the-title-attribute>title</a></code> attributes to mark up semantics
+  <a href=#represents>represents</a> its children. It can be used with the <code title=attr-class><a href=#classes>class</a></code>, <code title=attr-lang><a href=#attr-lang>lang</a></code>, and <code title=attr-title><a href=#the-title-attribute>title</a></code> attributes to mark up semantics
   common to a group of consecutive elements.</p>
 
   <p class=XXX>Allowing <code><a href=#the-div-element>div</a></code> elements to contain
@@ -61647,7 +61654,8 @@
   corresponding cell in the third column, and the namespace being the
   namespace given in the corresponding cell in the fourth
   column. (This fixes the use of namespaced attributes, in particular
-  <code title="">xml:lang</code>.)</p>
+  <a href=#attr-xml-lang title=attr-xml-lang><code title="">lang</code> attributes in
+  the <span>XML namespace</span></a>.)</p>
 
   <table><thead><tr><th> Attribute name <th> Prefix <th> Local name <th> Namespace
    <tbody><tr><td> <code title="">xlink:actuate</code> <td> <code title="">xlink</code> <td> <code title="">actuate</code> <td> <a href=#xlink-namespace>XLink namespace</a>

Modified: source
===================================================================
--- source	2009-06-02 02:37:47 UTC (rev 3174)
+++ source	2009-06-02 02:57:01 UTC (rev 3175)
@@ -8632,21 +8632,18 @@
 
 
 
-  <h5>The <dfn title="attr-lang"><code>lang</code></dfn> and <dfn
-  title="attr-xml-lang"><code>xml:lang</code></dfn>
-  attributes</h5>
+  <h5>The <code title="attr-lang">lang</code> and <code
+  title="attr-xml-lang">xml:lang</code> attributes</h5>
 
-  <p>The <code title="attr-lang">lang</code> attribute specifies the
-  primary <dfn>language</dfn> for the element's contents and for any
-  of the element's attributes that contain text. Its value must be a
-  valid RFC 3066 language code, or the empty string. <a
-  href="#refsRFC3066">[RFC3066]</a></p>
+  <p>The <dfn title="attr-lang"><code>lang</code></dfn> attribute (in
+  no namespace) specifies the primary <dfn>language</dfn> for the
+  element's contents and for any of the element's attributes that
+  contain text. Its value must be a valid RFC 3066 language code, or
+  the empty string. <a href="#refsRFC3066">[RFC3066]</a></p>
 
-  <p>The <code title="attr-xml-lang">xml:lang</code> attribute (that
-  is, the <code title="">lang</code> attribute with the <code
-  title="">xml</code> prefix in the <code
-  title="">http://www.w3.org/XML/1998/namespace</code> namespace) is
-  defined in XML. <a href="#refsXML">[XML]</a></p>
+  <p>The <dfn title="attr-xml-lang"><code title="">lang</code></dfn>
+  attribute in the <span>XML namespace</span> is defined in XML. <a
+  href="#refsXML">[XML]</a></p>
 
   <p>If these attributes are omitted from an element, then the
   language of this element is the same as the language of its parent
@@ -8654,31 +8651,33 @@
   that the primary language is unknown.</p> <!-- UA conformance
   requires for this are below -->
 
-  <p>The <code title="attr-lang">lang</code> attribute may be used on
-  any <span title="HTML elements">HTML element</span>.</p>
+  <p>The <code title="attr-lang">lang</code> attribute in no namespace
+  may be used on any <span title="HTML elements">HTML
+  element</span>.</p>
 
-  <p>The <code title="attr-xml-lang">xml:lang</code> attribute may be
-  used on <span>HTML elements</span> in <span>XML documents</span>, as
-  well as elements in other namespaces if the relevant specifications
-  allow it (in particular, MathML and SVG allow <code
-  title="attr-xml-lang">xml:lang</code> attributes to be specified on
-  their elements). If both the <code title="attr-lang">lang</code>
-  attribute and the <code title="attr-xml-lang">xml:lang</code>
-  attribute are specified on the same element, they must have exactly
-  the same value when compared in an <span>ASCII
+  <p>The <span title="attr-xml-lang"><code title="">lang</code>
+  attribute in the <span>XML namespace</span></span> may be used on
+  <span>HTML elements</span> in <span>XML documents</span>, as well as
+  elements in other namespaces if the relevant specifications allow it
+  (in particular, MathML and SVG allow <span
+  title="attr-xml-lang"><code title="">lang</code> attributes in the
+  <span>XML namespace</span></span> to be specified on their
+  elements). If both the <code title="attr-lang">lang</code> attribute
+  in no namespace and the <span title="attr-xml-lang"><code
+  title="">lang</code> attribute in the <span>XML
+  namespace</span></span> are specified on the same element, they must
+  have exactly the same value when compared in an <span>ASCII
   case-insensitive</span> manner.</p>
 
-  <p>Authors must not use the <code
-  title="attr-xml-lang">xml:lang</code> attribute (that is, the <code
-  title="">lang</code> attribute with the <code title="">xml</code>
-  prefix in the <code
-  title="">http://www.w3.org/XML/1998/namespace</code> namespace) in
-  <span>HTML documents</span>. To ease migration to and from XHTML,
-  authors may specify an attribute in no namespace with no prefix and
-  with the localname <code title="">xml:lang</code> on <span>HTML
-  elements</span> in <span>HTML documents</span>, but such attributes
-  must only be specified if a <code title="attr-lang">lang</code>
-  attribute is also specified, and both attributes must have the same
+  <p>Authors must not use the <span title="attr-xml-lang"><code
+  title="">lang</code> attribute in the <span>XML
+  namespace</span></span> in <span>HTML documents</span>. To ease
+  migration to and from XHTML, authors may specify an attribute in no
+  namespace with no prefix and with the literal localname "<code
+  title="">xml:lang</code>" on <span>HTML elements</span> in
+  <span>HTML documents</span>, but such attributes must only be
+  specified if a <code title="attr-lang">lang</code> attribute in no
+  namespace is also specified, and both attributes must have the same
   value when compared in an <span>ASCII case-insensitive</span>
   manner.</p>
 
@@ -8688,19 +8687,22 @@
 
   <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.</p>
+  is an element) that has a <span title="attr-xml-lang"><code
+  title="">lang</code> attribute in the <span>XML
+  namespace</span></span> set or is an <span title="HTML
+  elements">HTML element</span> and has a <code
+  title="attr-lang">lang</code> in no namespace attribute set. That
+  attribute 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
-  element, user agents must use the <code
-  title="attr-xml-lang">xml:lang</code> attribute, and the <code
-  title="attr-lang">lang</code> attribute must be <span
-  title="ignore">ignored</span> for the purposes of determining the
-  element's language.</p>
+  <p>If both the <code title="attr-lang">lang</code> attribute in no
+  namespace and the <span title="attr-xml-lang"><code
+  title="">lang</code> attribute in the <span>XML
+  namespace</span></span> are set on an element, user agents must use
+  the <span title="attr-xml-lang"><code title="">lang</code> attribute
+  in the <span>XML namespace</span></span>, and the <code
+  title="attr-lang">lang</code> attribute in no namespace must be
+  <span title="ignore">ignored</span> for the purposes of determining
+  the element's language.</p>
 
   <p>If no explicit language is given for the <span>root
   element</span>, but there is a <span>document-wide default
@@ -8729,7 +8731,7 @@
 
   <p>The <dfn title="dom-lang"><code>lang</code></dfn> DOM attribute
   must <span>reflect</span> the <code title="attr-lang">lang</code>
-  content attribute.</p>
+  content attribute in no namespace.</p>
 
   </div>
 
@@ -17685,8 +17687,9 @@
   italicized.</p>
 
   <p>Terms in languages different from the main text should be
-  annotated with <code title="attr-lang">lang</code> attributes (<code
-  title="attr-xml-lang">xml:lang</code> in XML).</p>
+  annotated with <code title="attr-lang">lang</code> attributes (or,
+  in XML, <span title="attr-xml-lang"><code title="">lang</code>
+  attributes in the <span>XML namespace</span></span>).</p>
 
   <div class="example">
    <p>The examples below show uses of the <code>i</code> element:</p>
@@ -45525,8 +45528,7 @@
   <p>The <code>div</code> element has no special meaning at all. It
   <span>represents</span> its children. It can be used with the <code
   title="attr-class">class</code>, <code
-  title="attr-lang">lang</code>/<code
-  title="attr-xml-lang">xml:lang</code>, and <code
+  title="attr-lang">lang</code>, and <code
   title="attr-title">title</code> attributes to mark up semantics
   common to a group of consecutive elements.</p>
 
@@ -75594,7 +75596,8 @@
   corresponding cell in the third column, and the namespace being the
   namespace given in the corresponding cell in the fourth
   column. (This fixes the use of namespaced attributes, in particular
-  <code title="">xml:lang</code>.)</p>
+  <span title="attr-xml-lang"><code title="">lang</code> attributes in
+  the <span>XML namespace</span></span>.)</p>
 
   <table>
    <thead>




More information about the Commit-Watchers mailing list