Saxon never creates a TransformerFactory or XPathFactory using the JAXP mechanisms - it always instantiates the classes it wants directly. So you can safely change these settings.

Saxon does (on some paths) use the JAXP mechanisms to instantiate a ParserFactory, but that's not relevant here.

Michael Kay
Saxonica

On 24/06/2010 09:59, Asplund Marko wrote:

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

------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/saxon-help