xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: Attrbutes Generated For USE tag
Date Fri, 11 Apr 2008 11:11:24 GMT
Hi Dylan,

"Dylan Browne" <dbrowne@mango-solutions.com> wrote on 04/07/2008 05:31:00 

> 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 

   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).
View raw message