Re: Lack Of Definition Of A Valid Ratio (part of detailed review of common microsyntaxes)

I wrote:

> Robert Burns writes:
> 
> > Also I think step 6 of the algorithm:
> > 
> > "If there are still further characters in the string, and the next  
> > character in the string is a valid denominator punctuation character,  
> > set denominator to that character."
> > 
> > should be changed to something like:
> > 
> > "If there are still further characters in the string, and the next  
> > character in the string is a valid denominator punctuation character,  
> > set denominator to the value associated with that character from  
> > table [tableref]"
> 
> Note the doc for <meter>'s 'The maximum value' says:
> 
>   if the result was one number but it had an associated denominator
>   punctuation character, then the maximum value is the value associated
>   with that denominator punctuation character; and finally, if there
>   were two numbers parsed out of the textContent, then the maximum is
>   the higher of those two numbers.
> 
> So the translation from denominator to value is taking place at that
> place rather than in the defintion of ratio itself.  This enables
> <meter> to know what any denominator is, so it could use that in its
> rendering.

Also the above change would make the ratio here:

  <meter>110%</meter>

return the two numbers 110 and 100, which is exactly what would be
returned from the ratio here:

  <meter>100/110</meter>

and will cause max to be 110 (and the value be 100).  I think it would
surprise people to write "%" and have situations in which max is
anything other than 100.

Whereas without the above change, % will always cause max to be 100 (the
value will then be truncated to the max, so it will also be 100 in this
case).

Smylers

Received on Saturday, 14 July 2007 15:32:48 UTC