Hi Tjorven,

   It does look like there may be a bug here.
The batik.svggen.XMLWriter doesn't seem to output
processing instructions, however looking at the code
it would appear that it would throw an exception which
you don't seem to be reporting.  Additionally the
code you show wouldn't actually print your document
anyways - so I wonder if you don't have other problems
as well.

   BTW batik.dom.util.DOMUtilities.writeNode does
output ProcessingInstructions, although it doesn't do all
the nice SVG header stuff for you (obviously the
code should be merged and centralized somewhere for both
to use).


Tjorven Lauchardt wrote:


Hi,

I have another question: I export an SVG Document (doc) this usual way:

SVGGraphics2D generator = new SVGGraphics2D(doc);
try {
    OutputStream out = new FileOutputStream(somefile);
    Writer w = new OuptutStreamWriter(out,"UTF-8");
    generator.stream(doc.getDocumentElement(),w,true);
}...

But there is no CSS included oder at least a reference. I added the reference to the external CSS to the doc this way:

SVGStyleSheetProcessingInstruction css = (SVGStyleSheetProcessingInstruction)d.createProcessingInstruction("xml-stylesheet","type=\"text/css\" href=\""+styleSheetUri+"\"");
d.insertBefore(css,d.getDocumentElement());


Thank you!

Regards, Tjorven


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to