W3C home > Mailing lists > Public > www-svg@w3.org > August 2012

Re: How to parse SVG Fragment Identifiers

From: Erik Dahlstrom <ed@opera.com>
Date: Thu, 30 Aug 2012 17:05:42 +0200
To: www-svg@w3.org
Message-ID: <op.wjuz7sy3geuyw5@gnorps>
In Opera we reuse our existing attribute parsers, and commas are not  
allowed there in all cases.

The spec does lack clarity on whether urlescaped characters are allowed  
and if they should be unescaped before passing it to the sub-parsers, and  
indeed Opera fails if %20 is used instead of a space, e.g  
#svgView(preserveAspectRatio(xMinYMin%20slice)).

It's not hard to add support for commawsp separation of the values, but in  
that case we should allow commawsp separation in the attributes too. It's  
just annoying (and confusing) if the syntax has to be different.


On Wed, 29 Aug 2012 00:25:38 +0200, Robert Longson <longsonr@gmail.com>  
wrote:

> I was only testing preserveAspectRatio at that point. Batik only
> accepts commas for viewBox. Not sure about Opera.
>
> Robert
>
> On 28 August 2012 23:08, Daniel Holbert <dholbert@mozilla.com> wrote:
>> On 08/27/2012 04:27 PM, Cameron McCormack wrote:
>>>
>>> Daniel Holbert:
>>>>
>>>> But the same logic would apply to viewBox -- you could easily use %20
>>>> instead of spaces there, too, but the spec says you have to use  
>>>> commas.
>>>>   Should we nix the special-case comma syntax there as well?
>>>
>>>
>>> Hmm.  Have you tested other implementations to see if they accept  
>>> commas
>>> inside viewBox()?
>>
>>
>> I haven't, but Robert Longson has at least somewhat.  He says:
>>
>>   b) In a triumph of interoperability Batik only accepts commas
>>   and Opera only accepts spaces.
>>
>>
>> https://bugzilla.mozilla.org/show_bug.cgi?id=783915#c10
>>
>> (I believe he was talking about both viewBox and preserveAspectRatio, in
>> svgView() -- correct me if I'm wrong, Robert)
>>
>> ~Daniel


-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Thursday, 30 August 2012 15:06:16 GMT

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