|
Hi ppl,
First i have to apologize for this "not so batik subject"
but i think that someone here can help me.
So, i download crimson XML parser (from http://xml.apache.org/dist/crimson/)
in order to parse XML/SVG files and i use an example DOMEcho.java that cames
with the distribution and it works fine but only when i'm online (it goes get
the DTD to w3c).
How can i do an offline parser?
You can specify your own DTDHandler that will recognize the SVG public
identifier, and use a DTD on your DTD instead of the one available on the Web.
Batik for instance, has its own DTDHandler and if the public identifier is one
of the 'standard' one, we take the SVG DTD from our
resources.
For further details, you can have a look at the
org.apache.batik.dom.util.SAXDocumentFactory class or the
org.apache.batik.dom.svg.SAXSVGDocumentFactory class.
Hope that helps,
Thierry.
|