Re: Ratios Do Not Return Errors (part of detailed review of common microsyntaxes)

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

>
> Geoffrey Sneddon writes:
>
>> The rest of the numbers within common microsyntaxes return errors
>> when they are unable to return anything else, yet ratios "return
>> nothing" ... why do ratios return nothing and not false?
>
> Look at the definition of the <meter> element; getting numbers out  
> of a
> ratio is optional (since they can also be specified with  
> attributes, or
> default values used), so it is not an error for no numbers to be
> returned when trying to parse a ratio:
>
>   http://www.whatwg.org/specs/web-apps/current-work/#meter


However, you only ever try and parse the textContent if @value has  
been omitted. If @value has been omitted and the content parses to be  
nothing, @value is currently assumed to be zero. Surely we should  
require, when @value is missing, a value to be able to be found  
within |meter|?

Received on Wednesday, 11 July 2007 13:39:25 UTC