[html5] r2484 - [c] (0) Define authoring requirements for <meter> and <progress> in more detail; [...]

whatwg at whatwg.org whatwg at whatwg.org
Sat Nov 29 23:08:31 PST 2008


Author: ianh
Date: 2008-11-29 23:08:30 -0800 (Sat, 29 Nov 2008)
New Revision: 2484

Modified:
   index
   source
Log:
[c] (0) Define authoring requirements for <meter> and <progress> in more detail; add v2 note for <credit>.

Modified: index
===================================================================
--- index	2008-11-30 00:56:18 UTC (rev 2483)
+++ index	2008-11-30 07:08:30 UTC (rev 2484)
@@ -12626,7 +12626,7 @@
   have a value greater than zero. The <code title=attr-progress-value><a href=#attr-progress-value>value</a></code> attribute, if present, must
   have a value equal to or greater than zero, and less than or equal
   to the value of the <code title=attr-progress-max><a href=#attr-progress-max>max</a></code>
-  attribute, if present.</p>
+  attribute, if present, or 1, otherwise.</p>
 
   <p class=note>The <code><a href=#the-progress-element>progress</a></code> element is the wrong
   element to use for something that is just a gauge, as opposed to
@@ -12795,20 +12795,91 @@
   as two numbers (the higher number represents the maximum, the other
   number the current value, and the minimum is assumed to be zero), or
   as a percentage or similar (using one of the characters such as
-  "%"), or as a fraction.</p>
+  "%"), or as a fraction. However, it is also possible to use the
+  attributes to specify these values.</p>
 
-  <p>The <code title=attr-meter-value><a href=#attr-meter-value>value</a></code>, <code title=attr-meter-min><a href=#attr-meter-min>min</a></code>, <code title=attr-meter-low><a href=#attr-meter-low>low</a></code>, <code title=attr-meter-high><a href=#attr-meter-high>high</a></code>, <code title=attr-meter-max><a href=#attr-meter-max>max</a></code>, and <code title=attr-meter-optimum><a href=#attr-meter-optimum>optimum</a></code> attributes are all
-  optional. When present, they must have values that are <a href=#valid-floating-point-number title="valid floating point number">valid floating point
-  numbers</a>, and their values must satisfy the following
-  inequalities:</p>
+  <p>One of the following conditions, along with all the requirements
+  that are listed with that condition, must be met:</p>
 
-  <ul class=brief><li><code title=attr-meter-min><a href=#attr-meter-min>min</a></code> ≤ <code title=attr-meter-value><a href=#attr-meter-value>value</a></code> ≤ <code title=attr-meter-max><a href=#attr-meter-max>max</a></code></li>
-   <li><code title=attr-meter-min><a href=#attr-meter-min>min</a></code> ≤ <code title=attr-meter-low><a href=#attr-meter-low>low</a></code> ≤ <code title=attr-meter-high><a href=#attr-meter-high>high</a></code> ≤ <code title=attr-meter-max><a href=#attr-meter-max>max</a></code></li>
-   <li><code title=attr-meter-min><a href=#attr-meter-min>min</a></code> ≤ <code title=attr-meter-optimum><a href=#attr-meter-optimum>optimum</a></code> ≤ <code title=attr-meter-max><a href=#attr-meter-max>max</a></code></li>
-  </ul><p>All <code><a href=#the-meter-element>meter</a></code> elements must have a value specified
-  somehow, either using the <code title=attr-meter-value><a href=#attr-meter-value>value</a></code> attribute or by including a
-  number in the contents of the element.</p>
+  <dl><dt>There are exactly two numbers in the contents of the element,
+   and the <code title=attr-meter-value><a href=#attr-meter-value>value</a></code>, <code title=attr-meter-min><a href=#attr-meter-min>min</a></code>, and <code title=attr-meter-max><a href=#attr-meter-max>max</a></code> attributes are all omitted</dt>
 
