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

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 UTC