[xep-support] SVG DTD download errors

Gerd v. Egidy gerd.von.egidy at intra2net.com
Tue Oct 24 01:09:10 PDT 2023


Hi,

I include some svg files into my fo file like this:

<fo:external-graphic width="auto" height="auto" content-width="36pt" 
src="url(images/admon/caution.svg)" />

This svg file contains a doctype with a external URL to the DTD:

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/
SVG/1.1/DTD/svg11.dtd">

This results in XEP downloading this DTD file every time such a SVG is 
included.

Recently W3C implemented two changes on their server: they automatically 
redirect to HTTPS and they have implemented a limit how often you can download 
a file in short succession. When they still used HTTP my local proxy server was 
able to serve the dtd from cache after the first download.

My fo contains hundreds of such SVG files, causing hundred of downloads to this 
file. After the first few I get this:

        [error] Failed to create image file:./images/admon/caution.svg of type 
null
        [error] com.renderx.graphics.ImageFormatException: 
org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 100; Cannot read 
from http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd (Server returned HTTP 
response code: 429 for URL: http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd)

Is there a way to tell XEP not to download the DTDs or can I redirect them, so 
that they are loaded from some local cache directory on my disk?

Thanks.

Kind regards,

Gerd






More information about the Xep-support mailing list