Bug #5704
closed

XML catalog unused in Saxon\XsltExecutable::transformFileToString
100%
Description
Thank you for adding XML catalog support to the Saxon C PHP extension.
However, unless I'm doing something wrong, it seems that Saxon isn't using local DTD files referenced in the XML catalog.
I've put together an example repo: https://github.com/hubgit/saxon-he-php-demo
In this case, the XML file's DOCTYPE defines a public ID, which the XML catalog points to a local DTD file. When Saxon\XsltExecutable loads the XML file with transformFileToString, it tries to fetch the DTD from the URI in the XML file's DOCTYPE instead, as if the catalog file isn't used.
Updated by Michael Kay about 1 year ago
- Project changed from Saxon-CE to SaxonC
- Assignee set to O'Neil Delpratt
Updated by O'Neil Delpratt about 1 year ago
- Status changed from New to In Progress
- Found in version set to 11.4
Thanks for reporting this issue. Investigating it now
Updated by O'Neil Delpratt about 1 year ago
Thanks for the repo. I am seeing the sam failure. Something like the below:
Error
I/O error reported by XML parser processing
/home/
misc/saxon-he-php-demo/example.xml. Caused by
java.io.FileNotFoundException: https://example.com/article.dtd
If I run SaxonC command it works:
./transform -xsl:../../example.xsl -s:../../example.xml -catalog:../../catalog.xml
Therefore investigating what is going wrong with the API.
Updated by O'Neil Delpratt 11 months ago
- % Done changed from 0 to 100
- Fixed in version set to 12.0
This works in SaxonC 12.0.
The command:
./transform -xsl:saxon-he-php-demo-main/example.xsl -s:saxon-he-php-demo-main/example.xml -catalog:saxon-he-php-demo-main/catalog.xml
Gives the output:
<?xml version="1.0" encoding="UTF-8"?><output>100</output>
Updated by O'Neil Delpratt 11 months ago
- Status changed from In Progress to Closed
I am closing this bug issue as it works with SaxonC 12.0.
Please register to edit this issue