Dec 6th, 2008, 10:36 PM
Unable to use Saxon with XsltView - Please help
My config specifies the following XsltViewResolver:
<bean id="xslViewResolver" class="org.springframework.web.servlet.view.xslt.X sltViewResolver">
<property name="prefix" value="WEB-INF/xsl/"/>
<property name="suffix" value=".xsl"/>
<property name="cacheTemplates" value="false"/>
I have a VERY simple test xsl:
<xsl:message>Hello from the stylesheet</xsl:message>
The controller properly creates a Source and provides it to the view as the model. Using no additional configuration, the XsltView is properly created and displayed.
HOWEVER, I need to use some XSLT 2.0 functions, and would like to use Saxon. I added the two jars, saxon9.jar and saxon9-dom.jar into the WEB-INF/lib directory. I restart the server (Tomcat 6.0.18) and post a new request. The output is the original XML document (which was found in the model).
I stepped through the source code and everything ~appears~ to be working properly. If I remove the saxon libs, the output of the transform appears.
Then I downloaded Xerces/Xalan to test with those. I copied the Xalan jars into the /WEB-INF/lib directory, restarted, and I get the same behavior as when I used Saxon.
Apparently, I am missing something. How can I make this work? The goal is to be able to use saxon instead of the built-in transformer.