[whatwg] meter with Max Specified Twice

2007-07-12 Thread Smylers
Under the current spec these meter elements both have a value of 7:

  meter7/10/meter

  meter max=107/meter

but this one has a value of zero (while still having a max of 10):

  meter max=107/10/meter

While specifying the max value twice like this is obviously redundant,
in the cases where both values are the same it's unambiguous and
arguably harmless.

Is there merit in allowing this case?

If not, would some other failure mode be less confusing?  It seems a
little awkward that when double-specifying one attribute that
attribute's value gets set as specified and it's an entirely different
one which has its apparent value ignored.

Smylers


[whatwg] Implementation + Test Cases Available For Numbers Subsection of Common Microsyntaxes

2007-07-12 Thread Geoffrey Sneddon
Now my review of this subsection is complete, it is now worthwhile  
publicising my 1:1 PHP implementation of the HTML 5 algorithms,  
including the numbers subsection at http://geoffers.no-ip.com/svn/ 
php-html-5-direct/src/trunk/numbers.php. There are also test cases  
(that follow the spec even when there are issues with it) at http:// 
geoffers.no-ip.com/svn/php-html-5-direct/tests/numbersTest. Results  
for currently shipping UAs (esp. browsers) would be greatly welcomed.


- Geoffrey Sneddon




[whatwg] meter with Only 1 Number

2007-07-12 Thread Smylers
meter in the current spec refers to 'the steps for finding one or two
numbers of a ratio in a string', and the user-agent requirements for
determining the maximum value explicitly allow for the textContent to
contain just one number (and no denominator punctuation character) --
for example if the maximum is specified in the attribute, or if the
default max of 1 is desired:

  http://www.whatwg.org/specs/web-apps/current-work/#meter

So these should be allowed:

  meter max=53/meter

  meter0.59/meter

However the steps referred to don't, despite their name, seem to have
any way of returning just 1 number:

  http://www.whatwg.org/specs/web-apps/current-work/#ratios

The only places where the steps return something (as distinct from
nothing) are step 8, which returns a number and a denominator character,
and step 14, which returns two numbers.

In particular for a meter like either of the above, the number will be
parsed as number1 in step 4, then steps 6-8 will have no affect (because
there is no denominator character), step 9 will fail to find a second
number, and therefore step 10 will return nothing.

I think that making step 10 instead return number1 will yield the
desired behaviour.

Smylers