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

On 11 Jul 2007, at 13:13, Smylers wrote:

>> Due to the algorithm returning at all sorts of places, it is rather
>> complex to work out, but I think:
>>
>> [[
>> A string is a valid ratio if it consists of either one of more
>> characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE
>> (9) followed by a denominator punctuation character (see table
>> below), or two valid unsigned integers separated by one or more
>> characters in Unicode character class Zs.
>> ]]
>
> That's wrong.  Your definition fails to allow these, which the  
> algorithm
> accepts and turns into a valid ratio:

Just because the algorithm doesn't return errors doesn't make it  
valid (as the UA conformance requirements are different to the  
document conformance requirements). For example, a number is an  
invalid integer if it has whitespace before it, yet the algorithm  
will parse it without producing errors. However, I'm not completely  
sure of what Hixie's intentions in what to allow within the  
<progress> and <meter> elements were (and all either of us can do is  
guess from the UA conformance requirements).


- Geoffrey Sneddon

Received on Wednesday, 11 July 2007 13:28:54 UTC