Bug #2380
closedXsltProcessor name clash with libxsl
100%
Description
Reported by Kevin Clarke:
The use of Saxon/C's XsltProcessor in PHP classes with pre-existing PHP XSLTProcessor class (XSLT 1.0) within the same code base.
Updated by O'Neil Delpratt almost 9 years ago
Looking back at the discussions on the mailing list there were a few options on the table. See summary of them below:
-
XSLT2Processor. The point was raised that this would not make sense since Saxon supports XSLT 3.0. Maybe we could also have XSLT3Processor.
-
SAXONProcessor. This might be a safe option to avoid name clashes, but not keen on having Saxon within the name explicitly.
-
Use the namespace feature in PHP.
For option 3. see details for Jirka Kosek:
Also note that PHP since 5.3 support namespaces (aka Java packages). So
you can still use XsltProcessor classname without any collisions if you
put it inside Saxon namespaces. New instance is then created by syntax like:
$xsltProc = new Saxon\XsltProcessor(...);
This naming pattern is not common yet for extensions as namespaces are
quite recent PHP feature.
I am probably in favour of option 3.
Updated by O'Neil Delpratt over 8 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Patch has been made to the php_saxon.cpp file. Thanks to Kevin Clarke for supplying the patch which will be available in the next release.
Updated by O'Neil Delpratt about 8 years ago
- Fixed in version set to 1.0.0
This bug fix patch is released in Saxon/C 1.0.0 release
Updated by O'Neil Delpratt about 8 years ago
- Status changed from Resolved to Closed
Please register to edit this issue