Hello,

I am currently updating that part of the code so that we can easily specify a list of public identifiers for which Batik will load a local system identifier instead of the one given in the SVG document. This is what we already do for the SVG 1.0 public identifier, and this will be extended (for SVG 1.1 but you could reuse the mechanism for your own system identifiers even though that should not be needed if you use the standard SVG 1.0 or 1.1 system ids).

Vincent.

Thomas E Deweese wrote:
"EM" == Eyrignoux Marc <[EMAIL PROTECTED]> writes:

EM> Hi everybody, I am writing an application in a "protected"
EM> environment, ie. there is no link to the internet.

EM> When Batik generates the SVG stream, it precises the URL of the
EM> DTD in the DOCTYPE tag => my program tries to connect to
EM> http://www.w3.org/TR/2001/REC-SVG-0010904/DTD/svg10.dtd => I get
EM> an exception (UnknownHost) => Nothing works further

EM> The DTD is furnished in one of the jars of Batik: is there any way
EM> to tell Batik to use it, instead of using a URL ?

This might be possible but I think the real solution is to fix
your application so it handles this 'well known' DTD location with the
local copy.
This is what Batik does in it's
...batik.dom.svg.SAXSVGDocumentFactory class by registering an
EntityResolver (actually done in batik.dom.util.SAXDocumentFactory).

In the resolveEntity Method you get a chance to look at the public
and system Id's and map them to a local entity.

EM> Thanks in advance, Marc Eyrignoux

EM> PS: Thanks for replying to the mailing and to [EMAIL PROTECTED]


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




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

Reply via email to