Sorry, I've been too busy or scatter brained to check here.

I use jdom and invoke  this as:

System.setProperty("javax.xml.transform.TransformerFactory", "net.sf.saxon.TransformerFactoryImpl");
trans = new XSLTransformer( new FileInputStream( mytransform ));

I think that you have to request this before you request the TransformerFactory then cast the TransformerFactory to a SAXTransformerFactory before creating the Templates object. I sort of do this step out of force of habit and I'm not sure it is absolutely necessary (I think not).

As to the NPE, when saxon does the initial parse of the xslt it reports errors, which is a good thing since I write most of my xslt in emacs. If the xslt doesn't compile you will get an NPE, but that doesn't mean that's your problem in this case. Make sure you are logging your exceptions.
Wish I could be more helpful

Richard

Zohar Amir wrote:

I've tried putting it right before TransformerFactory.newInstance() .
now, when I invoke the transform method I get NPE at net.sf.saxon.Controller.transform(Controller.java:1319)
Any help?

----- Original Message ----- From: "Zohar Amir" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>; ""Richard Toren"" <[EMAIL PROTECTED]>
Sent: Wednesday, March 01, 2006 9:25 AM
Subject: Re: tomcat and xslt 2.0


Thanks.
Where do I put the System.setProperty(...)?

----- Original Message ----- From: "Richard Toren" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Monday, February 27, 2006 7:28 PM
Subject: Re: tomcat and xslt 2.0


I think there are not that many xslt 2.0 engines out there to choose from. In any case saxon is xslt 2.0 and very fast. You have to include the jar (obvious, but....) and before you instantiate a TransformerFactory set the System property:

System.setProperty( "javax.xml.transform.TransformerFactory", "net.sf.saxon.TransformerFactoryImpl");

You will get a warning if the xslt is 1.0, but it will still compile and function.

Richard Toren

Zohar Amir wrote:

Correct me if I'm wrong here: as I understand it, tomcat uses Xalan as its XSLT engine. Xalan does not support XSLT 2.0 . Is there any other XSLT engine I can use with tomcat (I read something about Saxon)? If so, how do I do that?
Thanks,
Zohar.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to