Re: Why the SVG DOM is so complex to use?

> The main reason for the having attributes in the DOM such as 'width' and 
> 'height' are so that you can have object-oriented access to the values, 
> rather than just as strings. Yes, in many cases, string access is 
> sufficient, but in other cases, there is a lot of value in object-oriented 
> access. For example, with an SVGLength, you can determine what unit type 
> was applied without having to write a parser.

Do you mean "without parsing the string" ?

I'm asking this because a conforming viewer should also support setAttribute so 
in any case the viewer must have a parser for CSS units, path, transform...

You can also imagine to use object-oriented access to set a value but use the 
getAttribute method to get the value. In that case, the viewer should create a 
String using the SVGLength.


Thierry.

-- 
Thierry Kormann
email: Thierry.Kormann@sophia.inria.fr  http://www.inria.fr/koala/tkormann/
Koala/Dyade/Bull @ INRIA - Sophia Antipolis

Received on Thursday, 31 August 2000 13:10:55 UTC