Project

Profile

Help

Using apache resolver for catalog files in 9.5EE

Added by Michael Papile about 10 years ago

Hello, I am using a library that calls the API in Saxon. I am passing it a configuration file as specified in http://www.saxonica.com/documentation/configuration/configuration-file/. I turned the verbosity of the catalog resolver up and it appears to be resolving as it always has with 9.4HE but now when it comes across the first dtd it gives me an error that it is not found. This previously worked in 9.4HE with same setup.

My configuration file has the following parameters that previously worked:

uriResolver="org.apache.xml.resolver.tools.CatalogResolver"
sourceParser="org.apache.xml.resolver.tools.ResolvingXMLReader"
styleParser="org.apache.xml.resolver.tools.ResolvingXMLReader"

What am I missing for 9.5EE? Is there a better way to read a catalog file and resolve the entities/DTDs?

Thanks!


Replies (4)

Please register to reply

RE: Using apache resolver for catalog files in 9.5EE - Added by Michael Papile about 10 years ago

Sorry to be clear when I said "when it comes across the first DTD" I am referring to the Saxon XML Parser. It is wrongly looking in the code root directory for the DTD as if it was never resolved at all.

RE: Using apache resolver for catalog files in 9.5EE - Added by Michael Kay about 10 years ago

The devil is in the detail and you haven't shown us any detail. I suspect the problem is that the base URI of the source document isn't correctly known. So we would need to see how the source document is supplied. A common problem is to supply a StreamSource without setting a SystemId.

RE: Using apache resolver for catalog files in 9.5EE - Added by Michael Kay about 10 years ago

Incidentally, it's worth being aware that there is no "Saxon XML Parser". Saxon is merely the middleman, passing configuration options to your choice of XML parser, and passing any error messages back.

RE: Using apache resolver for catalog files in 9.5EE - Added by Michael Papile about 10 years ago

Thank you for your reply. I am using StreamSource as you suspected. Sorry for the unclear first post XSLT in Java is very different from what I usually do so it has been a bit tough. Your system ID remark led to me reading about it and assigning a system ID in the directory the DTD/entities are stored. Then worked. I appreciate getting a reply from the god of XSLT :) I was just confused because the catalog resolver was previously resolving the DTD/entity relative paths in 9.4 with no system ID set so I thought I was making a mistake loading the resolver and perhaps needed additional configuration that had changed in 9.5.

    (1-4/4)

    Please register to reply