I have a SVG document that begins like
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- a comment -->
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="297mm"
height="210mm" style="shape-rendering:geometricPrecision;
text-rendering:geometricPrecision; image-rendering:optimizeQuality;
fill-rule:evenodd; clip-rule:evenodd"
viewBox="0 0 297 210">
And I parse it using
String parser = XMLResourceDescriptor.getXMLParserClassName();
SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
File file = new File("C:\\file.svg");
URI localFileAsUri = file.toURI();
org.w3c.dom.Document doc =
f.createSVGDocument(localFileAsUri.toString() );
And then I output the document
<?xml version="1.0" encoding="UTF-8"?>
<svg width="297mm" xmlns:xlink="http://www.w3.org/1999/xlink"
style="shape-rendering:geometricPrecision;
text-rendering:geometricPrecision; image-rendering:optimizeQuality;
fill-rule:evenodd; clip-rule:evenodd" viewBox="0 0 297 210" height="210mm"
xmlns="http://www.w3.org/2000/svg" xml:space="preserve">
as you can see DOCTYPE and comments are missing. Why?
It would appear that the parser has removed or omitted them on input.
Can you explain?
--
View this message in context:
http://www.nabble.com/DOCTYPE-and-COMMENTS-ignored-by-batik-parser-SAXSVGDocumentFactory-tp16001432p16001432.html
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]