[html5] r4273 - [act] (0) Change <itemref> to itemref='', to simplify processing.
whatwg at whatwg.org
whatwg at whatwg.org
Thu Oct 22 16:27:36 PDT 2009
Author: ianh
Date: 2009-10-22 16:27:32 -0700 (Thu, 22 Oct 2009)
New Revision: 4273
Modified:
complete.html
index
source
Log:
[act] (0) Change <itemref> to itemref='', to simplify processing.
Modified: complete.html
===================================================================
--- complete.html 2009-10-22 12:43:26 UTC (rev 4272)
+++ complete.html 2009-10-22 23:27:32 UTC (rev 4273)
@@ -352,9 +352,8 @@
<li><a href=#pragma-directives><span class=secno>4.2.5.3 </span>Pragma directives</a></li>
<li><a href=#other-pragma-directives><span class=secno>4.2.5.4 </span>Other pragma directives</a></li>
<li><a href=#charset><span class=secno>4.2.5.5 </span>Specifying the document's character encoding</a></ol></li>
- <li><a href=#itemref><span class=secno>4.2.6 </span>The <code>itemref</code> element</a></li>
- <li><a href=#the-style-element><span class=secno>4.2.7 </span>The <code>style</code> element</a></li>
- <li><a href=#styling><span class=secno>4.2.8 </span>Styling</a></ol></li>
+ <li><a href=#the-style-element><span class=secno>4.2.6 </span>The <code>style</code> element</a></li>
+ <li><a href=#styling><span class=secno>4.2.7 </span>Styling</a></ol></li>
<li><a href=#scripting-1><span class=secno>4.3 </span>Scripting</a>
<ol>
<li><a href=#script><span class=secno>4.3.1 </span>The <code>script</code> element</a>
@@ -7779,6 +7778,7 @@
attribute boolean <a href=#dom-itemscope title=dom-itemScope>itemScope</a>;
attribute DOMString <a href=#dom-itemtype title=dom-itemType>itemType</a>;
attribute DOMString <a href=#dom-itemid title=dom-itemId>itemId</a>;
+ attribute DOMString <a href=#dom-itemref title=dom-itemRef>itemRef</a>;
[PutForwards=<a href=#dom-domsettabletokenlist-value title=dom-DOMSettableTokenList-value>value</a>] readonly attribute <a href=#domsettabletokenlist>DOMSettableTokenList</a> <a href=#dom-itemprop title=dom-itemProp>itemProp</a>;
readonly attribute <a href=#htmlpropertycollection>HTMLPropertyCollection</a> <a href=#dom-properties title=dom-properties>properties</a>;
attribute any <a href=#dom-itemvalue title=dom-itemValue>itemValue</a>;
@@ -7902,6 +7902,7 @@
<li><code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code></li>
<li><code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code></li>
<li><code title=attr-itemtype><a href=#attr-itemtype>itemtype</a></code></li>
+ <li><code title=attr-itemref><a href=#attr-itemref>itemref</a></code></li>
<li><code title=attr-lang><a href=#attr-lang>lang</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>
@@ -11924,52 +11925,10 @@
</div>
+ <h4 id=the-style-element><span class=secno>4.2.6 </span>The <dfn><code>style</code></dfn> element</h4>
- <h4 id=itemref><span class=secno>4.2.6 </span>The <dfn><code>itemref</code></dfn> element</h4>
-
<dl class=element><dt>Categories</dt>
<dd><a href=#metadata-content>Metadata content</a>.</dd>
- <dd><a href=#flow-content>Flow content</a>.</dd>
- <dd><a href=#phrasing-content>Phrasing content</a>.</dd>
- <dt>Contexts in which this element may be used:</dt>
- <dd>Where <a href=#metadata-content>metadata content</a> is expected.</dd>
- <dd>Where <a href=#phrasing-content>phrasing content</a> is expected.</dd>
- <dt>Content model:</dt>
- <dd>Empty.</dd>
- <dt>Content attributes:</dt>
- <dd><a href=#global-attributes>Global attributes</a></dd>
- <dd><code title=attr-itemref-refid><a href=#attr-itemref-refid>refid</a></code></dd>
- <dt>DOM interface:</dt>
- <dd>
-<pre class=idl>interface <dfn id=htmlitemrefelement>HTMLItemRefElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
- attribute DOMString <a href=#dom-itemref-refid title=dom-itemref-refId>refId</a>;
-};</pre>
- </dd>
- </dl><p>The <code><a href=#itemref>itemref</a></code> element is used to include by reference
- properties defined (using <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code>) by elements that are not
- descendants of the <code><a href=#itemref>itemref</a></code> element's nearest ancestor
- with an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute.</p>
-
- <p>The <dfn id=attr-itemref-refid title=attr-itemref-refid><code>refid</code></dfn>
- attribute is required, and its value must be the ID of an element in
- the same <code>Document</code> as the <code><a href=#itemref>itemref</a></code>
- element.</p>
-
- <p class=note>This element is described in more detail as part of
- the <a href=#microdata>microdata</a> model.</p>
-
- <div class=impl>
-
- <p>The <dfn id=dom-itemref-refid title=dom-itemref-refId><code>refId</code></dfn> IDL
- attribute must <a href=#reflect>reflect</a> the <code title=attr-itemref-refid><a href=#attr-itemref-refid>refid</a></code> content attribute.</p>
-
- </div>
-
-
- <h4 id=the-style-element><span class=secno>4.2.7 </span>The <dfn><code>style</code></dfn> element</h4>
-
- <dl class=element><dt>Categories</dt>
- <dd><a href=#metadata-content>Metadata content</a>.</dd>
<dd>If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is present: <a href=#flow-content>flow content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is absent: where <a href=#metadata-content>metadata content</a> is expected.</dd>
@@ -12158,7 +12117,7 @@
- <h4 id=styling><span class=secno>4.2.8 </span><dfn title="styling processing model">Styling</dfn></h4>
+ <h4 id=styling><span class=secno>4.2.7 </span><dfn title="styling processing model">Styling</dfn></h4>
<p>The <code><a href=#the-link-element>link</a></code> and <code><a href=#the-style-element>style</a></code> elements can provide
styling information for the user agent to use when rendering the
@@ -44476,19 +44435,18 @@
</div>
<p>Properties that are not descendants of the element with the <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute can be associated
- with the <a href=#concept-item title=concept-item>item</a> using the
- <code><a href=#itemref>itemref</a></code> element, whose <code title=attr-itemref-refid><a href=#attr-itemref-refid>refid</a></code> attribute takes the ID of an
- element with the <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code>
- attribute or an ancestor of such an element.</p>
+ with the <a href=#concept-item title=concept-item>item</a> using the <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute. This attribute takes
+ a list of IDs of elements to crawl in addition to crawling the
+ children of the element with the <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute.</p>
<div class=example>
<p>This example is the same as the previous one, but all the
properties are separated from their <a href=#concept-item title=concept-item>items</a>:</p>
- <pre><div itemscope id="amanda"><itemref refid="a"><itemref refid="b"></div>
+ <pre><div itemscope id="amanda" itemref="a b"></div>
<p id="a">Name: <span itemprop="name">Amanda</span></p>
-<div id="b" itemprop="band" itemscope><itemref refid="c"></div>
+<div id="b" itemprop="band" itemscope itemref="c"></div>
<div id="c">
<p>Band: <span itemprop="name">Jazz Band</span></p>
<p>Size: <span itemprop="size">12</span> players</p>
@@ -44900,19 +44858,14 @@
<h4 id=items><span class=secno>5.2.2 </span>Items</h4>
- <p>Every <a href=#html-elements title="HTML elements">HTML element</a> except the
- <code><a href=#itemref>itemref</a></code> element may have an <dfn id=attr-itemscope title=attr-itemscope><code>itemscope</code></dfn> attribute
+ <p>Every <a href=#html-elements title="HTML elements">HTML element</a> may have an
+ <dfn id=attr-itemscope title=attr-itemscope><code>itemscope</code></dfn> attribute
specified. The <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code>
attribute is a <a href=#boolean-attribute>boolean attribute</a>.</p>
<p>An element with the <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code>
- attribute specified, and that is not an <code><a href=#itemref>itemref</a></code>
- element, creates a new <dfn id=concept-item title=concept-item>item</dfn>, a group
- of name-value pairs.</p>
+ attribute specified creates a new <dfn id=concept-item title=concept-item>item</dfn>, a group of name-value pairs.</p>
- <p>The <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute must
- not be specified on <code><a href=#itemref>itemref</a></code> elements.</p>
-
<hr><p>Elements with an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code>
attribute may have an <dfn id=attr-itemtype title=attr-itemtype><code>itemtype</code></dfn> attribute
specified, to give the <a href=#item-type>item type</a> of the <a href=#concept-item title=concept-item>item</a>.</p>
@@ -44959,7 +44912,21 @@
vocabulary that does not <a href=#support-global-identifiers-for-items>support global identifiers for
items</a>, as defined by that vocabulary's specification.</p>
+ <hr><p>Elements with an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code>
+ attribute may have an <dfn id=attr-itemref title=attr-itemref><code>itemref</code></dfn> attribute specified,
+ to give a list of additional elements to crawl to find the
+ name-value pairs of the <a href=#concept-item title=concept-item>item</a>.</p>
+ <p>The <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute, if
+ specified, must have a value that is an <a href=#unordered-set-of-unique-space-separated-tokens>unordered set of
+ unique space-separated tokens</a> consisting of <a href=#concept-id title=concept-ID>IDs</a> of elements in the same document; for
+ each one, the element's nearest ancestor element with an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute specified, if any,
+ must not be the element with the referencing <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute specified.</p>
+
+ <p>The <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute must not
+ be specified on elements that do not have an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute specified.</p>
+
+
<h4 id=names:-the-itemprop-attribute><span class=secno>5.2.3 </span>Names: the <dfn title=attr-itemprop><code>itemprop</code></dfn> attribute</h4>
<p>Every <a href=#html-elements title="HTML elements">HTML element</a> may have an
@@ -45047,8 +45014,7 @@
<p>And the following:</p>
- <pre><div itemscope>
- <itemref refid="x">
+ <pre><div itemscope itemref="x">
<p itemprop="b">test</p>
<p itemprop="a">2</p>
</div>
@@ -45134,14 +45100,12 @@
element</a>.</p>
-
<h4 id=associating-names-with-items><span class=secno>5.2.5 </span>Associating names with items</h4>
<p>To find <dfn id=the-properties-of-an-item>the properties of an item</dfn>, the user agent must
run the following steps:</p>
- <ol><li><p>Let <var title="">root</var> be the element with the <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute. This element
- cannot be an <code><a href=#itemref>itemref</a></code> element.</li>
+ <ol><li><p>Let <var title="">root</var> be the element with the <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute.</li>
<li><p>Let <var title="">queue</var> be a stack of elements
initially containing the child elements of <var title="">root</var>, if any, in <a href=#tree-order>tree order</a> (so that
@@ -45153,54 +45117,55 @@
elements. This list will be the result of the algorithm: a list of
elements with properties that apply to <var title="">root</var>.</li>
- <li><p>Let <var title="">visited nodes</var> be a list of elements
- containing just <var title="">root</var>. This list is used to
- avoid loops caused by <code><a href=#itemref>itemref</a></code> elements.</li>
+ <li><p>If <var title="">root</var> has an <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute, <a href=#split-a-string-on-spaces title="split a
+ string on spaces">split the value of that <code title=attr-itemref>itemref</code> attribute on spaces</a>. For
+ each resulting token, <var title="">ID</var>, if there is an
+ element in the document with the <a href=#concept-id title=concept-ID>ID</a>
+ <var title="">ID</var>, then push the first such element onto <var title="">queue</var>.</li>
- <li><p>Let <var title="">error found</var> be false. If it is set
- to true by the algorithm below, then an <code><a href=#itemref>itemref</a></code> error
- has been found.</li>
+ <li>
+ <p>For each element <var title="">candidate</var> in <var title="">queue</var>, run the following substeps:</p>
+
+ <ol><li><p>Let <var title="">scope</var> be <var title="">candidate</var>'s nearest ancestor element with an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute
+ specified.</li>
+
+ <li><p>If one of the other elements in <var title="">queue</var>
+ is also <var title="">candidate</var>, then remove <var title="">candidate</var> from <var title="">queue</var>
+ (i.e. remove duplicates).</li>
+
+ <li><p>Otherwise, if one of the other elements in <var title="">queue</var> is an ancestor element of <var title="">candidate</var>, and that element is <var title="">scope</var>, then remove <var title="">candidate</var>
+ from <var title="">queue</var>.</li>
+
+ <li><p>Otherwise, if one of the other elements in <var title="">queue</var> is an ancestor element of <var title="">candidate</var>, and that element also has <var title="">scope</var> as its nearest ancestor element with an
+ <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute
+ specified, then remove <var title="">candidate</var> from <var title="">queue</var>.</li>
+
+ </ol></li>
+
+ <li><p>Sort <var title="">queue</var> in <a href=#tree-order>tree
+ order</a>.</li>
+
<li><p><i>Loop</i>: Pop the top element from <var title="">queue</var> and let <var title="">current</var> be that
element.</li>
- <li><p>If <var title="">current</var> is already in <var title="">visited nodes</var> then let <var title="">error
- found</var> be true, and skip down to the step marked <i>end of
- loop</i>.</li>
-
<li><p>If <var title="">current</var> has an <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute, then append <var title="">current</var> to <var title="">properties</var>.</li>
- <li><p>Append <var title="">current</var> to <var title="">visited
- nodes</var>.</li>
-
- <li><p>If <var title="">current</var> is an <code><a href=#itemref>itemref</a></code>
- element with a <code title=attr-itemref-refid><a href=#attr-itemref-refid>refid</a></code>
- attribute, and there is an element in the document whose <a href=#concept-id title=concept-id>ID</a> matches the value of <var title="">current</var>'s <code title=attr-itemref-refid><a href=#attr-itemref-refid>refid</a></code> attribute, then push the
- first element in the document whose <a href=#concept-id title=concept-id>ID</a> matches the value of <var title="">current</var>'s <code title=attr-itemref-refid><a href=#attr-itemref-refid>refid</a></code> attribute onto <var title="">queue</var> (so that it will be the next element to be
+ <li><p>If <var title="">current</var> does not have an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute, and <var title="">current</var> is an element with child elements, then:
+ push all the child elements of <var title="">current</var> onto
+ <var title="">queue</var>, in <a href=#tree-order>tree order</a> (so the first
+ child of <var title="">current</var> will be the next element to be
popped from <var title="">queue</var>).</li>
- <li><p>Otherwise, if <var title="">current</var> is not an
- <code><a href=#itemref>itemref</a></code> element, and <var title="">current</var> does
- not have an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code>
- attribute, and <var title="">current</var> is an element with child
- elements, then: push all the child elements of <var title="">current</var> onto <var title="">queue</var>, in
- <a href=#tree-order>tree order</a> (so the first child of <var title="">current</var> will be the next element to be popped from
- <var title="">queue</var>).</li>
-
<li><p><i>End of loop</i>: If <var title="">queue</var> is not
empty, return to the step marked <i>loop</i>.</li>
<li><p>Return <var title="">properties</var>. That is the list of
<a href=#the-properties-of-an-item title="the properties of an item">properties of the
- item</a> <var title="">root</var>.</li>
+ item</a> <var title="">root</var>. By definition, this list is
+ in <a href=#tree-order>tree order</a>.</li>
- </ol><p>A document must not contain any <code><a href=#itemref>itemref</a></code> elements
- that would cause the <var title="">error found</var> flag in the
- algorithm above to be set to true if the <a href=#the-properties-of-an-item title="the properties
- of an item">properties</a> of all the <a href=#concept-item title=concept-item>items</a> in that document were to be
- determined.</p>
-
- <p>A document must not contain any elements that have an <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute that would not be
+ </ol><p>A document must not contain any elements that have an <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute that would not be
found to be a property of any of the <a href=#concept-item title=concept-item>items</a> in that document were their <a href=#the-properties-of-an-item title="the properties of an item">properties</a> all to be
determined.</p>
@@ -45208,7 +45173,6 @@
its element does not have an <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute.</p>
-
<h4 id=examples-1><span class=secno>5.2.6 </span>Examples</h4>
<p>Here is an example of some HTML using Microdata to express RDF
@@ -45316,7 +45280,8 @@
the <code title=attr-itemtype><a href=#attr-itemtype>itemtype</a></code> content attribute.
The <dfn id=dom-itemid title=dom-itemId><code>itemId</code></dfn> IDL attribute
on <a href=#html-elements>HTML elements</a> must <a href=#reflect>reflect</a> the <code title=attr-itemid><a href=#attr-itemid>itemid</a></code> content attribute. The <dfn id=dom-itemprop title=dom-itemProp><code>itemProp</code></dfn> IDL attribute on
- <a href=#html-elements>HTML elements</a> must <a href=#reflect>reflect</a> the <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> content attribute.</p>
+ <a href=#html-elements>HTML elements</a> must <a href=#reflect>reflect</a> the <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> content attribute. The <dfn id=dom-itemref title=dom-itemRef><code>itemRef</code></dfn> IDL attribute on
+ <a href=#html-elements>HTML elements</a> must <a href=#reflect>reflect</a> the <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> content attribute.</p>
<p>The <dfn id=dom-properties title=dom-properties><code>properties</code></dfn> IDL
attribute on <a href=#html-elements>HTML elements</a> must return an
@@ -84279,17 +84244,6 @@
<code title=attr-mod-cite><a href=#attr-mod-cite>cite</a></code>;
<code title=attr-mod-datetime><a href=#attr-mod-datetime>datetime</a></code></td>
<td><code><a href=#htmlmodelement>HTMLModElement</a></code></td>
- <tr><th><code><a href=#itemref>itemref</a></code></th>
- <td>Inclusion mechanism to reference microdata properties in other parts of the document</td>
- <td><a href=#metadata-content title="Metadata content">metadata</a>;
- <a href=#flow-content title="Flow content">flow</a>;
- <a href=#phrasing-content title="Phrasing content">phrasing</a></td>
- <td><code><a href=#the-head-element-0>head</a></code>;
- <a href=#phrasing-content title="Phrasing content">phrasing</a></td>
- <td>empty
- <td><a href=#global-attributes title="global attributes">globals</a>;
- <code title=attr-itemref-refid><a href=#attr-itemref-refid>refid</a></code></td>
- <td><code><a href=#htmlitemrefelement>HTMLItemRefElement</a></code></td>
<tr><th><code><a href=#the-kbd-element>kbd</a></code></th>
<td>User input</td>
<td><a href=#flow-content title="Flow content">flow</a>;
@@ -85099,6 +85053,10 @@
<td> <a href=#names:-the-itemprop-attribute title=attr-itemprop>HTML elements</a>
<td> <a href=#property-names>Property names</a> of a microdata item
<td> <a href=#unordered-set-of-unique-space-separated-tokens>Unordered set of unique space-separated tokens</a> consisting of <a href=#absolute-url title="absolute URL">valid absolute URLs</a>, <a href=#defined-property-name title="defined property name">defined property names</a>, or text*
+ <tr><th> <code title="">itemref</code>
+ <td> <code title=attr-itemref><a href=#attr-itemref>itemref</a></code>
+ <td> Referenced elements
+ <td> <a href=#unordered-set-of-unique-space-separated-tokens>Unordered set of unique space-separated tokens</a> consisting of IDs*
<tr><th> <code title="">itemscope</code>
<td> <a href=#attr-itemscope title=attr-itemscope>HTML elements</a>
<td> Introduces a microdata item
@@ -85252,10 +85210,6 @@
<code title=attr-textarea-readonly><a href=#attr-textarea-readonly>textarea</a></code>
<td> Whether to allow the value to be edited by the user
<td> <a href=#boolean-attribute>Boolean attribute</a>
- <tr><th> <code title="">refid</code>
- <td> <code title=attr-itemref-refid><a href=#attr-itemref-refid>itemref</a></code>
- <td> Referenced element
- <td> ID*
<tr><th> <code title="">rel</code>
<td> <code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>a</a></code>;
<code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>area</a></code>;
@@ -86024,9 +85978,6 @@
<tr><td> <code><a href=#the-ins-element>ins</a></code>
<td> <code><a href=#htmlmodelement>HTMLModElement</a></code> : <code><a href=#htmlelement>HTMLElement</a></code>
- <tr><td> <code><a href=#itemref>itemref</a></code>
- <td> <code><a href=#htmlitemrefelement>HTMLItemRefElement</a></code> : <code><a href=#htmlelement>HTMLElement</a></code>
-
<tr><td> <code><a href=#the-kbd-element>kbd</a></code>
<td> <code><a href=#htmlelement>HTMLElement</a></code>
Modified: index
===================================================================
--- index 2009-10-22 12:43:26 UTC (rev 4272)
+++ index 2009-10-22 23:27:32 UTC (rev 4273)
@@ -342,9 +342,8 @@
<li><a href=#pragma-directives><span class=secno>4.2.5.3 </span>Pragma directives</a></li>
<li><a href=#other-pragma-directives><span class=secno>4.2.5.4 </span>Other pragma directives</a></li>
<li><a href=#charset><span class=secno>4.2.5.5 </span>Specifying the document's character encoding</a></ol></li>
- <li><a href=#itemref><span class=secno>4.2.6 </span>The <code>itemref</code> element</a></li>
- <li><a href=#the-style-element><span class=secno>4.2.7 </span>The <code>style</code> element</a></li>
- <li><a href=#styling><span class=secno>4.2.8 </span>Styling</a></ol></li>
+ <li><a href=#the-style-element><span class=secno>4.2.6 </span>The <code>style</code> element</a></li>
+ <li><a href=#styling><span class=secno>4.2.7 </span>Styling</a></ol></li>
<li><a href=#scripting-1><span class=secno>4.3 </span>Scripting</a>
<ol>
<li><a href=#script><span class=secno>4.3.1 </span>The <code>script</code> element</a>
@@ -7609,6 +7608,7 @@
attribute boolean <a href=#dom-itemscope title=dom-itemScope>itemScope</a>;
attribute DOMString <a href=#dom-itemtype title=dom-itemType>itemType</a>;
attribute DOMString <a href=#dom-itemid title=dom-itemId>itemId</a>;
+ attribute DOMString <a href=#dom-itemref title=dom-itemRef>itemRef</a>;
[PutForwards=<a href=#dom-domsettabletokenlist-value title=dom-DOMSettableTokenList-value>value</a>] readonly attribute <a href=#domsettabletokenlist>DOMSettableTokenList</a> <a href=#dom-itemprop title=dom-itemProp>itemProp</a>;
readonly attribute <a href=#htmlpropertycollection>HTMLPropertyCollection</a> <a href=#dom-properties title=dom-properties>properties</a>;
attribute any <a href=#dom-itemvalue title=dom-itemValue>itemValue</a>;
@@ -7732,6 +7732,7 @@
<li><code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code></li>
<li><code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code></li>
<li><code title=attr-itemtype><a href=#attr-itemtype>itemtype</a></code></li>
+ <li><code title=attr-itemref><a href=#attr-itemref>itemref</a></code></li>
<li><code title=attr-lang><a href=#attr-lang>lang</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>
@@ -11754,52 +11755,10 @@
</div>
+ <h4 id=the-style-element><span class=secno>4.2.6 </span>The <dfn><code>style</code></dfn> element</h4>
- <h4 id=itemref><span class=secno>4.2.6 </span>The <dfn><code>itemref</code></dfn> element</h4>
-
<dl class=element><dt>Categories</dt>
<dd><a href=#metadata-content>Metadata content</a>.</dd>
- <dd><a href=#flow-content>Flow content</a>.</dd>
- <dd><a href=#phrasing-content>Phrasing content</a>.</dd>
- <dt>Contexts in which this element may be used:</dt>
- <dd>Where <a href=#metadata-content>metadata content</a> is expected.</dd>
- <dd>Where <a href=#phrasing-content>phrasing content</a> is expected.</dd>
- <dt>Content model:</dt>
- <dd>Empty.</dd>
- <dt>Content attributes:</dt>
- <dd><a href=#global-attributes>Global attributes</a></dd>
- <dd><code title=attr-itemref-refid><a href=#attr-itemref-refid>refid</a></code></dd>
- <dt>DOM interface:</dt>
- <dd>
-<pre class=idl>interface <dfn id=htmlitemrefelement>HTMLItemRefElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
- attribute DOMString <a href=#dom-itemref-refid title=dom-itemref-refId>refId</a>;
-};</pre>
- </dd>
- </dl><p>The <code><a href=#itemref>itemref</a></code> element is used to include by reference
- properties defined (using <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code>) by elements that are not
- descendants of the <code><a href=#itemref>itemref</a></code> element's nearest ancestor
- with an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute.</p>
-
- <p>The <dfn id=attr-itemref-refid title=attr-itemref-refid><code>refid</code></dfn>
- attribute is required, and its value must be the ID of an element in
- the same <code>Document</code> as the <code><a href=#itemref>itemref</a></code>
- element.</p>
-
- <p class=note>This element is described in more detail as part of
- the <a href=#microdata>microdata</a> model.</p>
-
- <div class=impl>
-
- <p>The <dfn id=dom-itemref-refid title=dom-itemref-refId><code>refId</code></dfn> IDL
- attribute must <a href=#reflect>reflect</a> the <code title=attr-itemref-refid><a href=#attr-itemref-refid>refid</a></code> content attribute.</p>
-
- </div>
-
-
- <h4 id=the-style-element><span class=secno>4.2.7 </span>The <dfn><code>style</code></dfn> element</h4>
-
- <dl class=element><dt>Categories</dt>
- <dd><a href=#metadata-content>Metadata content</a>.</dd>
<dd>If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is present: <a href=#flow-content>flow content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is absent: where <a href=#metadata-content>metadata content</a> is expected.</dd>
@@ -11988,7 +11947,7 @@
- <h4 id=styling><span class=secno>4.2.8 </span><dfn title="styling processing model">Styling</dfn></h4>
+ <h4 id=styling><span class=secno>4.2.7 </span><dfn title="styling processing model">Styling</dfn></h4>
<p>The <code><a href=#the-link-element>link</a></code> and <code><a href=#the-style-element>style</a></code> elements can provide
styling information for the user agent to use when rendering the
@@ -44306,19 +44265,18 @@
</div>
<p>Properties that are not descendants of the element with the <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute can be associated
- with the <a href=#concept-item title=concept-item>item</a> using the
- <code><a href=#itemref>itemref</a></code> element, whose <code title=attr-itemref-refid><a href=#attr-itemref-refid>refid</a></code> attribute takes the ID of an
- element with the <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code>
- attribute or an ancestor of such an element.</p>
+ with the <a href=#concept-item title=concept-item>item</a> using the <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute. This attribute takes
+ a list of IDs of elements to crawl in addition to crawling the
+ children of the element with the <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute.</p>
<div class=example>
<p>This example is the same as the previous one, but all the
properties are separated from their <a href=#concept-item title=concept-item>items</a>:</p>
- <pre><div itemscope id="amanda"><itemref refid="a"><itemref refid="b"></div>
+ <pre><div itemscope id="amanda" itemref="a b"></div>
<p id="a">Name: <span itemprop="name">Amanda</span></p>
-<div id="b" itemprop="band" itemscope><itemref refid="c"></div>
+<div id="b" itemprop="band" itemscope itemref="c"></div>
<div id="c">
<p>Band: <span itemprop="name">Jazz Band</span></p>
<p>Size: <span itemprop="size">12</span> players</p>
@@ -44730,19 +44688,14 @@
<h4 id=items><span class=secno>5.2.2 </span>Items</h4>
- <p>Every <a href=#html-elements title="HTML elements">HTML element</a> except the
- <code><a href=#itemref>itemref</a></code> element may have an <dfn id=attr-itemscope title=attr-itemscope><code>itemscope</code></dfn> attribute
+ <p>Every <a href=#html-elements title="HTML elements">HTML element</a> may have an
+ <dfn id=attr-itemscope title=attr-itemscope><code>itemscope</code></dfn> attribute
specified. The <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code>
attribute is a <a href=#boolean-attribute>boolean attribute</a>.</p>
<p>An element with the <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code>
- attribute specified, and that is not an <code><a href=#itemref>itemref</a></code>
- element, creates a new <dfn id=concept-item title=concept-item>item</dfn>, a group
- of name-value pairs.</p>
+ attribute specified creates a new <dfn id=concept-item title=concept-item>item</dfn>, a group of name-value pairs.</p>
- <p>The <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute must
- not be specified on <code><a href=#itemref>itemref</a></code> elements.</p>
-
<hr><p>Elements with an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code>
attribute may have an <dfn id=attr-itemtype title=attr-itemtype><code>itemtype</code></dfn> attribute
specified, to give the <a href=#item-type>item type</a> of the <a href=#concept-item title=concept-item>item</a>.</p>
@@ -44789,7 +44742,21 @@
vocabulary that does not <a href=#support-global-identifiers-for-items>support global identifiers for
items</a>, as defined by that vocabulary's specification.</p>
+ <hr><p>Elements with an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code>
+ attribute may have an <dfn id=attr-itemref title=attr-itemref><code>itemref</code></dfn> attribute specified,
+ to give a list of additional elements to crawl to find the
+ name-value pairs of the <a href=#concept-item title=concept-item>item</a>.</p>
+ <p>The <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute, if
+ specified, must have a value that is an <a href=#unordered-set-of-unique-space-separated-tokens>unordered set of
+ unique space-separated tokens</a> consisting of <a href=#concept-id title=concept-ID>IDs</a> of elements in the same document; for
+ each one, the element's nearest ancestor element with an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute specified, if any,
+ must not be the element with the referencing <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute specified.</p>
+
+ <p>The <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute must not
+ be specified on elements that do not have an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute specified.</p>
+
+
<h4 id=names:-the-itemprop-attribute><span class=secno>5.2.3 </span>Names: the <dfn title=attr-itemprop><code>itemprop</code></dfn> attribute</h4>
<p>Every <a href=#html-elements title="HTML elements">HTML element</a> may have an
@@ -44877,8 +44844,7 @@
<p>And the following:</p>
- <pre><div itemscope>
- <itemref refid="x">
+ <pre><div itemscope itemref="x">
<p itemprop="b">test</p>
<p itemprop="a">2</p>
</div>
@@ -44964,14 +44930,12 @@
element</a>.</p>
-
<h4 id=associating-names-with-items><span class=secno>5.2.5 </span>Associating names with items</h4>
<p>To find <dfn id=the-properties-of-an-item>the properties of an item</dfn>, the user agent must
run the following steps:</p>
- <ol><li><p>Let <var title="">root</var> be the element with the <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute. This element
- cannot be an <code><a href=#itemref>itemref</a></code> element.</li>
+ <ol><li><p>Let <var title="">root</var> be the element with the <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute.</li>
<li><p>Let <var title="">queue</var> be a stack of elements
initially containing the child elements of <var title="">root</var>, if any, in <a href=#tree-order>tree order</a> (so that
@@ -44983,54 +44947,55 @@
elements. This list will be the result of the algorithm: a list of
elements with properties that apply to <var title="">root</var>.</li>
- <li><p>Let <var title="">visited nodes</var> be a list of elements
- containing just <var title="">root</var>. This list is used to
- avoid loops caused by <code><a href=#itemref>itemref</a></code> elements.</li>
+ <li><p>If <var title="">root</var> has an <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute, <a href=#split-a-string-on-spaces title="split a
+ string on spaces">split the value of that <code title=attr-itemref>itemref</code> attribute on spaces</a>. For
+ each resulting token, <var title="">ID</var>, if there is an
+ element in the document with the <a href=#concept-id title=concept-ID>ID</a>
+ <var title="">ID</var>, then push the first such element onto <var title="">queue</var>.</li>
- <li><p>Let <var title="">error found</var> be false. If it is set
- to true by the algorithm below, then an <code><a href=#itemref>itemref</a></code> error
- has been found.</li>
+ <li>
+ <p>For each element <var title="">candidate</var> in <var title="">queue</var>, run the following substeps:</p>
+
+ <ol><li><p>Let <var title="">scope</var> be <var title="">candidate</var>'s nearest ancestor element with an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute
+ specified.</li>
+
+ <li><p>If one of the other elements in <var title="">queue</var>
+ is also <var title="">candidate</var>, then remove <var title="">candidate</var> from <var title="">queue</var>
+ (i.e. remove duplicates).</li>
+
+ <li><p>Otherwise, if one of the other elements in <var title="">queue</var> is an ancestor element of <var title="">candidate</var>, and that element is <var title="">scope</var>, then remove <var title="">candidate</var>
+ from <var title="">queue</var>.</li>
+
+ <li><p>Otherwise, if one of the other elements in <var title="">queue</var> is an ancestor element of <var title="">candidate</var>, and that element also has <var title="">scope</var> as its nearest ancestor element with an
+ <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute
+ specified, then remove <var title="">candidate</var> from <var title="">queue</var>.</li>
+
+ </ol></li>
+
+ <li><p>Sort <var title="">queue</var> in <a href=#tree-order>tree
+ order</a>.</li>
+
<li><p><i>Loop</i>: Pop the top element from <var title="">queue</var> and let <var title="">current</var> be that
element.</li>
- <li><p>If <var title="">current</var> is already in <var title="">visited nodes</var> then let <var title="">error
- found</var> be true, and skip down to the step marked <i>end of
- loop</i>.</li>
-
<li><p>If <var title="">current</var> has an <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute, then append <var title="">current</var> to <var title="">properties</var>.</li>
- <li><p>Append <var title="">current</var> to <var title="">visited
- nodes</var>.</li>
-
- <li><p>If <var title="">current</var> is an <code><a href=#itemref>itemref</a></code>
- element with a <code title=attr-itemref-refid><a href=#attr-itemref-refid>refid</a></code>
- attribute, and there is an element in the document whose <a href=#concept-id title=concept-id>ID</a> matches the value of <var title="">current</var>'s <code title=attr-itemref-refid><a href=#attr-itemref-refid>refid</a></code> attribute, then push the
- first element in the document whose <a href=#concept-id title=concept-id>ID</a> matches the value of <var title="">current</var>'s <code title=attr-itemref-refid><a href=#attr-itemref-refid>refid</a></code> attribute onto <var title="">queue</var> (so that it will be the next element to be
+ <li><p>If <var title="">current</var> does not have an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code> attribute, and <var title="">current</var> is an element with child elements, then:
+ push all the child elements of <var title="">current</var> onto
+ <var title="">queue</var>, in <a href=#tree-order>tree order</a> (so the first
+ child of <var title="">current</var> will be the next element to be
popped from <var title="">queue</var>).</li>
- <li><p>Otherwise, if <var title="">current</var> is not an
- <code><a href=#itemref>itemref</a></code> element, and <var title="">current</var> does
- not have an <code title=attr-itemscope><a href=#attr-itemscope>itemscope</a></code>
- attribute, and <var title="">current</var> is an element with child
- elements, then: push all the child elements of <var title="">current</var> onto <var title="">queue</var>, in
- <a href=#tree-order>tree order</a> (so the first child of <var title="">current</var> will be the next element to be popped from
- <var title="">queue</var>).</li>
-
<li><p><i>End of loop</i>: If <var title="">queue</var> is not
empty, return to the step marked <i>loop</i>.</li>
<li><p>Return <var title="">properties</var>. That is the list of
<a href=#the-properties-of-an-item title="the properties of an item">properties of the
- item</a> <var title="">root</var>.</li>
+ item</a> <var title="">root</var>. By definition, this list is
+ in <a href=#tree-order>tree order</a>.</li>
- </ol><p>A document must not contain any <code><a href=#itemref>itemref</a></code> elements
- that would cause the <var title="">error found</var> flag in the
- algorithm above to be set to true if the <a href=#the-properties-of-an-item title="the properties
- of an item">properties</a> of all the <a href=#concept-item title=concept-item>items</a> in that document were to be
- determined.</p>
-
- <p>A document must not contain any elements that have an <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute that would not be
+ </ol><p>A document must not contain any elements that have an <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute that would not be
found to be a property of any of the <a href=#concept-item title=concept-item>items</a> in that document were their <a href=#the-properties-of-an-item title="the properties of an item">properties</a> all to be
determined.</p>
@@ -45038,7 +45003,6 @@
its element does not have an <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute.</p>
-
<h4 id=examples-1><span class=secno>5.2.6 </span>Examples</h4>
<p>Here is an example of some HTML using Microdata to express RDF
@@ -45146,7 +45110,8 @@
the <code title=attr-itemtype><a href=#attr-itemtype>itemtype</a></code> content attribute.
The <dfn id=dom-itemid title=dom-itemId><code>itemId</code></dfn> IDL attribute
on <a href=#html-elements>HTML elements</a> must <a href=#reflect>reflect</a> the <code title=attr-itemid><a href=#attr-itemid>itemid</a></code> content attribute. The <dfn id=dom-itemprop title=dom-itemProp><code>itemProp</code></dfn> IDL attribute on
- <a href=#html-elements>HTML elements</a> must <a href=#reflect>reflect</a> the <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> content attribute.</p>
+ <a href=#html-elements>HTML elements</a> must <a href=#reflect>reflect</a> the <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> content attribute. The <dfn id=dom-itemref title=dom-itemRef><code>itemRef</code></dfn> IDL attribute on
+ <a href=#html-elements>HTML elements</a> must <a href=#reflect>reflect</a> the <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> content attribute.</p>
<p>The <dfn id=dom-properties title=dom-properties><code>properties</code></dfn> IDL
attribute on <a href=#html-elements>HTML elements</a> must return an
@@ -75336,17 +75301,6 @@
<code title=attr-mod-cite><a href=#attr-mod-cite>cite</a></code>;
<code title=attr-mod-datetime><a href=#attr-mod-datetime>datetime</a></code></td>
<td><code><a href=#htmlmodelement>HTMLModElement</a></code></td>
- <tr><th><code><a href=#itemref>itemref</a></code></th>
- <td>Inclusion mechanism to reference microdata properties in other parts of the document</td>
- <td><a href=#metadata-content title="Metadata content">metadata</a>;
- <a href=#flow-content title="Flow content">flow</a>;
- <a href=#phrasing-content title="Phrasing content">phrasing</a></td>
- <td><code><a href=#the-head-element-0>head</a></code>;
- <a href=#phrasing-content title="Phrasing content">phrasing</a></td>
- <td>empty
- <td><a href=#global-attributes title="global attributes">globals</a>;
- <code title=attr-itemref-refid><a href=#attr-itemref-refid>refid</a></code></td>
- <td><code><a href=#htmlitemrefelement>HTMLItemRefElement</a></code></td>
<tr><th><code><a href=#the-kbd-element>kbd</a></code></th>
<td>User input</td>
<td><a href=#flow-content title="Flow content">flow</a>;
@@ -76156,6 +76110,10 @@
<td> <a href=#names:-the-itemprop-attribute title=attr-itemprop>HTML elements</a>
<td> <a href=#property-names>Property names</a> of a microdata item
<td> <a href=#unordered-set-of-unique-space-separated-tokens>Unordered set of unique space-separated tokens</a> consisting of <a href=#absolute-url title="absolute URL">valid absolute URLs</a>, <a href=#defined-property-name title="defined property name">defined property names</a>, or text*
+ <tr><th> <code title="">itemref</code>
+ <td> <code title=attr-itemref><a href=#attr-itemref>itemref</a></code>
+ <td> Referenced elements
+ <td> <a href=#unordered-set-of-unique-space-separated-tokens>Unordered set of unique space-separated tokens</a> consisting of IDs*
<tr><th> <code title="">itemscope</code>
<td> <a href=#attr-itemscope title=attr-itemscope>HTML elements</a>
<td> Introduces a microdata item
@@ -76309,10 +76267,6 @@
<code title=attr-textarea-readonly><a href=#attr-textarea-readonly>textarea</a></code>
<td> Whether to allow the value to be edited by the user
<td> <a href=#boolean-attribute>Boolean attribute</a>
- <tr><th> <code title="">refid</code>
- <td> <code title=attr-itemref-refid><a href=#attr-itemref-refid>itemref</a></code>
- <td> Referenced element
- <td> ID*
<tr><th> <code title="">rel</code>
<td> <code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>a</a></code>;
<code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>area</a></code>;
@@ -77081,9 +77035,6 @@
<tr><td> <code><a href=#the-ins-element>ins</a></code>
<td> <code><a href=#htmlmodelement>HTMLModElement</a></code> : <code><a href=#htmlelement>HTMLElement</a></code>
- <tr><td> <code><a href=#itemref>itemref</a></code>
- <td> <code><a href=#htmlitemrefelement>HTMLItemRefElement</a></code> : <code><a href=#htmlelement>HTMLElement</a></code>
-
<tr><td> <code><a href=#the-kbd-element>kbd</a></code>
<td> <code><a href=#htmlelement>HTMLElement</a></code>
Modified: source
===================================================================
--- source 2009-10-22 12:43:26 UTC (rev 4272)
+++ source 2009-10-22 23:27:32 UTC (rev 4273)
@@ -7680,6 +7680,7 @@
attribute boolean <span title="dom-itemScope">itemScope</span>;
attribute DOMString <span title="dom-itemType">itemType</span>;
attribute DOMString <span title="dom-itemId">itemId</span>;
+ attribute DOMString <span title="dom-itemRef">itemRef</span>;
[PutForwards=<span title="dom-DOMSettableTokenList-value">value</span>] readonly attribute <span>DOMSettableTokenList</span> <span title="dom-itemProp">itemProp</span>;
readonly attribute <span>HTMLPropertyCollection</span> <span title="dom-properties">properties</span>;
attribute any <span title="dom-itemValue">itemValue</span>;
@@ -7804,6 +7805,7 @@
<li><code title="attr-itemprop">itemprop</code></li>
<li><code title="attr-itemscope">itemscope</code></li>
<li><code title="attr-itemtype">itemtype</code></li>
+ <li><code title="attr-itemref">itemref</code></li>
<li><code title="attr-lang">lang</code></li>
<li><code title="attr-spellcheck">spellcheck</code></li>
<li><code title="attr-style">style</code></li>
@@ -12413,53 +12415,6 @@
</div>
-
- <h4 id="itemref">The <dfn><code>itemref</code></dfn> element</h4>
-
- <dl class="element">
- <dt>Categories</dt>
- <dd><span>Metadata content</span>.</dd>
- <dd><span>Flow content</span>.</dd>
- <dd><span>Phrasing content</span>.</dd>
- <dt>Contexts in which this element may be used:</dt>
- <dd>Where <span>metadata content</span> is expected.</dd>
- <dd>Where <span>phrasing content</span> is expected.</dd>
- <dt>Content model:</dt>
- <dd>Empty.</dd>
- <dt>Content attributes:</dt>
- <dd><span>Global attributes</span></dd>
- <dd><code title="attr-itemref-refid">refid</code></dd>
- <dt>DOM interface:</dt>
- <dd>
-<pre class="idl">interface <dfn>HTMLItemRefElement</dfn> : <span>HTMLElement</span> {
- attribute DOMString <span title="dom-itemref-refId">refId</span>;
-};</pre>
- </dd>
- </dl>
-
- <p>The <code>itemref</code> element is used to include by reference
- properties defined (using <code
- title="attr-itemprop">itemprop</code>) by elements that are not
- descendants of the <code>itemref</code> element's nearest ancestor
- with an <code title="attr-itemscope">itemscope</code> attribute.</p>
-
- <p>The <dfn title="attr-itemref-refid"><code>refid</code></dfn>
- attribute is required, and its value must be the ID of an element in
- the same <code>Document</code> as the <code>itemref</code>
- element.</p>
-
- <p class="note">This element is described in more detail as part of
- the <span>microdata</span> model.</p>
-
- <div class="impl">
-
- <p>The <dfn title="dom-itemref-refId"><code>refId</code></dfn> IDL
- attribute must <span>reflect</span> the <code
- title="attr-itemref-refid">refid</code> content attribute.</p>
-
- </div>
-
-
<h4>The <dfn><code>style</code></dfn> element</h4>
<dl class="element">
@@ -49458,11 +49413,11 @@
<p>Properties that are not descendants of the element with the <code
title="attr-itemscope">itemscope</code> attribute can be associated
- with the <span title="concept-item">item</span> using the
- <code>itemref</code> element, whose <code
- title="attr-itemref-refid">refid</code> attribute takes the ID of an
- element with the <code title="attr-itemprop">itemprop</code>
- attribute or an ancestor of such an element.</p>
+ with the <span title="concept-item">item</span> using the <code
+ title="attr-itemref">itemref</code> attribute. This attribute takes
+ a list of IDs of elements to crawl in addition to crawling the
+ children of the element with the <code
+ title="attr-itemscope">itemscope</code> attribute.</p>
<div class="example">
@@ -49470,9 +49425,9 @@
properties are separated from their <span
title="concept-item">items</span>:</p>
- <pre><div itemscope id="amanda"><itemref refid="a"><itemref refid="b"></div>
+ <pre><div itemscope id="amanda" itemref="a b"></div>
<p id="a">Name: <span itemprop="name">Amanda</span></p>
-<div id="b" itemprop="band" itemscope><itemref refid="c"></div>
+<div id="b" itemprop="band" itemscope itemref="c"></div>
<div id="c">
<p>Band: <span itemprop="name">Jazz Band</span></p>
<p>Size: <span itemprop="size">12</span> players</p>
@@ -49926,20 +49881,15 @@
<h4>Items</h4>
- <p>Every <span title="HTML elements">HTML element</span> except the
- <code>itemref</code> element may have an <dfn
- title="attr-itemscope"><code>itemscope</code></dfn> attribute
+ <p>Every <span title="HTML elements">HTML element</span> may have an
+ <dfn title="attr-itemscope"><code>itemscope</code></dfn> attribute
specified. The <code title="attr-itemscope">itemscope</code>
attribute is a <span>boolean attribute</span>.</p>
<p>An element with the <code title="attr-itemscope">itemscope</code>
- attribute specified, and that is not an <code>itemref</code>
- element, creates a new <dfn title="concept-item">item</dfn>, a group
- of name-value pairs.</p>
+ attribute specified creates a new <dfn
+ title="concept-item">item</dfn>, a group of name-value pairs.</p>
- <p>The <code title="attr-itemscope">itemscope</code> attribute must
- not be specified on <code>itemref</code> elements.</p>
-
<hr>
<p>Elements with an <code title="attr-itemscope">itemscope</code>
@@ -50006,7 +49956,28 @@
vocabulary that does not <span>support global identifiers for
items</span>, as defined by that vocabulary's specification.</p>
+ <hr>
+ <p>Elements with an <code title="attr-itemscope">itemscope</code>
+ attribute may have an <dfn
+ title="attr-itemref"><code>itemref</code></dfn> attribute specified,
+ to give a list of additional elements to crawl to find the
+ name-value pairs of the <span title="concept-item">item</span>.</p>
+
+ <p>The <code title="attr-itemref">itemref</code> attribute, if
+ specified, must have a value that is an <span>unordered set of
+ unique space-separated tokens</span> consisting of <span
+ title="concept-ID">IDs</span> of elements in the same document; for
+ each one, the element's nearest ancestor element with an <code
+ title="attr-itemscope">itemscope</code> attribute specified, if any,
+ must not be the element with the referencing <code
+ title="attr-itemref">itemref</code> attribute specified.</p>
+
+ <p>The <code title="attr-itemref">itemref</code> attribute must not
+ be specified on elements that do not have an <code
+ title="attr-itemscope">itemscope</code> attribute specified.</p>
+
+
<h4>Names: the <dfn title="attr-itemprop"><code>itemprop</code></dfn> attribute</h4>
<p>Every <span title="HTML elements">HTML element</span> may have an
@@ -50102,8 +50073,7 @@
<p>And the following:</p>
- <pre><div itemscope>
- <itemref refid="x">
+ <pre><div itemscope itemref="x">
<p itemprop="b">test</p>
<p itemprop="a">2</p>
</div>
@@ -50198,7 +50168,6 @@
element</span>.</p>
-
<h4>Associating names with items</h4>
<p>To find <dfn>the properties of an item</dfn>, the user agent must
@@ -50207,8 +50176,7 @@
<ol>
<li><p>Let <var title="">root</var> be the element with the <code
- title="attr-itemscope">itemscope</code> attribute. This element
- cannot be an <code>itemref</code> element.</p></li>
+ title="attr-itemscope">itemscope</code> attribute.</p></li>
<li><p>Let <var title="">queue</var> be a stack of elements
initially containing the child elements of <var
@@ -50222,69 +50190,79 @@
elements with properties that apply to <var
title="">root</var>.</p></li>
- <li><p>Let <var title="">visited nodes</var> be a list of elements
- containing just <var title="">root</var>. This list is used to
- avoid loops caused by <code>itemref</code> elements.</p></li>
+ <li><p>If <var title="">root</var> has an <code
+ title="attr-itemref">itemref</code> attribute, <span title="split a
+ string on spaces">split the value of that <code
+ title="attr-itemref">itemref</code> attribute on spaces</span>. For
+ each resulting token, <var title="">ID</var>, if there is an
+ element in the document with the <span title="concept-ID">ID</span>
+ <var title="">ID</var>, then push the first such element onto <var
+ title="">queue</var>.</p></li>
- <li><p>Let <var title="">error found</var> be false. If it is set
- to true by the algorithm below, then an <code>itemref</code> error
- has been found.</p></li>
+ <li>
+ <p>For each element <var title="">candidate</var> in <var
+ title="">queue</var>, run the following substeps:</p>
+
+ <ol>
+
+ <li><p>Let <var title="">scope</var> be <var
+ title="">candidate</var>'s nearest ancestor element with an <code
+ title="attr-itemscope">itemscope</code> attribute
+ specified.</p></li>
+
+ <li><p>If one of the other elements in <var title="">queue</var>
+ is also <var title="">candidate</var>, then remove <var
+ title="">candidate</var> from <var title="">queue</var>
+ (i.e. remove duplicates).</p></li>
+
+ <li><p>Otherwise, if one of the other elements in <var
+ title="">queue</var> is an ancestor element of <var
+ title="">candidate</var>, and that element is <var
+ title="">scope</var>, then remove <var title="">candidate</var>
+ from <var title="">queue</var>.</p></li>
+
+ <li><p>Otherwise, if one of the other elements in <var
+ title="">queue</var> is an ancestor element of <var
+ title="">candidate</var>, and that element also has <var
+ title="">scope</var> as its nearest ancestor element with an
+ <code title="attr-itemscope">itemscope</code> attribute
+ specified, then remove <var title="">candidate</var> from <var
+ title="">queue</var>.</p></li>
+
+ </ol>
+
+ </li>
+
+ <li><p>Sort <var title="">queue</var> in <span>tree
+ order</span>.</p></li>
+
<li><p><i>Loop</i>: Pop the top element from <var
title="">queue</var> and let <var title="">current</var> be that
element.</p></li>
- <li><p>If <var title="">current</var> is already in <var
- title="">visited nodes</var> then let <var title="">error
- found</var> be true, and skip down to the step marked <i>end of
- loop</i>.</p></li>
-
<li><p>If <var title="">current</var> has an <code
title="attr-itemprop">itemprop</code> attribute, then append <var
title="">current</var> to <var title="">properties</var>.</p></li>
- <li><p>Append <var title="">current</var> to <var title="">visited
- nodes</var>.</p></li>
-
- <li><p>If <var title="">current</var> is an <code>itemref</code>
- element with a <code title="attr-itemref-refid">refid</code>
- attribute, and there is an element in the document whose <span
- title="concept-id">ID</span> matches the value of <var
- title="">current</var>'s <code
- title="attr-itemref-refid">refid</code> attribute, then push the
- first element in the document whose <span
- title="concept-id">ID</span> matches the value of <var
- title="">current</var>'s <code
- title="attr-itemref-refid">refid</code> attribute onto <var
- title="">queue</var> (so that it will be the next element to be
+ <li><p>If <var title="">current</var> does not have an <code
+ title="attr-itemscope">itemscope</code> attribute, and <var
+ title="">current</var> is an element with child elements, then:
+ push all the child elements of <var title="">current</var> onto
+ <var title="">queue</var>, in <span>tree order</span> (so the first
+ child of <var title="">current</var> will be the next element to be
popped from <var title="">queue</var>).</p></li>
- <li><p>Otherwise, if <var title="">current</var> is not an
- <code>itemref</code> element, and <var title="">current</var> does
- not have an <code title="attr-itemscope">itemscope</code>
- attribute, and <var title="">current</var> is an element with child
- elements, then: push all the child elements of <var
- title="">current</var> onto <var title="">queue</var>, in
- <span>tree order</span> (so the first child of <var
- title="">current</var> will be the next element to be popped from
- <var title="">queue</var>).</p></li>
-
<li><p><i>End of loop</i>: If <var title="">queue</var> is not
empty, return to the step marked <i>loop</i>.</p></li>
<li><p>Return <var title="">properties</var>. That is the list of
<span title="the properties of an item">properties of the
- item</span> <var title="">root</var>.</p></li>
+ item</span> <var title="">root</var>. By definition, this list is
+ in <span>tree order</span>.</p></li>
</ol>
- <p>A document must not contain any <code>itemref</code> elements
- that would cause the <var title="">error found</var> flag in the
- algorithm above to be set to true if the <span title="the properties
- of an item">properties</span> of all the <span
- title="concept-item">items</span> in that document were to be
- determined.</p>
-
<p>A document must not contain any elements that have an <code
title="attr-itemprop">itemprop</code> attribute that would not be
found to be a property of any of the <span
@@ -50298,7 +50276,6 @@
title="attr-itemprop">itemprop</code> attribute.</p>
-
<h4>Examples</h4>
<p>Here is an example of some HTML using Microdata to express RDF
@@ -50420,7 +50397,10 @@
title="attr-itemid">itemid</code> content attribute. The <dfn
title="dom-itemProp"><code>itemProp</code></dfn> IDL attribute on
<span>HTML elements</span> must <span>reflect</span> the <code
- title="attr-itemprop">itemprop</code> content attribute.</p>
+ title="attr-itemprop">itemprop</code> content attribute. The <dfn
+ title="dom-itemRef"><code>itemRef</code></dfn> IDL attribute on
+ <span>HTML elements</span> must <span>reflect</span> the <code
+ title="attr-itemref">itemref</code> content attribute.</p>
<p>The <dfn title="dom-properties"><code>properties</code></dfn> IDL
attribute on <span>HTML elements</span> must return an
@@ -92724,20 +92704,6 @@
</tr>
<tr>
- <th><code>itemref</code></th>
- <td>Inclusion mechanism to reference microdata properties in other parts of the document</td>
- <td><span title="Metadata content">metadata</span>;
- <span title="Flow content">flow</span>;
- <span title="Phrasing content">phrasing</span></td>
- <td><code>head</code>;
- <span title="Phrasing content">phrasing</span></td>
- <td>empty
- <td><span title="global attributes">globals</span>;
- <code title="attr-itemref-refid">refid</code></td>
- <td><code>HTMLItemRefElement</code></td>
- </tr>
-
- <tr>
<th><code>kbd</code></th>
<td>User input</td>
<td><span title="Flow content">flow</span>;
@@ -93754,6 +93720,11 @@
<td> <span>Property names</span> of a microdata item
<td> <span>Unordered set of unique space-separated tokens</span> consisting of <span title="absolute URL">valid absolute URLs</span>, <span title="defined property name">defined property names</span>, or text*
<tr>
+ <th> <code title="">itemref</code>
+ <td> <code title="attr-itemref">itemref</code>
+ <td> Referenced elements
+ <td> <span>Unordered set of unique space-separated tokens</span> consisting of IDs*
+ <tr>
<th> <code title="">itemscope</code>
<td> <span title="attr-itemscope">HTML elements</span>
<td> Introduces a microdata item
@@ -93940,11 +93911,6 @@
<td> Whether to allow the value to be edited by the user
<td> <span>Boolean attribute</span>
<tr>
- <th> <code title="">refid</code>
- <td> <code title="attr-itemref-refid">itemref</code>
- <td> Referenced element
- <td> ID*
- <tr>
<th> <code title="">rel</code>
<td> <code title="attr-hyperlink-rel">a</code>;
<code title="attr-hyperlink-rel">area</code>;
@@ -94895,10 +94861,6 @@
<td> <code>HTMLModElement</code> : <code>HTMLElement</code>
<tr>
- <td> <code>itemref</code>
- <td> <code>HTMLItemRefElement</code> : <code>HTMLElement</code>
-
- <tr>
<td> <code>kbd</code>
<td> <code>HTMLElement</code>
More information about the Commit-Watchers
mailing list