W3C home > Mailing lists > Public > www-svg@w3.org > April 2010

Re: Negative values in polygon/polyline points

From: Jeff Schiller <codedread@gmail.com>
Date: Sun, 11 Apr 2010 21:44:53 -0500
Message-ID: <m2tda131fde1004111944r66580676r1b68427dea645d7a@mail.gmail.com>
To: Chris Lilley <chris@w3.org>
Cc: www-svg <www-svg@w3.org>
Hi Chris,

On Thu, Apr 8, 2010 at 4:06 PM, Chris Lilley <chris@w3.org> wrote:
>
> On the call we found that suboptimal, and wondered about rewriting the EBNF, but worried it would become rather huge.

I'd worry about this too and shudder to have to write it :)

>
> JS> I'm not a EBNF expert but
> JS> couldn't find that.  If this is not something you can effectively
> JS> represent in EBNF, could an example be added to the bulleted list of
> JS> shortcuts so that it is clear that negative coordinates can be handled
> JS> this way?
>
> Yes, we can do that. The first of the bullet points I quoted above could be expanded to cover that case.
>
> The EBNF could be changed also, but only by adding separate productions for positive and negative numbers

shudder....

Maybe just put a note above/below the formal grammar mentioning the
two items that modify the grammar and a link?

>
> If we can add it to the grammar for 1.1SE we will, otherwise we will add clarifying prose.
>
> Another thing that came up on the call - you mention not being a BNF or EBNF expert. Is there another formalism which would be easier to understand? (Perhaps not for 1.1SE,  but we could switch to something better for 2.0)

No, I think BNF/EBNF is the industry standard for grammars and don't
want to learn another :)

It just kind of irked me that the examples given in the prose are the
simplest kind (all positive numbers greater than 1).  Suggest putting
examples with negative numbers and fractional numbers without a
leading zero (.4)

> Also, would sample code help? We wondered about having code that will take a path, check its valid, and then either make it most readable (lots of whitespace and commas, add omitted path commands) or maximally compact.

I think examples go a long way, but not sure about full-blown complete
XML files.  just d="...." might be fine.

Regards,
Jeff
Received on Monday, 12 April 2010 02:45:26 GMT

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