xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dylan Browne" <dbro...@mango-solutions.com>
Subject RE: Attrbutes Generated For USE tag
Date Fri, 11 Apr 2008 13:07:44 GMT
*       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,





From: thomas.deweese@kodak.com [mailto:thomas.deweese@kodak.com] 
Sent: 11 April 2008 12:11
To: batik-users@xmlgraphics.apache.org
Cc: batik-users@xmlgraphics.apache.org
Subject: Re: Attrbutes Generated For USE tag


Hi Dylan,

"Dylan Browne" <dbrowne@mango-solutions.com> 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

   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