extra commas in path data

A student recently submitted something that seemed to work everywhere except Firefox. I had a difficult time tracking down the problem.

In http://granite.sru.edu/~ddailey/svg/funnyFillinFF.svg two paths are drawn one with 
d="M 336,325   Q 251,325  251,292, Q 251,259 336,259 Q 421,259 421,292 Q 421,325 336,425 z M 286,309 336,270 386,309 z" >
the other with
d="M 336,325   Q 251,325  251,292  Q 251,259 336,259 Q 421,259 421,292 Q 421,325 336,425 z M 286,309 336,270 386,309 z" >

The only difference is the comma before the second Q.

At  http://www.w3.org/TR/SVG/paths.html#PathDataGeneralInformation, the spec says "Superfluous white space and separators such as commas can be eliminated."   That was as far as I looked before filing a bug with FF.

But many of you know Robert Longson who correctly ( I think, having just looked at the BNF )  points out:

"Per http://www.w3.org/TR/SVG/implnote.html#ErrorProcessing. If a 'path' element
is the first element which has an error and the only errors are in the path
data specification, then render the 'path' up to the point of the path data
error

And according to http://www.w3.org/TR/SVG/paths.html#PathDataBNF the extra
comma is an error"

The spec would seem to provide different advice for authors and implementers here, in the sense that an author would likely not read the more technical notes. 

Could ya'll consider loosening up the BNF to include superfluous commas here? 

Cheers
David

Received on Sunday, 30 January 2011 03:03:03 UTC