Thanks for the feedback.
I'm currently using Saxon only for doing XSL transformations so e.g. XPath expressions are not created explicitly in the code.
In addition to specifying the TransformerFactory implementation class through a system property do I need to override other factory implementation class settings in order to get the JAXP default factories for the third party application?
Does Saxon XSL transformation create XPath expressions implicitly? Is the JAXP loading mechanism used to get the XPathFactory or does it use the Saxon implementation directly?
From: Michael Kay [email@example.com]
Sent: Wednesday, June 23, 2010 19:12
Subject: Re: [saxon] Problems using JAXP API and Saxon in parallel
Invoking Saxon explicitly from your application should not be a problem: if you explicitly want Saxon every time, then it's always best to use the explicit constructors rather than rely on the JAXP loading mechanism. The XPathFactory implementation class
is net.sf.saxon.xpath.XPathFactoryImpl. If you are using multiple Saxon factory classes in the same application, make sure that they all use the same Saxon Configuration. (But if your application is committed to Saxon, I would stronly suggest using s9api interfaces
rather than JAXP interfaces.
The other and more difficult part of the problem is to prevent the "third party web application" from loading Saxon when it hasn't been written to work with Saxon. (It's probably not worth the bother of trying to understand why it doesn't work with Saxon; despite
JAXP being a standardized interface, there are many ways of writing applications that work with one JAXP implementation and not another.) It's probably enough to set the system property javax.xml.transform.TransformerFactory to the class name of the Xalan