Hello again,

I have spent a little more time on this and I have managed to get the
SVGOMDocument written out correctly using the JAXP  transformer classes.
So, I know now for certain that my DOM is correctly formed SVG.  I also did
not mention yesterday that the SAXSVGDocumentFactory.createDocument() may
be leaving some hanged threads running in the background.  I believe it may
have something to do with resolving URIs.  I arrived at this conclusion
because I am using a proxy server to access the internet and when using
JAXP to load my documents it was necessary for me to setup an
EntityResolver.  The EntityResolver resolves the DTD's URIs to a location
on my local network.   At this point I believe I may proceed without using
batik unless someone has some more insight into these problems that I have
encountered.  I am anxiously awaiting a response from anyone.

Thanks again,

Kendall Adkins

<- Previous Message ->

I have created a very simple class that does some SVG manipulation using
batik and I believe I have found a problem with the DOMUtilities class.  I
am loading an SVG file created with Corel Draw and then saving it back out.
The new SVG document is saved using the DOMUtilities.writeDocument()
method.  The document that is output is "not well-formed".  Here is the
code I am using to perform this operation.  Please let me know if I am in
error somehow.  I will continue to try and isolate the problem, however,
any help would be greatly appreciated.  Also, I did not know if I should
include attachments, so I did not send the SVG file itself.

File svgFile = new File(SVG_FILE);
String svgURL = svgFile.toURL().toString();
SAXSVGDocumentFactory svgDocFactory = new
SAXSVGDocumentFactory(XML_PARSER);
SVGOMDocument svgDoc = svgDocFactory.createDocument(svgURL);

File tmpFile = File.createTempFile("edg-",".svg",new File(TMP_DIR));
FileWriter svgFileWriter = new FileWriter(tmpFile);
DOMUtilities.writeDocument(svgDoc,svgFileWriter);
svgFileWriter.close();
System.out.println("Saved svg file : " + tmpFile.toString());

Thank you,

Kendall Adkins




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

Reply via email to