I have used org.apache.xml.resolver.tools.CatalogResolver
together with DocBook and it works nice, I coded it like thiS: ... //Create XML Reader XMLReader reader = XMLReaderFactory.createXMLReader(); //Create Catalog resolver CatalogResolver cr = new CatalogResolver(); //and set it on the reader reader.setEntityResolver(cr); There is also a configuration file that goes with it that, in my case. looks like: catalogs=file:///C:/DocBook/dtd/catalog.xml;file:///C:/DocBook/dtd/docbook.cat relative-catalogs=yes prefer=public static-catalog=yes catalog-class-name=org.apache.xml.resolver.Resolver verbosity=1 and also a xml catalog You can download it from: http://xml.apache.org/commons/components/resolver/ Hälsningar Lars Bjerges Team Verktyg * FöreningsSparbanken IT 105 34 Stockholm ( +46 (0)8 58 59 43 45 ( +46 (0)70 95 27 774 ________________________________ From: Andreas Grund [mailto:[EMAIL PROTECTED] Sent: Tue 11/29/2005 2:41 PM To: [email protected] Subject: FOP and EntityResolver Hi, I have a short problem with FOP: I want to publish an xml document to pdf using an xsl-stylesheet and FOP. The doctype-declaration of my xml file contains a DTD used for validation. I wrote a method as it is shown in the examples. I use a javax.xml.transform.Transformer and a javax.xml.transform.sax.SAXResult to publish my content. Every time I call the method transformer.transform, I get a FileNotFoundException with the system id of the given DTD. Is it possible to add a EntityResolver to FOP, so that this resolver resolves the DTD correctly? Thanks for your help. Best regards - med venlig hilsen - mit freundlichen Grüssen Andreas Grund __ Andreas Grund Dipl. Wi-Inf. (BA) KGU-Consulting GmbH Software-Developer Lise-Meitner-Str. 2 phone: +49 461 31852-18 D 24941 Flensburg telefax: +49 461 31852-20 web: http://www.kgu-consulting.de <http://www.kgu-consulting.de/>
<<winmail.dat>>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
