How to select saxon TransformerFactory in Java

Posted by pAkY88 on Stack Overflow See other posts from Stack Overflow or by pAkY88
Published on 2010-06-03T17:09:11Z Indexed on 2010/06/07 8:42 UTC
Read the original article Hit count: 398

Filed under:
|
|
|
|

In my web application I need to use Saxon TransformerFactory to use XSLT 2.0 but I can't use setProperty method because I haven't this right on the web server and there is a Security Manager.

So i have read that it's possible to do this:

Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API will look for a classname in the file META-INF/services/javax.xml.transform.TransformerFactory in jars available to the runtime.

I found this file in WEB-INF/lib/saxon9.jar but when I istantiate a TransformerFactory is always selected default factory and not saxon factory.

How can I select Saxon Transformer Factory?

Thanks

© Stack Overflow or respective owner

Related posts about java

Related posts about tomcat