- From: Doug Schepers <schepers@w3.org>
- Date: Tue, 23 Mar 2010 08:31:03 -0400
- To: Jeff Schiller <codedread@gmail.com>
- CC: www-svg <www-svg@w3.org>
Hi, Jeff- Our intent is to go through all our "microsyntaxes" for the various attributes that take lists, and unify the delimiters (to the extent possible). So, this syntax should be allowed, and we will also clarify that the poly twins can take negative values. If changes are needed to the EBNF or the prose, we will make them. Thanks for bringing this to our attention. I've raised an issue about this in our Tracker, for future reference: http://www.w3.org/Graphics/SVG/WG/track/issues/2314 Regards- -Doug Schepers W3C Team Contact, SVG and WebApps WGs Jeff Schiller wrote (on 3/22/10 6:01 PM): > Two-part question. > > 1) The SVG spec states that superfluous whitespace (and comma) can be > removed from the path's d attribute [1] so that > > L 100, -100 > > can be written as > > L100-100 > > Is this described in the EBNF grammar [2] ? I'm not a EBNF expert but > couldn't find that. If this is not something you can effectively > represent in EBNF, could an example be added to the bulleted list of > shortcuts so that it is clear that negative coordinates can be handled > this way? > > 2) My second question is whether this grammar also applies to the > polygon/polyline points attribute? Can > > points="100, -100" > > be rewritten as > > points="100-100" > > Doing a quick test shows that Opera, WebKit and IE9 support this > shortcut but Firefox does not. I couldn't find the rule in the > grammar. > > Here's my test file: > > <?xml version='1.0' encoding='utf-8'?> > <svg xmlns="http://www.w3.org/2000/svg"> > <polygon fill="red" transform="translate(100,100)" > points="0,0,100,0,100,-100,0,-100" /> > <polygon fill="green" transform="translate(100,100)" > points="0,0,100,0,100-100,0-100" /> > </svg> > > Since most browsers seem to support it and it aligns with path's @d I > guess it would make sense to allow it. Can you clarify the points > grammar [3] in a similar fashion? > > Thanks, > Jeff Schiller > > [1] http://dev.w3.org/SVG/profiles/1.1F2/publish/paths.html#PathDataGeneralInformation > [2] http://dev.w3.org/SVG/profiles/1.1F2/publish/paths.html#PathDataBNF > [3] http://dev.w3.org/SVG/profiles/1.1F2/publish/shapes.html#PointsBNF > >
Received on Tuesday, 23 March 2010 12:31:04 UTC