+   <dd>
+
+    <p>If specified, the <code title=attr-meter-low><a href=#attr-meter-low>low</a></code>,
+    <code title=attr-meter-high><a href=#attr-meter-high>high</a></code>, and <code title=attr-meter-optimum><a href=#attr-meter-optimum>optimum</a></code> attributes must have
+    values greater than or equal to zero and less than or equal to the
+    bigger of the two numbers in the contents of the element.</p>
+
+    <p>If both the <code title=attr-meter-low><a href=#attr-meter-low>low</a></code> and <code title=attr-meter-high><a href=#attr-meter-high>high</a></code> attributes are specified, then
+    the <code title=attr-meter-low><a href=#attr-meter-low>low</a></code> attribute's value must
+    be less than or equal to the value of the <code title=attr-meter-high><a href=#attr-meter-high>high</a></code> attribute.</p>
+
+   </dd>
+
+   <dt>There is exactly one number followed by zero or more
+   <a href=#white_space>White_Space</a> characters and a <a href=#valid-denominator-punctuation-character>valid denominator
+   punctuation character</a> in the contents of the element, and
+   the <code title=attr-meter-value><a href=#attr-meter-value>value</a></code>, <code title=attr-meter-min><a href=#attr-meter-min>min</a></code>, and <code title=attr-meter-max><a href=#attr-meter-max>max</a></code> attributes are all omitted</dt>
+
+   <dd>
+
+    <p>If specified, the <code title=attr-meter-low><a href=#attr-meter-low>low</a></code>,
+    <code title=attr-meter-high><a href=#attr-meter-high>high</a></code>, and <code title=attr-meter-optimum><a href=#attr-meter-optimum>optimum</a></code> attributes must have
+    values greater than or equal to zero and less than or equal to the
+    <a href=#values-associated-with-denominator-punctuation-characters title="values associated with denominator punctuation
+    characters">value associated with the denominator punctuation
+    character</a>.</p>
+
+    <p>If both the <code title=attr-meter-low><a href=#attr-meter-low>low</a></code> and <code title=attr-meter-high><a href=#attr-meter-high>high</a></code> attributes are specified, then
+    the <code title=attr-meter-low><a href=#attr-meter-low>low</a></code> attribute's value must
+    be less than or equal to the value of the <code title=attr-meter-high><a href=#attr-meter-high>high</a></code> attribute.</p>
+
+   </dd>
+
+   <dt>There is exactly one number in the contents of the element, and
+   the <code title=attr-meter-value><a href=#attr-meter-value>value</a></code> attribute is
+   omitted</dt>
+
+   <dt>There are no numbers in the contents of the element, and the
+   <code title=attr-meter-value><a href=#attr-meter-value>value</a></code> attribute is
+   specified.</dt>
+
+   <dd>
+
+    <p>If the <code title=attr-meter-min><a href=#attr-meter-min>min</a></code> attribute
+    attribute is specified, then the <var title="">minimum</var> is
+    that attribue's value; otherwise, it is 0.</p>
+
+    <p>If the <code title=attr-meter-max><a href=#attr-meter-max>max</a></code> attribute
+    attribute is specified, then the <var title="">maximum</var> is
+    that attribue's value; otherwise, it is 1.</p>
+
+    <p>If there is exactly one number in the contents of the element,
+    then <var title="">value</var> is that number; otherwise, <var title="">value</var> is the value of the <code title=attr-meter-value><a href=#attr-meter-value>value</a></code> attribute.</p>
+
+    <p>The following inequalities must hold, as applicable:</p>
+
+    <ul class=brief><li><var title="">minimum</var> ≤ <var title="">value</var> ≤ <var title="">maximum</var></li>
+     <li><var title="">minimum</var> ≤ <code title=attr-meter-low><a href=#attr-meter-low>low</a></code> ≤ <var title="">maximum</var> (if <code title=attr-meter-low><a href=#attr-meter-low>low</a></code> is specified)</li>
+     <li><var title="">minimum</var> ≤ <code title=attr-meter-high><a href=#attr-meter-high>high</a></code> ≤ <var title="">maximum</var> (if <code title=attr-meter-high><a href=#attr-meter-high>high</a></code> is specified)</li>
+     <li><var title="">minimum</var> ≤ <code title=attr-meter-optimum><a href=#attr-meter-optimum>optimum</a></code> ≤ <var title="">maximum</var> (if <code title=attr-meter-optimum><a href=#attr-meter-optimum>optimum</a></code> is specified)</li>
+    </ul><p>If both the <code title=attr-meter-low><a href=#attr-meter-low>low</a></code> and <code title=attr-meter-high><a href=#attr-meter-high>high</a></code> attributes are specified, then
+    the <code title=attr-meter-low><a href=#attr-meter-low>low</a></code> attribute's value must
+    be less than or equal to the value of the <code title=attr-meter-high><a href=#attr-meter-high>high</a></code> attribute.</p>
+
+   </dd>
+
+  </dl><p>For the purposes of these requirements, a number is a sequence of
+  characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE
+  (9), optionally including with a single U+002E FULL STOP character
+  (.), and separated from other numbers by at least one character that
+  isn't any of those; interpreted as a base ten number.</p>
+
+  <p>The <code title=attr-meter-value><a href=#attr-meter-value>value</a></code>, <code title=attr-meter-min><a href=#attr-meter-min>min</a></code>, <code title=attr-meter-low><a href=#attr-meter-low>low</a></code>, <code title=attr-meter-high><a href=#attr-meter-high>high</a></code>, <code title=attr-meter-max><a href=#attr-meter-max>max</a></code>, and <code title=attr-meter-optimum><a href=#attr-meter-optimum>optimum</a></code> attributes, when present,
+  must have values that are <a href=#valid-floating-point-number title="valid floating point
+  number">valid floating point numbers</a>.</p>
+
   <p class=note>If no minimum or maximum is specified, then the
   range is assumed to be 0..1, and the value thus has to be within
   that range.</p>
