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

On Jul 13, 2007, at 2:30 PM, Smylers wrote:

>
> 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).


Well,I'm still learning how the <meter> and <progress> elements  
interact with these number algorithms. Its not clear to me whether  
improper fractions are re-arranged by the elements.

However, from your original response, it occurred to me that an  
important use-case for preserving the denominator character would be  
if the <meter> or <progress> have the max value set themselves. Then  
the percent information would be relevant so the element didn't  
discard the max value and replace it with 100. In other words if max  
is set to 225 and the element receives 75/100 instead of 75 and %,  
the 225 maximum would not be preserved.

As for whether 110% is a valid ratio for these elements, that's  
something to be worked out (as your recent exchange with Ian  
indicates [1]). I don't have have a strong opinion on that either  
way. Though passing 110 and % should just treated consistently with  
whatever is decided for improper fractions. In other words if  
improper fractions are rearranged then, perhaps, so too should 110%.  
However, if something like 112 / 87 is permitted, then so to should  
110/100 for 110%. However, turning 110% into 100/110 seems even more  
presumptuous than treating a 112 preceding an 87 as 87 / 112.

[1]: <http://lists.w3.org/Archives/Public/public-html/2007Jul/0690.html>

Take care,
Rob

Received on Saturday, 14 July 2007 19:48:38 UTC