NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 290 - Allow lang='' and xml:lang='' to be specified together in XML, if they are the same.
Allow lang='' and xml:lang='' to be specified together in XML, if they are th...
Status: RESOLVED FIXED
Product: Validator.nu
Classification: Unclassified
Component: HTML5 schema
HEAD
All All
: P2 normal
Assigned To: Henri Sivonen
http://svn.whatwg.org/webapps/source?...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-21 15:43 CEST by Henri Sivonen
Modified: 2008-08-21 15:50 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henri Sivonen 2008-08-21 15:43:20 CEST
Index: source
===================================================================
--- source	(revision 2061)
+++ source	(revision 2062)
@@ -5785,9 +5785,9 @@
   content attribute.</p>
 
 
-  <h5>The <dfn title="attr-lang"><code>lang</code></dfn> (HTML only)
-  and <dfn title="attr-xml-lang"><code>xml:lang</code></dfn> (XML
-  only) attributes</h5>
+  <h5>The <dfn title="attr-lang"><code>lang</code></dfn> and <dfn
+  title="attr-xml-lang"><code>xml:lang</code></dfn> (XML only)
+  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
@@ -5807,15 +5807,19 @@
   that the primary language is unknown.</p>
 
   <p>The <code title="attr-lang">lang</code> attribute may be used on
-  elements of <span>HTML documents</span>.  Authors must not use the
-  <code title="attr-lang">lang</code> attribute in <span>XML
-  documents</span>.</p>
+  any <span title="HTML elements">HTML element</span>.</p>
 
   <p>The <code title="attr-xml-lang">xml:lang</code> attribute may be
-  used on elements of <span>XML documents</span>.  Authors must not
-  use the <code title="attr-xml-lang">xml:lang</code> attribute in
-  <span>HTML documents</span>.</p> <!-- technically this is redundant
-  with the XML spec -->
+  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). Authors must not use the <code
+  title="attr-xml-lang">xml:lang</code> attribute in <span>HTML
+  documents</span>. 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.</p>
 
   <hr>