Re: How to parse SVG Fragment Identifiers

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  

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 <>  

> 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 <> 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.
>> (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:

Received on Thursday, 30 August 2012 15:06:16 UTC