Skip to content

Commit

Permalink
[e] (0) cleanup of the lang='' processing for clarity.
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=9263

git-svn-id: http://svn.whatwg.org/webapps@4943 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 2, 2010
1 parent 275afc0 commit 220494a
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 33 deletions.
27 changes: 16 additions & 11 deletions complete.html
Expand Up @@ -8906,7 +8906,8 @@ <h5 id=the-lang-and-xml:lang-attributes><span class=secno>3.2.3.3 </span>The <co
if the node 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>
attribute specifies the language of the node (regardless of its
value).</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
Expand All @@ -8916,17 +8917,16 @@ <h5 id=the-lang-and-xml:lang-attributes><span class=secno>3.2.3.3 </span>The <co
<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 any ancestors of the node,
including the <a href=#root-element>root element</a>, but there is a
<p>If none of the node's ancestors, including the <a href=#root-element>root
element</a>, have either attribute set, but there is a
<a href=#pragma-set-default-language>pragma-set default language</a> set, then that is the
language of the node.</p>

<p>If there is no <a href=#pragma-set-default-language>pragma-set default language</a>, 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, and in cases where the higher-level
protocol reports multiple languages, the language of the node is
unknown (the empty string).</p>
language of the node. If there is no <a href=#pragma-set-default-language>pragma-set default
language</a> set, then language information from a higher-level
protocol (such as HTTP), if any, must be used as the final fallback
language instead. In the absence of any such language information,
and in cases where the higher-level protocol reports multiple
languages, the language of the node is unknown, and the
corresponding language code is the empty string.</p>

<p>If the resulting value is not a recognized language code, then it
must be treated as an unknown language having the given language
Expand All @@ -8943,6 +8943,10 @@ <h5 id=the-lang-and-xml:lang-attributes><span class=secno>3.2.3.3 </span>The <co
"xyzzy", even if it knew it was invalid, just in case the screen
reader actually supported a language with that code after all.</p>

<p>If the resulting value is the empty string, then it must be
interpreted as meaning that the language of the node is explicitly
unknown.</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
Expand All @@ -8957,6 +8961,7 @@ <h5 id=the-lang-and-xml:lang-attributes><span class=secno>3.2.3.3 </span>The <co
</div>



<h5 id=the-xml:base-attribute-(xml-only)><span class=secno>3.2.3.4 </span>The <dfn title=attr-xml-base><code>xml:base</code></dfn>
attribute (XML only)</h5>

Expand Down
27 changes: 16 additions & 11 deletions index
Expand Up @@ -8804,7 +8804,8 @@ Transport Protocol"&gt;HTTP&lt;/abbr&gt; today.&lt;/p&gt;</pre>
if the node 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>
attribute specifies the language of the node (regardless of its
value).</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
Expand All @@ -8814,17 +8815,16 @@ Transport Protocol"&gt;HTTP&lt;/abbr&gt; today.&lt;/p&gt;</pre>
<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 any ancestors of the node,
including the <a href=#root-element>root element</a>, but there is a
<p>If none of the node's ancestors, including the <a href=#root-element>root
element</a>, have either attribute set, but there is a
<a href=#pragma-set-default-language>pragma-set default language</a> set, then that is the
language of the node.</p>

<p>If there is no <a href=#pragma-set-default-language>pragma-set default language</a>, 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, and in cases where the higher-level
protocol reports multiple languages, the language of the node is
unknown (the empty string).</p>
language of the node. If there is no <a href=#pragma-set-default-language>pragma-set default
language</a> set, then language information from a higher-level
protocol (such as HTTP), if any, must be used as the final fallback
language instead. In the absence of any such language information,
and in cases where the higher-level protocol reports multiple
languages, the language of the node is unknown, and the
corresponding language code is the empty string.</p>

<p>If the resulting value is not a recognized language code, then it
must be treated as an unknown language having the given language
Expand All @@ -8841,6 +8841,10 @@ Transport Protocol"&gt;HTTP&lt;/abbr&gt; today.&lt;/p&gt;</pre>
"xyzzy", even if it knew it was invalid, just in case the screen
reader actually supported a language with that code after all.</p>

<p>If the resulting value is the empty string, then it must be
interpreted as meaning that the language of the node is explicitly
unknown.</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
Expand All @@ -8855,6 +8859,7 @@ Transport Protocol"&gt;HTTP&lt;/abbr&gt; today.&lt;/p&gt;</pre>
</div>



<h5 id=the-xml:base-attribute-(xml-only)><span class=secno>3.2.3.4 </span>The <dfn title=attr-xml-base><code>xml:base</code></dfn>
attribute (XML only)</h5>

Expand Down
27 changes: 16 additions & 11 deletions source
Expand Up @@ -8889,7 +8889,8 @@ Transport Protocol">HTTP&lt;/abbr> today.&lt;/p></pre>
<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>
attribute specifies the language of the node (regardless of its
value).</p>

<p>If both the <code title="attr-lang">lang</code> attribute in no
namespace and the <span title="attr-xml-lang"><code
Expand All @@ -8901,17 +8902,16 @@ Transport Protocol">HTTP&lt;/abbr> today.&lt;/p></pre>
<span title="ignore">ignored</span> for the purposes of determining
the element's language.</p>

<p>If no explicit language is given for any ancestors of the node,
including the <span>root element</span>, but there is a
<p>If none of the node's ancestors, including the <span>root
element</span>, have either attribute set, but there is a
<span>pragma-set default language</span> set, then that is the
language of the node.</p>

<p>If there is no <span>pragma-set 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, and in cases where the higher-level
protocol reports multiple languages, the language of the node is
unknown (the empty string).</p>
language of the node. If there is no <span>pragma-set default
language</span> set, then language information from a higher-level
protocol (such as HTTP), if any, must be used as the final fallback
language instead. In the absence of any such language information,
and in cases where the higher-level protocol reports multiple
languages, the language of the node is unknown, and the
corresponding language code is the empty string.</p>

<p>If the resulting value is not a recognized language code, then it
must be treated as an unknown language having the given language
Expand All @@ -8930,6 +8930,10 @@ Transport Protocol">HTTP&lt;/abbr> today.&lt;/p></pre>
"xyzzy", even if it knew it was invalid, just in case the screen
reader actually supported a language with that code after all.</p>

<p>If the resulting value is the empty string, then it must be
interpreted as meaning that the language of the node is explicitly
unknown.</p>

<hr>

<p>User agents may use the element's language to determine proper
Expand All @@ -8948,6 +8952,7 @@ Transport Protocol">HTTP&lt;/abbr> today.&lt;/p></pre>
</div>



<h5>The <dfn title="attr-xml-base"><code>xml:base</code></dfn>
attribute (XML only)</h5>

Expand Down

0 comments on commit 220494a

Please sign in to comment.