ISSUE with SVGLength

Dear SVG WG,

I have found a problem in the specification of SVGLength. The issue 
arises when the unitType happens to be a value other than 
SVG_LENGTHTYPE_NUMBER or SVG_LENGTHTYPE_PX, and the SVGLength does not 
have sufficient context to allow conversion to and from user units and 
it's unit type. For example, consider the following short script.

   var length = document.documentElement.createSVGLength();
   length.newValueSpecifiedUnits(length.SVG_LENGTHTYPE_PERCENTAGE, 100);
   alert(length.value);  // so what's its value in user units?

This situation may also happen when the SVGLength belongs to an element 
that exists in a document fragment that is not embeded in a document.

The behavior of value, valueAsString, newValueSpecifiedUnits or 
convertToSpecifiedUnits when insufficient context exists should be 
defined. Perhaps a new exception is in order here?

Regards,
Jonathan

Received on Friday, 8 April 2005 19:31:43 UTC