xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Thomas <jus...@brynnandjustin.com>
Subject Re: SVG Versions and DOCTYPE
Date Mon, 05 Apr 2010 16:41:47 GMT
Thanks Thomas; I'll take a look at that.  I ended up using the Batik  
generated SVG as an intermediate file that I then reprocessed using  
JDOM to modify the SVG to suit my needs (I also needed to define some  
custom attributes to specific SVG entities prior to the document - I  
use some custom tags to embed data for handling by JavaScript and the  
W3C validator complains if I don't properly define them ahead of  
time.  :) ).

Sent from my iPhone
On Apr 5, 2010, at 3:51 AM, thomas.deweese@kodak.com wrote:

> Hi Justin,
>
> Justin Thomas <justin@brynnandjustin.com> wrote on 03/24/2010  
> 05:09:19 PM:
>
> > I've noticed that Batik claims to support SVG 1.1.  However, the
> > SVG_SYSTEM_ID and SVG_VERSION constants conform to SVG 1.0 and Batik
> > generates the DTD and version parameters in the outputted document
> > according to those values.  Is that the correct behavior?  I'm using
> > Batik 1.7 within a Java web application to generate SVG images.
>
>     For the purposes of this output it's 1.0 compliant (really SVG 1.1
> added modularization and clarifications) so I think it's correct to  
> write
> the earliest version of SVG to which the document conforms, don't  
> you think?
>
> > Also, is there any way to insert ProcessingInstructions in a created
> > document to instruct a browser to use a CSS xml-stylesheet?  I've
> > tried every permutation I can think of to insert the values, and
> > Batik seems to just ignore my efforts.
>
>    You don't say but I assume you are using the SVGGraphics2D class to
> create the SVG?  If so you can't create Processing instructions in  
> that
> class, but if you retrieve the generated DOM from the SVGGraphics2D
> (using getRoot) then you can add ProcessingInstrutions your self and  
> use
> the batik.dom.util.DOMUtilities class to output the updated document
> (that might also let you change the SYSTEM_ID as well).

Mime
View raw message