I'm having problems using Saxon v9.2 in an application that uses Java JAXP APIs.
The application is a third-party Java web application that I'm extending and my extension code uses XSLT 2.0 & Saxon.
When I add the Saxon jar in the web app classpath XML parsing related exceptions start to appear in the log.
Apparently, this is because Saxon specifies implementation classes for TransformerFactory and XPathFactory,
and overrides the default factories which the application seems to depend on.

Is it possible to let the application continue to use default factory implementations but in the new extension code explicitly use Saxon's factory classes?

For the TransformerFactory this seems to be possible by calling net.sf.saxon.TransformerFactoryImpl no-arg constructor
but what about XPathFactory? How can I specify a XPathFactory for a TransformerFactory or Transformer?
Are there any other implementation classes that are affected?
I've overridden the Saxon TransformerTactory by explicitly specifying a TransformerFactory implementation
via javax.xml.transform.TransformerFactory system property.


marko