[html5] r6754 - [e] (0) Try to clarify that global HTML attributes aren't global across other na [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Oct 25 12:19:03 PDT 2011


Author: ianh
Date: 2011-10-25 12:18:58 -0700 (Tue, 25 Oct 2011)
New Revision: 6754

Modified:
   complete.html
   index
   source
Log:
[e] (0) Try to clarify that global HTML attributes aren't global across other namespaces without having to litter '...and is an HTML element' all over the spec.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=14039

Modified: complete.html
===================================================================
--- complete.html	2011-10-25 18:40:16 UTC (rev 6753)
+++ complete.html	2011-10-25 19:18:58 UTC (rev 6754)
@@ -814,7 +814,8 @@
      <li><a href=#items><span class=secno>5.2.2 </span>Items</a></li>
      <li><a href=#names:-the-itemprop-attribute><span class=secno>5.2.3 </span>Names: the <code>itemprop</code> attribute</a></li>
      <li><a href=#values><span class=secno>5.2.4 </span>Values</a></li>
-     <li><a href=#associating-names-with-items><span class=secno>5.2.5 </span>Associating names with items</a></ol></li>
+     <li><a href=#associating-names-with-items><span class=secno>5.2.5 </span>Associating names with items</a></li>
+     <li><a href=#microdata-and-other-namespaces><span class=secno>5.2.6 </span>Microdata and other namespaces</a></ol></li>
    <li><a href=#microdata-dom-api><span class=secno>5.3 </span>Microdata DOM API</a></li>
    <li><a href=#mdvocabs><span class=secno>5.4 </span>Microdata vocabularies</a>
     <ol>
@@ -10390,7 +10391,34 @@
    <li><code title=attr-style><a href=#the-style-attribute>style</a></code></li>
    <li><code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code></li>
    <li><code title=attr-title><a href=#the-title-attribute>title</a></code></li>
-  </ul><hr><p>The following <a href=#event-handler-content-attributes>event handler content attributes</a> may
+  </ul><div class=impl>
+
+  <p>These attributes are only defined by this specification as
+  attributes for <a href=#html-elements>HTML elements</a>. When this specification
+  refers to elements having these attributes, elements from namespaces
+  that are not defined as having these attributes must not be
+  considered as being elements with these attributes.</p>
+
+  <div class=example>
+
+   <p>For example, in the following XML fragment, the "<code title="">bogus</code>" element does not have a <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute as defined in this
+   specification, despite having an attribute with the literal name
+   "<code title="">dir</code>". Thus, <a href=#the-directionality>the directionality</a>
+   of the inner-most <code><a href=#the-span-element>span</a></code> element is '<a href=#concept-rtl title=concept-rtl>rtl</a>', inherited from the
+   <code><a href=#the-div-element>div</a></code> element indirectly through the "<code title="">bogus</code>" element.</p>
+
+   <pre class=bad><div xmlns="http://www.w3.org/1999/html" dir="rtl">
+ <bogus xmlns="http://example.net/ns" dir="ltr">
+  <span xmlns="http://www.w3.org/1999/html">
+  </span>
+ </bogus>
+</div></pre>
+
+  </div>
+
+  </div>
+
+  <hr><p>The following <a href=#event-handler-content-attributes>event handler content attributes</a> may
   be specified on any <a href=#html-elements title="HTML elements">HTML
   element</a>:</p>
 
@@ -58316,7 +58344,26 @@
 
 
 
+  <h4 id=microdata-and-other-namespaces><span class=secno>5.2.6 </span>Microdata and other namespaces</h4>
 
+  <p>Currently, the <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code>,
+  <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code>, and other microdata
+  attributes are only defined for <a href=#html-elements>HTML elements</a>. This
+  means that attributes with the literal names "<code title="">itemscope</code>", "<code title="">itemprop</code>", etc,
+  do not cause microdata processing to occur on elements in other
+  namespaces, such as SVG.</p>
+
+  <div class=example>
+
+   <p>Thus, in the following example there is only one item, not
+   two.</p>
+
+   <pre class=bad><p itemscope></p> <!-- this is an item (with no properties and no type) -->
+<svg itemscope></svg> <!-- this is not, it's just an <code><a href=#svg>svg</a></code> element with an invalid unknown attribute --></pre>
+
+  </div>
+
+
   <h3 id=microdata-dom-api><span class=secno>5.3 </span>Microdata DOM API</h3>
 
 

Modified: index
===================================================================
--- index	2011-10-25 18:40:16 UTC (rev 6753)
+++ index	2011-10-25 19:18:58 UTC (rev 6754)
@@ -814,7 +814,8 @@
      <li><a href=#items><span class=secno>5.2.2 </span>Items</a></li>
      <li><a href=#names:-the-itemprop-attribute><span class=secno>5.2.3 </span>Names: the <code>itemprop</code> attribute</a></li>
      <li><a href=#values><span class=secno>5.2.4 </span>Values</a></li>
-     <li><a href=#associating-names-with-items><span class=secno>5.2.5 </span>Associating names with items</a></ol></li>
+     <li><a href=#associating-names-with-items><span class=secno>5.2.5 </span>Associating names with items</a></li>
+     <li><a href=#microdata-and-other-namespaces><span class=secno>5.2.6 </span>Microdata and other namespaces</a></ol></li>
    <li><a href=#microdata-dom-api><span class=secno>5.3 </span>Microdata DOM API</a></li>
    <li><a href=#mdvocabs><span class=secno>5.4 </span>Microdata vocabularies</a>
     <ol>
