[html5] r6388 - [ac] (1) Disallow <link> from having both rel='' and itemprop=''. This might cha [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Aug 9 13:09:00 PDT 2011


Author: ianh
Date: 2011-08-09 13:08:59 -0700 (Tue, 09 Aug 2011)
New Revision: 6388

Modified:
   complete.html
   index
   source
Log:
[ac] (1) Disallow <link> from having both rel='' and itemprop=''. This might change back if there are compelling use cases, but in the meantime it seems like this is likely to catch errors. This also effectively disallows rel='' on <link>s in <body>.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=12678

Modified: complete.html
===================================================================
--- complete.html	2011-08-08 22:00:07 UTC (rev 6387)
+++ complete.html	2011-08-09 20:08:59 UTC (rev 6388)
@@ -239,7 +239,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1>Web Applications 1.0</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 8 August 2011</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 9 August 2011</h2>
    </hgroup><dl><dt>Multiple-page version:</dt>
     <dd><a href=http://www.whatwg.org/specs/web-apps/current-work/complete/>http://www.whatwg.org/specs/web-apps/current-work/complete/</a></dd>
     <dt>One-page version:</dt>
@@ -13615,8 +13615,16 @@
   element does not define a link.</span></p>
 
 <!--MD-->
-  <p>A <code><a href=#the-link-element>link</a></code> element must have either a <code title=attr-link-rel><a href=#attr-link-rel>rel</a></code> attribute, or an <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute, or both.</p>
+  <p>A <code><a href=#the-link-element>link</a></code> element must have either a <code title=attr-link-rel><a href=#attr-link-rel>rel</a></code> attribute or an <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute, but not both.</p>
 
+  <p class=note>If the <code title=attr-link-rel><a href=#attr-link-rel>rel</a></code>
+  attribute is used, the element is restricted to the
+  <code><a href=#the-head-element>head</a></code> element. When used with the <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute, the element can be
+  used both in the <code><a href=#the-head-element>head</a></code> element and in the
+  <code><a href=#the-body-element>body</a></code> of the page, subject to the constraints of the
+  microdata model.</p>
+
+
   <p>The types of link indicated (the relationships) are given by the
   value of the <dfn id=attr-link-rel title=attr-link-rel><code>rel</code></dfn>
   attribute, which, if present, must have a value that is a <a href=#set-of-space-separated-tokens>set

Modified: index
===================================================================
--- index	2011-08-08 22:00:07 UTC (rev 6387)
+++ index	2011-08-09 20:08:59 UTC (rev 6388)
@@ -243,7 +243,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 8 August 2011</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 9 August 2011</h2>
    </hgroup><dl><dt><strong>Web developer edition</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -13479,8 +13479,16 @@
   element does not define a link.</span></p>
 
 <!--MD-->
-  <p>A <code><a href=#the-link-element>link</a></code> element must have either a <code title=attr-link-rel><a href=#attr-link-rel>rel</a></code> attribute, or an <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute, or both.</p>
+  <p>A <code><a href=#the-link-element>link</a></code> element must have either a <code title=attr-link-rel><a href=#attr-link-rel>rel</a></code> attribute or an <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute, but not both.</p>
 
+  <p class=note>If the <code title=attr-link-rel><a href=#attr-link-rel>rel</a></code>
+  attribute is used, the element is restricted to the
+  <code><a href=#the-head-element>head</a></code> element. When used with the <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute, the element can be
+  used both in the <code><a href=#the-head-element>head</a></code> element and in the
+  <code><a href=#the-body-element>body</a></code> of the page, subject to the constraints of the
+  microdata model.</p>
+
+
   <p>The types of link indicated (the relationships) are given by the
   value of the <dfn id=attr-link-rel title=attr-link-rel><code>rel</code></dfn>
   attribute, which, if present, must have a value that is a <a href=#set-of-space-separated-tokens>set

Modified: source
===================================================================
--- source	2011-08-08 22:00:07 UTC (rev 6387)
+++ source	2011-08-09 20:08:59 UTC (rev 6388)
@@ -14267,8 +14267,17 @@
 
 <!--END w3c-html--><!--MD-->
   <p>A <code>link</code> element must have either a <code
-  title="attr-link-rel">rel</code> attribute, or an <code
-  title="attr-itemprop">itemprop</code> attribute, or both.</p>
+  title="attr-link-rel">rel</code> attribute or an <code
+  title="attr-itemprop">itemprop</code> attribute, but not both.</p>
+
+  <p class="note">If the <code title="attr-link-rel">rel</code>
+  attribute is used, the element is restricted to the
+  <code>head</code> element. When used with the <code
+  title="attr-itemprop">itemprop</code> attribute, the element can be
+  used both in the <code>head</code> element and in the
+  <code>body</code> of the page, subject to the constraints of the
+  microdata model.</p>
+
 <!--START w3c-html--><!--MD--><!--END html--><!--END dev-html--><!--END complete--><!--END epub--><!--MD-->
   <p>A <code>link</code> element must have <code
   title="attr-link-rel">rel</code> attribute.</p>




More information about the Commit-Watchers mailing list