On Fri, 2009-07-10 at 16:07 -0700, Jon A. Cruz wrote:
On Jul 10, 2009, at 11:19 AM, Glimmer Labs wrote:
This is exactly what I wanted to hear. Now does this behavior mandate
that every element have an id attribute. I think Inkscape does this by
default now. But it is not required by SVG and Jon Cruz has mentioned
many times in the past that he would like to change our behavior. Are we
talking id attributes or is there a unique id per element inside of
Inkscape?
I wasn't aware that that wasn't part of the SVG spec. All of my
knowledge about this sort of thing comes from opening up the XML
editor and changing values to see what they do. If the id attributes
get dropped I'll have to find another way to represent objects,
hopefully one that isn't too messy.
Yes, one main thing is that we need to kill id attributes except when absolutely required. Among other things, it really clutters the XML, and complicates things for technical users.
Though, we will always have a Unique ID for nodes. Whether that be a memory address or something generated. We just need to in the API documentation specify that it may not be the same as the ID attribute in the XML document. There is no reason to make it more complex as the scripting environment just needs a handle to track elements and that one is handy right now.
--Ted