Skip to content

Commit

Permalink
[giowt] (1) Add <meter> to microdata, and <meter> and <progress> to t…
Browse files Browse the repository at this point in the history
…he table sorting algorithm.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=22274
Affected topics: HTML, Microdata

git-svn-id: http://svn.whatwg.org/webapps@7966 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 12, 2013
1 parent 6796280 commit f1b702f
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 3 deletions.
50 changes: 49 additions & 1 deletion complete.html
Expand Up @@ -42571,6 +42571,18 @@ <h4 id=table-sorting-model><span class=secno>4.9.13 </span><dfn>Table sorting mo
<code><a href=#the-data-element>data</a></code> element's <code title=attr-data-value><a href=#attr-data-value>value</a></code> attribute, if there is
one, or the empty string otherwise; the type is "string".</p>

<li><p>If, ignoring <a href=#inter-element-whitespace>inter-element whitespace</a> and nodes other than
<a href=#element>Element</a> and <a href=#text>Text</a> nodes, <var title="">cell</var> has only one child
and that child is a <code><a href=#the-progress-element>progress</a></code> element, then the value is the value of that
<code><a href=#the-progress-element>progress</a></code> element's <code title=attr-progress-value><a href=#attr-progress-value>value</a></code> attribute, if
there is one, or the empty string otherwise; the type is "string".</p>

<li><p>If, ignoring <a href=#inter-element-whitespace>inter-element whitespace</a> and nodes other than
<a href=#element>Element</a> and <a href=#text>Text</a> nodes, <var title="">cell</var> has only one child
and that child is a <code><a href=#the-meter-element>meter</a></code> element, then the value is the value of that
<code><a href=#the-meter-element>meter</a></code> element's <code title=attr-meter-value><a href=#attr-meter-value>value</a></code> attribute, if there is
one, or the empty string otherwise; the type is "string".</p>

<li>

<p>If, ignoring <a href=#inter-element-whitespace>inter-element whitespace</a> and nodes other than
Expand Down Expand Up @@ -52453,6 +52465,8 @@ <h4 id=the-meter-element><span class=secno>4.10.17 </span>The <dfn><code>meter</
element's contents, for users of user agents that do not support the <code><a href=#the-meter-element>meter</a></code>
element.</p>

<p>When used with <a href=#microdata>microdata</a>, the <code><a href=#the-meter-element>meter</a></code> element's <code title=attr-meter-value><a href=#attr-meter-value>value</a></code> attribute provides the element's machine-readable value.</p>

<div class=example>

<p>The following examples show three gauges that would all be
Expand Down Expand Up @@ -60620,7 +60634,25 @@ <h4 id=the-basic-syntax><span class=secno>5.1.2 </span>The basic syntax</h4>

</div>

<p>For date- and time-related data, the <code><a href=#the-time-element>time</a></code> element and its <code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code> attribute can be used instead.</p>
<p>For numeric data, the <code><a href=#the-meter-element>meter</a></code> element and its <code title=attr-meter-value><a href=#attr-meter-value>value</a></code> attribute can be used instead.</p>

<div class=example>

<p>Here a rating is given using a <code><a href=#the-meter-element>meter</a></code> element.</p>

<pre>&lt;div itemscope itemtype="http://schema.org/Product"&gt;
&lt;span itemprop="name"&gt;Panasonic White 60L Refrigerator&lt;/span&gt;
&lt;img src="panasonic-fridge-60l-white.jpg" alt=""&gt;
&lt;div itemprop="aggregateRating"
itemscope itemtype="http://schema.org/AggregateRating"&gt;
&lt;meter itemprop="ratingValue" min=0 value=3.5 max=5&gt;Rated 3.5/5&lt;/meter&gt;
(based on &lt;span itemprop="reviewCount"&gt;11&lt;/span&gt; customer reviews)
&lt;/div&gt;
&lt;/div&gt;</pre>

</div>

<p>Similarly, for date- and time-related data, the <code><a href=#the-time-element>time</a></code> element and its <code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code> attribute can be used instead.</p>

<div class=example>

Expand Down Expand Up @@ -61363,6 +61395,16 @@ <h4 id=values><span class=secno>5.2.4 </span>Values</h4>
</dd>


<dt>If the element is a <code><a href=#the-meter-element>meter</a></code> element</dt>

<dd>

<p>The value is the value of the element's <code title=attr-meter-value><a href=#attr-meter-value>value</a></code> attribute,
if it has one, or the empty string otherwise.</p>

</dd>