@@ -10390,7 +10391,34 @@
    <li><code title=attr-style><a href=#the-style-attribute>style</a></code></li>
    <li><code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code></li>
    <li><code title=attr-title><a href=#the-title-attribute>title</a></code></li>
-  </ul><hr><p>The following <a href=#event-handler-content-attributes>event handler content attributes</a> may
+  </ul><div class=impl>
+
+  <p>These attributes are only defined by this specification as
+  attributes for <a href=#html-elements>HTML elements</a>. When this specification
+  refers to elements having these attributes, elements from namespaces
+  that are not defined as having these attributes must not be
+  considered as being elements with these attributes.</p>
+
+  <div class=example>
+
+   <p>For example, in the following XML fragment, the "<code title="">bogus</code>" element does not have a <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute as defined in this
+   specification, despite having an attribute with the literal name
+   "<code title="">dir</code>". Thus, <a href=#the-directionality>the directionality</a>
+   of the inner-most <code><a href=#the-span-element>span</a></code> element is '<a href=#concept-rtl title=concept-rtl>rtl</a>', inherited from the
+   <code><a href=#the-div-element>div</a></code> element indirectly through the "<code title="">bogus</code>" element.</p>
+
+   <pre class=bad><div xmlns="http://www.w3.org/1999/html" dir="rtl">
+ <bogus xmlns="http://example.net/ns" dir="ltr">
+  <span xmlns="http://www.w3.org/1999/html">
+  </span>
+ </bogus>
+</div></pre>
+
+  </div>
+
+  </div>
+
+  <hr><p>The following <a href=#event-handler-content-attributes>event handler content attributes</a> may
   be specified on any <a href=#html-elements title="HTML elements">HTML
   element</a>:</p>
 
@@ -58316,7 +58344,26 @@
 
 
 
+  <h4 id=microdata-and-other-namespaces><span class=secno>5.2.6 </span>Microdata and other namespaces</h4>
 
+  <p>Currently, the <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code>,
+  <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code>, and other microdata
+  attributes are only defined for <a href=#html-elements>HTML elements</a>. This
+  means that attributes with the literal names "<code title="">itemscope</code>", "<code title="">itemprop</code>", etc,
+  do not cause microdata processing to occur on elements in other
+  namespaces, such as SVG.</p>
+
+  <div class=example>
+
+   <p>Thus, in the following example there is only one item, not
+   two.</p>
+
+   <pre class=bad><p itemscope></p> <!-- this is an item (with no properties and no type) -->
+<svg itemscope></svg> <!-- this is not, it's just an <code><a href=#svg>svg</a></code> element with an invalid unknown attribute --></pre>
+
+  </div>
+
+
   <h3 id=microdata-dom-api><span class=secno>5.3 </span>Microdata DOM API</h3>
 
 

Modified: source
===================================================================
--- source	2011-10-25 18:40:16 UTC (rev 6753)
+++ source	2011-10-25 19:18:58 UTC (rev 6754)
@@ -10592,6 +10592,37 @@
    <li><code title="attr-title">title</code></li>
   </ul>
 
+  <div class="impl">
+
+  <p>These attributes are only defined by this specification as
+  attributes for <span>HTML elements</span>. When this specification
+  refers to elements having these attributes, elements from namespaces
+  that are not defined as having these attributes must not be
+  considered as being elements with these attributes.</p>
+
+  <div class="example">
+
+   <p>For example, in the following XML fragment, the "<code
+   title="">bogus</code>" element does not have a <code
+   title="attr-dir">dir</code> attribute as defined in this
+   specification, despite having an attribute with the literal name
+   "<code title="">dir</code>". Thus, <span>the directionality</span>
+   of the inner-most <code>span</code> element is '<span
+   title="concept-rtl">rtl</span>', inherited from the
+   <code>div</code> element indirectly through the "<code
+   title="">bogus</code>" element.</p>
+
+   <pre class="bad"><div xmlns="http://www.w3.org/1999/html" dir="rtl">
+ <bogus xmlns="http://example.net/ns" dir="ltr">
+  <span xmlns="http://www.w3.org/1999/html">
+  </span>
+ </bogus>
+</div></pre>
+
+  </div>
+
+  </div>
+
   <hr>
 
   <p>The following <span>event handler content attributes</span> may
@@ -65768,7 +65799,27 @@
 <!--START w3c-html-->
 
 
+  <h4>Microdata and other namespaces</h4>
 
+  <p>Currently, the <code title="attr-itemscope">itemscope</code>,
+  <code title="attr-itemprop">itemprop</code>, and other microdata
+  attributes are only defined for <span>HTML elements</span>. This
+  means that attributes with the literal names "<code
+  title="">itemscope</code>", "<code title="">itemprop</code>", etc,
+  do not cause microdata processing to occur on elements in other
+  namespaces, such as SVG.</p>
+
+  <div class="example">
+
+   <p>Thus, in the following example there is only one item, not
+   two.</p>
+
+   <pre class="bad"><p itemscope></p> <!-- this is an item (with no properties and no type) -->
+<svg itemscope></svg> <!-- this is not, it's just an <code>svg</code> element with an invalid unknown attribute --></pre>
+
+  </div>
+
+
   <h3>Microdata DOM API</h3>
 
 <!--END html--><!--END dev-html--><!--END complete--><!--END epub--><!--MD-->




More information about the Commit-Watchers mailing list