W3C home > Mailing lists > Public > www-svg@w3.org > January 2011

extra commas in path data

From: ddailey <ddailey@zoominternet.net>
Date: Sat, 29 Jan 2011 22:02:30 -0500
Message-ID: <248834E6A4E34C7A9E88EF42FC4B6A15@disxgdg31szkx7>
To: <www-svg@w3.org>
Cc: "Robert Longson" <longsonr@gmail.com>
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 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:47 GMT