[whatwg] several messages

Christoph Päper christoph.paeper at crissov.de
Sun Mar 30 16:21:12 PDT 2008


Ian Hickson (2008-03-23):
> On Tue, 18 Mar 2008, Christoph Päper wrote:
>>>
>>> a <span>valid non-negative integer</span> greater than zero.
>>
>> Isn't that the description of a valid positive integer? If that  
>> term is
>> not used or defined yet, why not?
>
> Because "positive" is confusing to people. Some people (including me)
> think that 0 is positive.

Sure, but I thought "non-negative integer" was used to make it clear  
that zero was included. Thus for the (fewer) instances like this one,  
where zero is excluded, "positive integer" becomes available. You  
only need to say this once in 3.2.3., which is linked each time any  
way, and thereby improve readability. You could of course adopt the  
other definition of 'positive' instead.

Btw., there is a typo in the first sentence of 3.2.3.1.: the second  
'of' should be an 'or'.

Comparison of character string length:
                                                       Zero  Count
-oo .. +oo   integer                                  ind.    7      i
-oo .. -1    negative integer                         ind.   16     -i
              non-positive integer less than zero      sep.   35    ! 
+i<0
              non-positive integer                     pos.   20    !+i
-oo ..  0    negative integer or zero                 ind.   24     -i|0
              non-positive integer                     sep.   20    !+i
              non-positive integer or zero             pos.   28    ! 
+i|0
   0 .. +oo   non-negative integer                     ind.   20    !-i
              positive integer or zero                 sep.   24      
+i|0
              positive integer                         pos.   16     +i
   1 .. +oo   non-negative integer greater than zero   ind.   38    !- 
i>0
              positive integer                         sep.   16     +i
              positive integer greater than zero       pos.*  34      
+i>0

pos.: zero is positive
sep.: zero has a separate state
ind.: independent of choice (based on "negative" never includes zero)

The second and third case (only negative integers) are virtually  
unneeded in HTML5.

     ind. sep. pos.
   0  20   24   16
   1  38   16   34
   ø  29   20   25

On average character count supports non-positive zero (especially if  
combined with ind. wording), but if zero is usually included in  
HTML5, it may make sense to use "positive" in that way. The fully  
independent wording currently chosen is the worst alternative (by  
this criterion).

So either
   non-negative integer / positive integer
(instead of
   positive integer or zero / positive integer)
or
   positive integer / positive integer greater than zero,
but neither
   non-negative integer / non-negative integer greater than zero
nor
   non-negative integer / positive integer greater than zero.

One may consider these independet formulations, too:

-oo .. -1    integer less than zero                   ind.   22      i<0
-oo ..  0    integer less than one                    ind.   21      i<1
   1 .. +oo   integer greater than zero                ind.   25       
i>0

.oO(Much fuzz about "nothing".)

>> Why can |rowspan|, unlike |colspan|, be 0, but is then also  
>> normalised to 1?
>
> It's not normalised to 1, is it? I don't understand.


It is not, I misinterpreted this sentence:

   Its default value, which must be used if parsing the attribute as a
   non-negative integer returns an error, is also 1.




More information about the whatwg mailing list