Re: Assitance with potential spec ambiguities

On Tue, 23 Mar 2010 17:53:49 +0100, Patrick Dengler <>  

> I am happy to address these in email or on our teleconference.  As  
> always, please forgive me if these have been already addressed. I do  
> look at the issue tracker and updates to 1.1 2nd edition.
> SVGException SVG_INVALID_VALUE_ERR details
> =====================================
> In the code below:
>     l = document.getElementById("svg").preserveAspectRatio.baseVal.align;
>     alert(l);
>     try
>     {
>     document.getElementById("svg").preserveAspectRatio.baseVal.align =  
> -1;
>     }
>     catch(e)
>     {
>     alert("exception:" + e);
>     }
>     l = document.getElementById("svg").preserveAspectRatio.baseVal.align;
>     alert(l);
>    Opera/Chrome - no exception, second output = 65535
>    FF3.6 - Throws an exception, second output = 6  (correct in the page  
> context)

That looks like a bug in Opera/Chrome, even if the spec doesn't clearly  
say what to do in this case. Did you verify that doing this caused the pAR  
to be ignored (basically that the pAR="xMidYMid meet" default value was  
used instead)?

> Essentially the spec is implying that this exception should be thrown in  
> cases like this - although the exception is listed explicitly in the  
> spec in only a few places (e.g. SVGColor).

FWIW SVGColor is one of the interfaces that are deprecated in SVG 1.1F2.

> For the case above
> 1. Should the browser throw an exception in this particular instance?  
> (on setting this invalid value)
> 2. Should the browser set the value to SVG_PRESERVEASPECTRATIO_UNKNOWN  
> or keep the value attempted to be set.
> 3. Should the browser throw an exception in all cases when attempting to  
> set an invalid value? (anywhere an invalid value is set which lacks a  
> more specific exception code) and should that exception be  

A fourth possible option could be to set the pAR to the lacuna/default  
value on attempting to assign an out-of-range value, but I don't think  
that's a good option.


Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog:

Received on Wednesday, 24 March 2010 08:17:16 UTC