catalog entry of <system systemId="erlref.dtd" uri="/files/erlang/dtds/erlref.dtd" /> Is never seen by the resolver. See http://www.sagehill.net/docbookxsl/WriteCatalog.html#ResolveDtdLoc Yet http://xmlsoft.org/XSLT/xsltproc.html catalog resolves this? I.e. I think it should resolve appropriately Marked as XSLTBug, since transform cannot take place without DTD resolution regards DaveP
What is the full catalog? Does the path "/files/erlang/dtds/erlref.dtd" exist on the filesystem? Or have you set xml:base? Have you tried setting the verbosity with the xml.catalog.verbosity property. Set to 5 or larger to get maximum verbosity. This will determine if your catalog is actually getting read and what the resolver does when resolving a uri. What is the exact error message(s) you get? If you can provide a reproducable test case, it will make finding a solution faster. BTW, I'm not an official maintainer of the resolver code, but I had to dive into it over a year ago to fix bugs. I believe some of my patches have been accepted, but I do not think a new release of the resolver has been done in quite some time.
What is the full catalog? Does the path "/files/erlang/dtds/erlref.dtd" exist on the filesystem? Or have you set xml:base? Have you tried setting the verbosity with the xml.catalog.verbosity property. Set to 5 or larger to get maximum verbosity. This will determine if your catalog is actually getting read and what the resolver does when resolving a uri. What is the exact error message(s) you get? If you can provide a reproducable test case, it will make finding a solution faster. 1. full catalog <?xml version="1.0" encoding="utf-8"?> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" > <system systemId="erlref.dtd" uri="/files/erlang/dtds/erlref.dtd" /> <systemSuffix systemIdSuffix="xhtml-lat1.ent" uri="/files/erlang/dtds/xhtml-lat1.ent" /> </catalog> 2. The dtd and entity file are in ./dtds /files/erlang/dtds 3. I had tried xml:base, but now removed. Instance has <?xml version="1.0" encoding="latin1" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> a file of <erlref> </erlref> would test it. I have CatalogManger.properties with verbosity set high. Error reported is: Parse catalog: erlang.catalog.xml Loading catalog: erlang.catalog.xml Default BASE: file:////files/erlang/erlang.catalog.xml system: erlref.dtd /files/erlang/dtds/erlref.dtd SYSTEM: erlref.dtd file:/files/erlang/dtds/erlref.dtd systemSuffix: xhtml-lat1.ent /files/erlang/dtds/xhtml-lat1.ent SYSTEM_SUFFIX: xhtml-lat1.ent file:/files/erlang/dtds/xhtml-lat1.ent resolveSystem(file:/files/erlang/module.xsl) resolveSystem(file:/files/erlang/erlang.xml) resolveSystem(file:/files/erlang/erlref.dtd) Error on line 2 column 37 of file:/files/erlang/erlang.xml: Error reported by XML parser: Cannot read from file:/files/erlang/erlref.dtd (/files/erlang/erlref.dtd (No such file or directory)) Transformation failed: Run-time errors were reported HTH
(In reply to comment #2) > resolveSystem(file:/files/erlang/module.xsl) > resolveSystem(file:/files/erlang/erlang.xml) > resolveSystem(file:/files/erlang/erlref.dtd) The above verbosity implies (to me) that the parser is passing the wrong system ID to the resolver. I.e. Instead of the XML parser passing just "erlref.dtd" to the resolver, the parser is first fully qualifying the system ID (probably based upon the current working directory) before it passes the system ID to the resolver. Since the catalog has no entry for "file:/files/erlang/erlref.dtd", the resolver will find no matching entries. The parser then attempts to load the file directory, which of course fails since the file does not exist with given path. At this time, this appears to be an XML parser problem. The parser should only be passing "erlref.dtd" to the resolver. BTW, did you trim some of the diagnostic output? It seems the XML parser is calling Catalog directly versus the CatalogResolver class that implements the SAX EntityResolver and JAXP URIResolver interfances. I see no debugging messages from the CatalogResolver class.
I think that this bug may be a duplicate of: https://issues.apache.org/bugzilla/show_bug.cgi?id=28719