0

When Batik creates a SVG file it starts with:

<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
          'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>

When that is in there the Xerces call SAXParserImpl.parse() takes about 20 seconds to complete. If I remove that line it completes in well under a second.

Is there some way to tell SAXParserImpl to not go read the url? (I can't find a way in Batik to not write the DOCTYPE).

I'm in Java.

thanks - dave

David Thielen
  • 28,723
  • 34
  • 119
  • 193
  • Configure a resolver that returns nothing. – bmargulies Jan 03 '16 at 22:22
  • In my case it's SaxParser.parse(InputStream, DefaultHandler) where the DefaultHandler class has a resolveEntity() member. Same thing as the duplicate answer but slightly different classes. – David Thielen Jan 09 '16 at 22:18

0 Answers0