Inconsistencies in documentation on relative and absolute paths in PHP
In the Saxon/C PHP extension we internally set the current working directory (i.e.
setcwd) to where the php script is located. When a user uses absolute paths in arguments to method like
parseXmlFromFile(string $fileName) it is not being resolved correctly.
The current workaround is to set the cwd to empty string. For example:
$saxonProc = new SaxonProcessor(true, ''); // can be false or true
$saxonProc = new SaxonProcessor(true); // can be false or true $saxonProc->setcwd('');
- Fix code to resolve files with absolute path names
- update documentation to mention cwd to php script
Updated by O'Neil Delpratt 4 months ago
- Category set to Saxon-C Internals
- Status changed from New to In Progress
- Assignee set to O'Neil Delpratt
- Has been done, but the problem reported in 1. is still present in SaxonC 11.2.
I have applied the fix to the SaxonCAPI.java class. The
parseXmlFile method now uses
resolveFileToSource to resolve cwd and the filename.
Testing change in PHP example.
Please register to edit this issue