Project

Profile

Help

Bug #4274

closed

Using a catalog file with Saxon in PHP

Added by Alf Eaton over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Low
Category:
Saxon-C Internals
Start date:
2019-08-10
Due date:
% Done:

100%

Estimated time:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
1.1.2
Fixed in version:
1.2.0
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:

Description

I'm using the Saxon/C PHP extension, v1.1.2, and I'd like to be able to use a catalog file for DTD resolution.

If the following worked I'd be able to either edit /etc/xml/catalog or edit CatalogManager.properties to point to a different catalog file, but I can only get a "Cannot find CatalogManager.properties" error:

    $saxonProcessor = new Saxon\SaxonProcessor();

    // use resolver.jar
    $saxonProcessor->setConfigurationProperty('http://saxon.sf.net/feature/sourceParserClass', 'org.apache.xml.resolver.tools.ResolvingXMLReader');

    $processor = $saxonProcessor->newXsltProcessor();
    $processor->setSourceFromFile('input.xml');
    $processor->compileFromFile('example.xsl');
    $result = $processor->transformToString();

As the CLASSPATH environment variable doesn't seem to be relevant in this situation, where is the resolver looking for CatalogManager.properties?


Files

SaxonProcessor.h (17.5 KB) SaxonProcessor.h O'Neil Delpratt, 2019-08-14 00:15
php_saxon.h (9.81 KB) php_saxon.h O'Neil Delpratt, 2019-08-14 00:15
SaxonProcessor.cpp (23 KB) SaxonProcessor.cpp O'Neil Delpratt, 2019-08-14 00:15
php7_saxon.cpp (120 KB) php7_saxon.cpp O'Neil Delpratt, 2019-08-14 00:15

Please register to edit this issue

Also available in: Atom PDF