<dt>If the element is a <code><a href=#the-time-element>time</a></code> element</dt>

<dd>
Expand Down Expand Up @@ -61646,6 +61688,12 @@ <h3 id=microdata-dom-api><span class=secno>5.3 </span>Microdata DOM API</h3>
element's <code title=attr-data-value><a href=#attr-data-value>value</a></code> content attribute.</dd>


<dt>If the element is a <code><a href=#the-meter-element>meter</a></code> element</dt>

<dd><p>The attribute must act as it would if it was <a href=#reflect title=reflect>reflecting</a> the
element's <code title=attr-meter-value><a href=#attr-meter-value>value</a></code> content attribute.</dd>


<dt>If the element is a <code><a href=#the-time-element>time</a></code> element</dt>

<dd><p>On getting, if the element has a <code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code> content
Expand Down
50 changes: 49 additions & 1 deletion index
Expand Up @@ -42571,6 +42571,18 @@ the cell that corresponds to the values of the two dice.
<code><a href=#the-data-element>data</a></code> element's <code title=attr-data-value><a href=#attr-data-value>value</a></code> attribute, if there is
one, or the empty string otherwise; the type is "string".</p>

<li><p>If, ignoring <a href=#inter-element-whitespace>inter-element whitespace</a> and nodes other than
<a href=#element>Element</a> and <a href=#text>Text</a> nodes, <var title="">cell</var> has only one child
and that child is a <code><a href=#the-progress-element>progress</a></code> element, then the value is the value of that
<code><a href=#the-progress-element>progress</a></code> element's <code title=attr-progress-value><a href=#attr-progress-value>value</a></code> attribute, if
there is one, or the empty string otherwise; the type is "string".</p>

<li><p>If, ignoring <a href=#inter-element-whitespace>inter-element whitespace</a> and nodes other than
<a href=#element>Element</a> and <a href=#text>Text</a> nodes, <var title="">cell</var> has only one child
and that child is a <code><a href=#the-meter-element>meter</a></code> element, then the value is the value of that
<code><a href=#the-meter-element>meter</a></code> element's <code title=attr-meter-value><a href=#attr-meter-value>value</a></code> attribute, if there is
one, or the empty string otherwise; the type is "string".</p>

<li>

<p>If, ignoring <a href=#inter-element-whitespace>inter-element whitespace</a> and nodes other than
Expand Down Expand Up @@ -52453,6 +52465,8 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
element's contents, for users of user agents that do not support the <code><a href=#the-meter-element>meter</a></code>
element.</p>

<p>When used with <a href=#microdata>microdata</a>, the <code><a href=#the-meter-element>meter</a></code> element's <code title=attr-meter-value><a href=#attr-meter-value>value</a></code> attribute provides the element's machine-readable value.</p>

<div class=example>

<p>The following examples show three gauges that would all be
Expand Down Expand Up @@ -60620,7 +60634,25 @@ Demos:

</div>

<p>For date- and time-related data, the <code><a href=#the-time-element>time</a></code> element and its <code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code> attribute can be used instead.</p>
<p>For numeric data, the <code><a href=#the-meter-element>meter</a></code> element and its <code title=attr-meter-value><a href=#attr-meter-value>value</a></code> attribute can be used instead.</p>

<div class=example>

<p>Here a rating is given using a <code><a href=#the-meter-element>meter</a></code> element.</p>

<pre>&lt;div itemscope itemtype="http://schema.org/Product"&gt;
&lt;span itemprop="name"&gt;Panasonic White 60L Refrigerator&lt;/span&gt;
&lt;img src="panasonic-fridge-60l-white.jpg" alt=""&gt;
&lt;div itemprop="aggregateRating"
itemscope itemtype="http://schema.org/AggregateRating"&gt;
&lt;meter itemprop="ratingValue" min=0 value=3.5 max=5&gt;Rated 3.5/5&lt;/meter&gt;
(based on &lt;span itemprop="reviewCount"&gt;11&lt;/span&gt; customer reviews)
&lt;/div&gt;
&lt;/div&gt;</pre>

</div>

<p>Similarly, for date- and time-related data, the <code><a href=#the-time-element>time</a></code> element and its <code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code> attribute can be used instead.</p>

<div class=example>

Expand Down Expand Up @@ -61363,6 +61395,16 @@ document.body.appendChild(outer);</pre>
</dd>


<dt>If the element is a <code><a href=#the-meter-element>meter</a></code> element</dt>

<dd>

<p>The value is the value of the element's <code title=attr-meter-value><a href=#attr-meter-value>value</a></code> attribute,
if it has one, or the empty string otherwise.</p>