@@ -14009,7 +14080,7 @@
    <dd>None.</dd>
    <dt>DOM interface:</dt>
    <dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
-  </dl><p>The <code><a href=#the-figure-element>figure</a></code> element represents some <a href=#flow-content-0>flow
+  </dl><!-- v2: Add a <credit> element for photo credits --><p>The <code><a href=#the-figure-element>figure</a></code> element represents some <a href=#flow-content-0>flow
   content</a>, optionally with a caption, which can be moved away
   from the main flow of the document without affecting the document's
   meaning.</p>

Modified: source
===================================================================
--- source	2008-11-30 00:56:18 UTC (rev 2483)
+++ source	2008-11-30 07:08:30 UTC (rev 2484)
@@ -13468,7 +13468,7 @@
   title="attr-progress-value">value</code> attribute, if present, must
   have a value equal to or greater than zero, and less than or equal
   to the value of the <code title="attr-progress-max">max</code>
-  attribute, if present.</p>
+  attribute, if present, or 1, otherwise.</p>
 
   <p class="note">The <code>progress</code> element is the wrong
   element to use for something that is just a gauge, as opposed to
@@ -13655,30 +13655,117 @@
   as two numbers (the higher number represents the maximum, the other
   number the current value, and the minimum is assumed to be zero), or
   as a percentage or similar (using one of the characters such as
-  "%"), or as a fraction.</p>
+  "%"), or as a fraction. However, it is also possible to use the
+  attributes to specify these values.</p>
 
