W3C home > Mailing lists > Public > public-html-diffs@w3.org > December 2008

spec/Overview.html 1.1780 2610 Define what numbers actually mean. Fix r

From: poot <cvsmail@w3.org>
Date: Mon, 29 Dec 2008 22:01:42 +0900 (JST)
To: public-html-diffs@w3.org
Message-Id: <20081229130142.DA45D2BC17@toro.w3.mag.keio.ac.jp>

Define what numbers actually mean. Fix ranges in the date microsyntaxes.
(whatwg r2610)

parse a month string
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1780.html#parse-a-month-string
valid month string
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1780.html#valid-month-string
2.4.3.2 Signed integers
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1780.html#signed-integers
rules for parsing floating point number values
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1780.html#rules-for-parsing-floating-point-number-values
valid date string
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1780.html#valid-date-string
2.4.2 Boolean attributes
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1780.html#boolean-attributes
2.4.3.3 Real numbers
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1780.html#real-numbers
rules for parsing integers
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1780.html#rules-for-parsing-integers
steps for finding one or two numbers of a ratio in a string
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1780.html#steps-for-finding-one-or-two-numbers-of-a-ratio-in-a-string
parse a date string
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1780.html#parse-a-date-string
find a number
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1780.html#find-a-number
2.4.3 Numbers
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1780.html#numbers
rules for parsing non-negative integers
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1780.html#rules-for-parsing-non-negative-integers

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1779&r2=1.1780&f=h
http://html5.org/tools/web-apps-tracker?from=2609&to=2610

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1779
retrieving revision 1.1780
diff -u -d -r1.1779 -r1.1780
--- Overview.html	29 Dec 2008 10:43:59 -0000	1.1779
+++ Overview.html	29 Dec 2008 12:58:43 -0000	1.1780
@@ -1654,7 +1654,8 @@
   match for the attribute's canonical name, with no leading or
   trailing whitespace.<h4 id=numbers><span class=secno>2.4.3 </span>Numbers</h4><h5 id=non-negative-integers><span class=secno>2.4.3.1 </span>Non-negative integers</h5><p>A string is a <dfn id=valid-non-negative-integer>valid non-negative integer</dfn> if it
   consists of one of more characters in the range U+0030 DIGIT ZERO
-  (0) to U+0039 DIGIT NINE (9).<p>The <dfn id=rules-for-parsing-non-negative-integers>rules for parsing non-negative integers</dfn> are as
+  (0) to U+0039 DIGIT NINE (9).<p>A <a href=#valid-non-negative-integer>valid non-negative integer</a> represents the number
+  that is represented in base ten by that string of digits.<p>The <dfn id=rules-for-parsing-non-negative-integers>rules for parsing non-negative integers</dfn> are as
   given in the following algorithm. When invoked, the steps must be
   followed in the order given, aborting at the first step that returns
   a value. This algorithm will either return zero, a positive integer,
@@ -1701,7 +1702,12 @@
   </ol><h5 id=signed-integers><span class=secno>2.4.3.2 </span>Signed integers</h5><p>A string is a <dfn id=valid-integer>valid integer</dfn> if it consists of one of
   more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT
   NINE (9), optionally prefixed with a U+002D HYPHEN-MINUS ("-")
-  character.<p>The <dfn id=rules-for-parsing-integers>rules for parsing integers</dfn> are similar to the
+  character.<p>A <a href=#valid-integer>valid integer</a> without a U+002D HYPHEN-MINUS ("-")
+  prefix represents the number that is represented in base ten by that
+  string of digits. A <a href=#valid-integer>valid integer</a> <em>with</em> a
+  U+002D HYPHEN-MINUS ("-") prefix represents the <em>negative</em>
+  number represented in base ten by the string of digits that follows
+  the U+002D HYPHEN-MINUS.<p>The <dfn id=rules-for-parsing-integers>rules for parsing integers</dfn> are similar to the
   <a href=#rules-for-parsing-non-negative-integers title="rules for parsing non-negative integers">rules for
   non-negative integers</a>, and are as given in the following
   algorithm. When invoked, the steps must be followed in the order
@@ -1791,7 +1797,16 @@
 
     </ol></li>
 
-  </ol><p>The <dfn id=rules-for-parsing-floating-point-number-values>rules for parsing floating point number values</dfn> are
+  </ol><p>A <a href=#valid-floating-point-number>valid floating point number</a> represents the number
+  obtained by multiplying the significand by ten raised to the power
+  of the exponent, where the significand is the first number,
+  interpreted as base ten (including the decimal point and the number
+  after the decimal point, if any, and interpreting the significand as
+  a negative number if the whole string starts with a U+002D
+  HYPHEN-MINUS ("-") character), and where the exponent is the number
+  after the E, if any (interpreted as a negative number if there is a
+  U+002D HYPHEN-MINUS ("-") character between the E and the
+  number). If there is no E, then the exponent is treated as zero.<p>The <dfn id=rules-for-parsing-floating-point-number-values>rules for parsing floating point number values</dfn> are
   as given in the following algorithm. As with the previous
   algorithms, when this one is invoked, the steps must be followed in
   the order given, aborting at the first step that returns
@@ -1991,7 +2006,7 @@
    <li>Otherwise, return <var title="">number1</var> and
    <var title="">number2</var>.</li>
 
-  </ol><!-- XXX again, this should say "positive number" --><p>The algorithm to <dfn id=find-a-number>find a number</dfn> is as follows. It is
+  </ol><p>The algorithm to <dfn id=find-a-number>find a number</dfn> is as follows. It is
   given a string and a starting position, and returns either nothing,
   a number, or an error condition.<ol><li>Starting at the given starting position, ignore all characters
    in the given string until the first character that is either a
@@ -2291,7 +2306,7 @@
 
    <li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>,
    representing the month <var title="">month</var>, in the range
-   0&nbsp;&le;&nbsp;<var title="">month</var>&nbsp;&le;&nbsp;12</li>
+   1&nbsp;&le;&nbsp;<var title="">month</var>&nbsp;&le;&nbsp;12</li>
 
   </ol><p>The rules to <dfn id=parse-a-month-string>parse a month string</dfn> are as follows. This
   will either return a year and month, or nothing. If at any point the
@@ -2349,7 +2364,7 @@
 
    <li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>,
    representing <var title="">day</var>, in the range
-   0&nbsp;&le;&nbsp;<var title="">day</var>&nbsp;&le;&nbsp;<var title="">maxday</var> where <var title="">maxday</var> is the <a href=#number-of-days-in-month-month-of-year-year title="number of days in month month of year year">number of days
+   1&nbsp;&le;&nbsp;<var title="">day</var>&nbsp;&le;&nbsp;<var title="">maxday</var> where <var title="">maxday</var> is the <a href=#number-of-days-in-month-month-of-year-year title="number of days in month month of year year">number of days
    in the month <var title="">month</var> and year <var title="">year</var></a></li>
 
   </ol><p>The rules to <dfn id=parse-a-date-string>parse a date string</dfn> are as follows. This
Received on Monday, 29 December 2008 13:02:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 06:13:57 GMT