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

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

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 11 Jul 2007 21:26:18 +0000 (UTC)
To: Geoffrey Sneddon <foolistbar@googlemail.com>
Cc: Smylers <Smylers@stripey.com>, public-html@w3.org
Message-ID: <Pine.LNX.4.64.0707112123260.10866@dhalsim.dreamhost.com>

On Wed, 11 Jul 2007, Geoffrey Sneddon wrote:
> 
> 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).

Quoting from the spec for <meter>:

# Authoring requirements: The recommended way of giving the value is to 
# include it as contents of the element, either as two numbers (the higher 
# number represents the maximum, the other number the current value), or 
# as a percentage or similar (using one of the characters such as "%"), or 
# as a fraction.

I suppose I should give similar text in the <progress> section.

In any case, there are no limitations to what the contents of the <meter> 
and <progress> elements can be right now, which is why the spec doesn't 
define any particular authoring rules for determining if "one or two 
numbers of a ratio in a string" are valid or not. It's all valid, whatever 
it says (modulo other requirements), but it might not do what you want it 
to if you don't use a valid denominator punctuation character or two 
numbers in the right order.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 11 July 2007 21:26:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:02 GMT