W3C home > Mailing lists > Public > public-html@w3.org > July 2007

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

From: Geoffrey Sneddon <foolistbar@googlemail.com>
Date: Wed, 11 Jul 2007 14:39:14 +0100
Message-Id: <428EF93A-95AE-4331-B993-EE43907C67E5@googlemail.com>
Cc: public-html@w3.org
To: Smylers <Smylers@stripey.com>

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

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:24 UTC