* Right if you "remove" then the DTD puts them back ;)
Pesky DTDs.... ;o) Thanks for that Thomas, it's much clearer now. I didn't appreciate that the spec defines that those attributes should be included. I had just got as far as experimenting and finding that an SVG file without those attributes included 'worked', but is obviously not compliant SVG. Thanks again guys for the help, cheers, Dylan ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 11 April 2008 12:11 To: [email protected] Cc: [email protected] Subject: Re: Attrbutes Generated For USE tag 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).
