If create TranformerFactory by directly instantiating net.sf.saxon.TransformerFactoryImpl
and explicitly specify the JAXP default TranformerFactory and XPathFactory implementation classes using system properties, can I expect these settings not to interfere with Saxon in any way?

For example does the Saxon Transformer implicitly create XPath expressions behind the scenes when a transformation is invoked? Will the Transformer be able to use the Saxon XPathFactory implementation or will it pick up the JAXP default implementation class?

If Saxon will rely on the JAXP loading mechanism for getting a XPathFactory, is there are way to explicitly configure a certain XPathFactory implementation for a TransformerFactory or Transformer?


marko



From: Michael Kay [mike@saxonica.com]
Sent: Thursday, June 24, 2010 11:26
To: saxon-help@lists.sourceforge.net
Subject: Re: [saxon] Problems using JAXP API and Saxon in parallel

OK, sorry, I misunderstood the question.

So you want a Saxon XSLT transformation factory, which you can get by instantiating net.sf.saxon.TransformerFactoryImpl directly.

And you want the third-party application to use non-Saxon transformation factories and XPath factories, which you can do by setting the Java system properties

* javax.xml.transform.TransformerFactory

* javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom

respectively. See http://xml.apache.org/xalan-j/xpath_apis.html. The actual settings of these probably depend on whether you want to use the version of Xalan that's distributed with the JDK, or the one distributed directly from Apache - this is outside Saxon territory, so this isn't really the right place to get this information.

Michael Kay
Saxonica