+  <p>One of the following conditions, along with all the requirements
+  that are listed with that condition, must be met:</p>
+
+  <dl>
+
+   <dt>There are exactly two numbers in the contents of the element,
+   and the <code title="attr-meter-value">value</code>, <code
+   title="attr-meter-min">min</code>, and <code
+   title="attr-meter-max">max</code> attributes are all omitted</dt>
+
+   <dd>
+
+    <p>If specified, the <code title="attr-meter-low">low</code>,
+    <code title="attr-meter-high">high</code>, and <code
+    title="attr-meter-optimum">optimum</code> attributes must have
+    values greater than or equal to zero and less than or equal to the
+    bigger of the two numbers in the contents of the element.</p>
+
+    <p>If both the <code title="attr-meter-low">low</code> and <code
+    title="attr-meter-high">high</code> attributes are specified, then
+    the <code title="attr-meter-low">low</code> attribute's value must
+    be less than or equal to the value of the <code
+    title="attr-meter-high">high</code> attribute.</p>
+
+   </dd>
+
+   <dt>There is exactly one number followed by zero or more
+   <span>White_Space</span> characters and a <span>valid denominator
+   punctuation character</span> in the contents of the element, and
+   the <code title="attr-meter-value">value</code>, <code
+   title="attr-meter-min">min</code>, and <code
+   title="attr-meter-max">max</code> attributes are all omitted</dt>
+
+   <dd>
+
+    <p>If specified, the <code title="attr-meter-low">low</code>,
+    <code title="attr-meter-high">high</code>, and <code
+    title="attr-meter-optimum">optimum</code> attributes must have
+    values greater than or equal to zero and less than or equal to the
+    <span title="values associated with denominator punctuation
+    characters">value associated with the denominator punctuation
+    character</span>.</p>
+
+    <p>If both the <code title="attr-meter-low">low</code> and <code
+    title="attr-meter-high">high</code> attributes are specified, then
+    the <code title="attr-meter-low">low</code> attribute's value must
+    be less than or equal to the value of the <code
+    title="attr-meter-high">high</code> attribute.</p>
+
+   </dd>
+
+   <dt>There is exactly one number in the contents of the element, and
+   the <code title="attr-meter-value">value</code> attribute is
+   omitted</dt>
+
+   <dt>There are no numbers in the contents of the element, and the
+   <code title="attr-meter-value">value</code> attribute is
+   specified.</dt>
+
+   <dd>
+
+    <p>If the <code title="attr-meter-min">min</code> attribute
+    attribute is specified, then the <var title="">minimum</var> is
+    that attribue's value; otherwise, it is 0.</p>
+
+    <p>If the <code title="attr-meter-max">max</code> attribute
+    attribute is specified, then the <var title="">maximum</var> is
+    that attribue's value; otherwise, it is 1.</p>
+
+    <p>If there is exactly one number in the contents of the element,
+    then <var title="">value</var> is that number; otherwise, <var
+    title="">value</var> is the value of the <code
+    title="attr-meter-value">value</code> attribute.</p>
+
+    <p>The following inequalities must hold, as applicable:</p>
+
+    <ul class="brief">
+     <li><var title="">minimum</var> ≤ <var title="">value</var> ≤ <var title="">maximum</var></li>
+     <li><var title="">minimum</var> ≤ <code title="attr-meter-low">low</code> ≤ <var title="">maximum</var> (if <code title="attr-meter-low">low</code> is specified)</li>
+     <li><var title="">minimum</var> ≤ <code title="attr-meter-high">high</code> ≤ <var title="">maximum</var> (if <code title="attr-meter-high">high</code> is specified)</li>
+     <li><var title="">minimum</var> ≤ <code title="attr-meter-optimum">optimum</code> ≤ <var title="">maximum</var> (if <code title="attr-meter-optimum">optimum</code> is specified)</li>
+    </ul>
+
+    <p>If both the <code title="attr-meter-low">low</code> and <code
+    title="attr-meter-high">high</code> attributes are specified, then
+    the <code title="attr-meter-low">low</code> attribute's value must
+    be less than or equal to the value of the <code
+    title="attr-meter-high">high</code> attribute.</p>
+
+   </dd>
+
+  </dl>
+
+  <p>For the purposes of these requirements, a number is a sequence of
+  characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE
+  (9), optionally including with a single U+002E FULL STOP character
+  (.), and separated from other numbers by at least one character that
+  isn't any of those; interpreted as a base ten number.</p>
+
   <p>The <code title="attr-meter-value">value</code>, <code
   title="attr-meter-min">min</code>, <code
   title="attr-meter-low">low</code>, <code
   title="attr-meter-high">high</code>, <code
   title="attr-meter-max">max</code>, and <code
-  title="attr-meter-optimum">optimum</code> attributes are all
-  optional. When present, they must have values that are <span
-  title="valid floating point number">valid floating point
-  numbers</span>, and their values must satisfy the following
-  inequalities:</p>
+  title="attr-meter-optimum">optimum</code> attributes, when present,
+  must have values that are <span title="valid floating point
+  number">valid floating point numbers</span>.</p>
 
-  <ul class="brief">
-   <li><code title="attr-meter-min">min</code> ≤ <code title="attr-meter-value">value</code> ≤ <code title="attr-meter-max">max</code></li>
-   <li><code title="attr-meter-min">min</code> ≤ <code title="attr-meter-low">low</code> ≤ <code title="attr-meter-high">high</code> ≤ <code title="attr-meter-max">max</code></li>
-   <li><code title="attr-meter-min">min</code> ≤ <code title="attr-meter-optimum">optimum</code> ≤ <code title="attr-meter-max">max</code></li>
-  </ul>
-
-  <p>All <code>meter</code> elements must have a value specified
-  somehow, either using the <code
-  title="attr-meter-value">value</code> attribute or by including a
-  number in the contents of the element.</p>
-
   <p class="note">If no minimum or maximum is specified, then the
   range is assumed to be 0..1, and the value thus has to be within
   that range.</p>
@@ -14964,6 +15051,8 @@
    <dd>Uses <code>HTMLElement</code>.</dd>
   </dl>
 
+  <!-- v2: Add a <credit> element for photo credits -->
+
   <p>The <code>figure</code> element represents some <span>flow
   content</span>, optionally with a caption, which can be moved away
   from the main flow of the document without affecting the document's




More information about the Commit-Watchers mailing list