You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by David Mechner <fo...@mechner.com> on 2002/10/24 23:19:09 UTC

Re[2]: http get to w3.org?

Thanks for the response.

I decided your first suggestion looks by far the simplest.

>From my reading of the batik docs the following is supposed
to do the trick:

DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
String svgNS = "file:///c:/gra/svg10.dtd";
Document doc = impl.createDocument(svgNS, "svg", null);

(instead of createDocument(null, "svg", null))

However, supplying the local file svgNS URI seems to have no effect on
the generated svg doc.

It still starts out:

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

Am I misunderstanding?

Thanks,
-David


You wrote:
OT> David Mechner wrote:

>> I'm using Xalan/Xerces/FOP/Batik to generate PDF reports including SVG
>> graphics. I noticed that each time a report is generated, at some
>> point in the process an http connection to w3.org is made. For some
>> reason I think it's to retrieve the svg .dtd, but I'm not sure.

OT> Well, it could be dtd. By default parsers load the DTD and use it to add 
OT> default attributes and set attribute types, so probably that's the case.
OT> Your options:
OT> o change uri to a local copy of the dtd
OT> o turn off dtd loading in your parser (e.g. 
OT> http://apache.org/xml/features/nonvalidating/load-dtd-grammar feature if you 
OT> are using xerces)
OT> o use XML Catalog + Norm Walsh's URIResolvers to redirect parser to a local 
OT> resource.