2
votes

I have a question regarding WSO2, Enterprise Service Bus, version 5.0.0, on MS Windows 7.

Can I replace bundled old Saxon 9.4.0.4 with the latest 9.7.0.11 (to get support of XSLT 3.0 and XPath 3.1 for XML transformation)? The bundled Saxon is in ".\wso2esb-5.0.0.zip\wso2esb-5.0.0\lib\endorsed\saxon9he.jar". It is Saxon, Java version, Home Edition, version 9.4.0.4, if I am right. When I replace it with the latest Saxon, HE, 9.7.0.11, I get many Java Exceptions.

So, is it possible, recommended, supported... to replace bundled old Saxon with the new one and/or even with licensed PE or EE 9.7.n.n?

Thank You in advance, Stepan

1
I don't know anything about wso2esb but I want to point out that Saxon 9.7 HE supports XPath 3.0 but not XPath 3.1. And the only XSLT 3.0 feature you have with 9.7 HE is that you can run version="3.0" stylesheet than then allow you to use XPath 3.0 expressions and functions inside XSLT but not any new XSLT 3.0 instructions. As for the exceptions, you might get better help if you show details.Martin Honnen
I know, one can see link. I also mentioned PE or EE edition above. But XPath 3.1 is enough for many use-cases and XSL-T 2.0 too, so enabling HE 9.7.0.11 would be useful too.Stepan RYBAR
The error log starts as: 2016-11-03 12:45:14,810 [-] [localhost-startStop-1] WARN SynapseXMLConfigurationFactory Sequence configuration: fault cannot be built - Continue in fail-safe mode java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom at javax.xml.xpath.XPathFactory.newInstance(Unknown Source) Stepan RYBAR

1 Answers

0
votes

In general when an application bundles a specific version of Saxon there is no way of telling whether you can substitute a different version of Saxon except by (a) consulting the documentation of the application (if you're lucky) or (b) trying it to see if it works.

If the application sticks to the most stable APIs in Saxon then it will probably work, but if it dives down deeper to achieve closer integration then it may well make itself dependent on something that changes between Saxon releases.

That could be the case here. It's not entirely clear, but the error message

failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom

could suggest that the application is attempting to instantiate the Saxon XPath engine using the JAXP search mechanism, which we withdrew in Saxon 9.6 for reasons explained here:

https://saxonica.plan.io/issues/1944