Hi Dylan, "Dylan Browne" <[EMAIL PROTECTED]> wrote on 04/07/2008 05:31:00 AM:
> I have a question about the attributes that are added into my ?use? > tag when I generate it. Basically I am attempting to ?streamline? my > SVG to reduce file size, so any attributes that are not required I?d > like to strip out. So the attributes you are concerned about are added because the DTD says they should be added. You can detect them on output by checking 'getSpecified' on the Attribute Node (it will return false for these). > I was wondering if there was a way I could remove the inclusion of > the xlink namespace etc, as these are defined in the root of my SVG document? Not really the SVG specification says they must be present in the DOM. > I?ve tried doing a removeAttributeNS but either this is not possible > or I am attempting to reference them by the wrong namespace. I?ve > tried variations on something like this: Right if you "remove" then the DTD puts them back ;) We should probably filter these attributes on output in our various writhing utilities, however I've been reluctant to do that since they shouldn't hurt anything downstream (although they do increase file size).
