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

Geoffrey Sneddon writes:

> 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

True, but the doc for the <meter> element also has examples like those I
gave.  I am sure that they work by design, rather than by chance, and as
such any definition of a valid ratio should (as the spec currently
stands) allow for them.

Of course it may be that a proposal to change <meter> (or ratios) is
accepted, but that's a different matter.  In either case any definition
should match what is said elsewhere in the spec, so until we have such a
change the definition of a ratio should allow for ratios like those in
the examples.

> 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).

I think it's very unlikely that an example would have been included
which is not valid (except of course in the case of being an example of
something invalid, and marked as such, which in this case it clearly
isn't).

Smylers

Received on Wednesday, 11 July 2007 14:08:34 UTC