</dd>


<dt>If the element is a <code><a href=#the-time-element>time</a></code> element</dt>

<dd>
Expand Down Expand Up @@ -61646,6 +61688,12 @@ document.body.appendChild(outer);</pre>
element's <code title=attr-data-value><a href=#attr-data-value>value</a></code> content attribute.</dd>


<dt>If the element is a <code><a href=#the-meter-element>meter</a></code> element</dt>

<dd><p>The attribute must act as it would if it was <a href=#reflect title=reflect>reflecting</a> the
element's <code title=attr-meter-value><a href=#attr-meter-value>value</a></code> content attribute.</dd>


<dt>If the element is a <code><a href=#the-time-element>time</a></code> element</dt>

<dd><p>On getting, if the element has a <code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code> content
Expand Down
52 changes: 51 additions & 1 deletion source
Expand Up @@ -46641,6 +46641,18 @@ the cell that corresponds to the values of the two dice.
<code>data</code> element's <code title="attr-data-value">value</code> attribute, if there is
one, or the empty string otherwise; the type is "string".</p>

<li><p>If, ignoring <span>inter-element whitespace</span> and nodes other than
<span>Element</span> and <span>Text</span> nodes, <var title="">cell</var> has only one child
and that child is a <code>progress</code> element, then the value is the value of that
<code>progress</code> element's <code title="attr-progress-value">value</code> attribute, if
there is one, or the empty string otherwise; the type is "string".</p>

<li><p>If, ignoring <span>inter-element whitespace</span> and nodes other than
<span>Element</span> and <span>Text</span> nodes, <var title="">cell</var> has only one child
and that child is a <code>meter</code> element, then the value is the value of that
<code>meter</code> element's <code title="attr-meter-value">value</code> attribute, if there is
one, or the empty string otherwise; the type is "string".</p>

<li>

<p>If, ignoring <span>inter-element whitespace</span> and nodes other than
Expand Down Expand Up @@ -57674,6 +57686,9 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
element's contents, for users of user agents that do not support the <code>meter</code>
element.</p>

<p>When used with <span>microdata</span>, the <code>meter</code> element's <code
title="attr-meter-value">value</code> attribute provides the element's machine-readable value.</p>

<div class="example">

<p>The following examples show three gauges that would all be
Expand Down Expand Up @@ -67250,7 +67265,26 @@ Demos:

</div>

<p>For date- and time-related data, the <code>time</code> element and its <code
<p>For numeric data, the <code>meter</code> element and its <code
title="attr-meter-value">value</code> attribute can be used instead.</p>

<div class="example">

<p>Here a rating is given using a <code>meter</code> element.</p>

<pre>&lt;div itemscope itemtype="http://schema.org/Product">
&lt;span itemprop="name">Panasonic White 60L Refrigerator&lt;/span>
&lt;img src="panasonic-fridge-60l-white.jpg" alt="">
&lt;div itemprop="aggregateRating"
itemscope itemtype="http://schema.org/AggregateRating">
&lt;meter itemprop="ratingValue" min=0 value=3.5 max=5>Rated 3.5/5&lt;/meter>
(based on &lt;span itemprop="reviewCount">11&lt;/span> customer reviews)
&lt;/div>
&lt;/div></pre>

</div>

<p>Similarly, for date- and time-related data, the <code>time</code> element and its <code
title="attr-time-datetime">datetime</code> attribute can be used instead.</p>

<div class="example">
Expand Down Expand Up @@ -68071,6 +68105,16 @@ document.body.appendChild(outer);</pre>
</dd>


<dt>If the element is a <code>meter</code> element</dt>

<dd>

<p>The value is the value of the element's <code title="attr-meter-value">value</code> attribute,
if it has one, or the empty string otherwise.</p>

</dd>


<dt>If the element is a <code>time</code> element</dt>

<dd>
Expand Down Expand Up @@ -68397,6 +68441,12 @@ document.body.appendChild(outer);</pre>
element's <code title="attr-data-value">value</code> content attribute.</p></dd>


<dt>If the element is a <code>meter</code> element</dt>

<dd><p>The attribute must act as it would if it was <span title="reflect">reflecting</span> the
element's <code title="attr-meter-value">value</code> content attribute.</p></dd>


<dt>If the element is a <code>time</code> element</dt>

<dd><p>On getting, if the element has a <code title="attr-time-datetime">datetime</code> content
Expand Down

0 comments on commit f1b702f

Please sign in to comment.