|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
xml catalogHas anyone had success getting around this error?
[...] java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1269) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) [...] Here's the complete screenlog, http://www.sfu.ca/~jdbates/tmp/fop/200910080/screenlog I thought the problem was getting Xerces to use the XML catalog, so I originally posted this question to the Xerces list, http://thread.gmane.org/gmane.text.xml.xerces-j.user/4961 I assume the w3 is restricting access to DTDs by some clients which generate excessive traffic IFAICT my operatic system - Debian - distributes a local copy of this DTD at /etc/xml/w3c-dtd-xhtml.xml So I assume I just need to get FOP/Xerces to use this catalog? Here's what I tried to get FOP/Xerces to use this catalog, * Installed the libxml-commons-resolver1.1-java package which contains /usr/share/java/xml-commons-resolver-1.1.jar * Set prefer=public in /etc/xml/resolver/CatalogManager.properties * Ran FOP with CLASSPATH=/usr/share/java/xml-commons-resolver-1.1.jar:/etc/xml/resolver:/etc/xml/resolver/CatalogManager.properties - no luck : ( I also tried running FOP with the -d option, but among the debugging messages I didn't find anything useful I'm following this FAQ entry, http://xerces.apache.org/xerces2-j/faq-xcatalogs.html - and additionally found this documentation, http://xml.apache.org/commons/components/resolver/resolver-article.html#ctrlresolver There's additionally an outstanding bug report against the Debian FOP package, to solve this problem, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512443 I originally posted to the Xerces list because I thought the question was how to get Xerces to use the XML catalog, but Michael Glavassevich replies that the question is actually, "how to get FOP to provide an XML catalog to Xerces?" Any suggestions how to proceed? Or how to get more debugging information? --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
Re: xml catalogOn Tue, Oct 13, 2009 at 01:34:40PM -0700, Jack Bates wrote:
> I originally posted to the Xerces list because I thought the question > was how to get Xerces to use the XML catalog, but Michael Glavassevich > replies that the question is actually, "how to get FOP to provide an XML > catalog to Xerces?" I believe that that is indeed the problem. There is no command-line option in FOP for setting an entityresolver on the parser, and there is no code in FOP that would do that. It should not be difficult to achieve, if someone takes the time to do it. Regards, Simon -- Simon Pepping home page: http://www.leverkruid.eu --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
Re: xml catalogOn Wed, Oct 14, 2009 at 09:02:56PM +0200, Simon Pepping wrote:
> On Tue, Oct 13, 2009 at 01:34:40PM -0700, Jack Bates wrote: > > I originally posted to the Xerces list because I thought the question > > was how to get Xerces to use the XML catalog, but Michael Glavassevich > > replies that the question is actually, "how to get FOP to provide an XML > > catalog to Xerces?" > > I believe that that is indeed the problem. There is no command-line > option in FOP for setting an entityresolver on the parser, and there > is no code in FOP that would do that. It should not be difficult to > achieve, if someone takes the time to do it. I did that today. There is now an option -catalog, which adds a catalog resolver for parsing the XML and XSLT files. You need to have xml-commons-resolver in the classpath, except in java6, where it is included. Resolving public and system IDs for the XML file works fine. Resolving URIs in import and include statements in XSLT stylesheets does not work as well as I had hoped. Some included or imported stylesheets are still fetched from their URL, bypassing the catalog. I could not find out why that happens. Saxon did not seem to do better than Xalan. Regards, Simon -- Simon Pepping home page: http://www.leverkruid.eu --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
Re: xml catalogOn Fri, 2009-10-16 at 15:17 +0200, Simon Pepping wrote:
> On Wed, Oct 14, 2009 at 09:02:56PM +0200, Simon Pepping wrote: > > On Tue, Oct 13, 2009 at 01:34:40PM -0700, Jack Bates wrote: > > > I originally posted to the Xerces list because I thought the question > > > was how to get Xerces to use the XML catalog, but Michael Glavassevich > > > replies that the question is actually, "how to get FOP to provide an XML > > > catalog to Xerces?" > > > > I believe that that is indeed the problem. There is no command-line > > option in FOP for setting an entityresolver on the parser, and there > > is no code in FOP that would do that. It should not be difficult to > > achieve, if someone takes the time to do it. > > I did that today. There is now an option -catalog, which adds a > catalog resolver for parsing the XML and XSLT files. You need to have > xml-commons-resolver in the classpath, except in java6, where it is > included. Fantastic, thanks Simon! I tested with revision 828778, and after working around this issue, http://thread.gmane.org/gmane.text.xml.commons.devel/1313 - I successfully built a PDF with the following command, $ ./fop -catalog -xml icaatom.html -xsl icaatom.xsl icaatom.pdf I am running Java 6, so I removed the libxml-commons-resolver1.1-java package because, as you say, it's included Thanks again : ) --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |