I just tried this, but there seems to be a lack of up-to-date details on
doing this in Cocoon 2.1.11 with saxon9. Following the assorted web
pages for earlier versions, I got as far as adding saxon9.jar to
Cocoon's WEB-INF/lib and editing the two files (commenting out the Xalan
entries):

----- cocoon.xconf:

  <component logger="core.xslt"
             role="org.apache.excalibur.xml.xslt.XSLTProcessor/saxon"
             class="org.apache.cocoon.components.xslt.TraxProcessor">
     <parameter name="use-store" value="true"/>
     <parameter name="transformer-factory"
      value="net.sf.saxon.TransformerFactoryImpl"/>
  </component>

----- sitemap.xmap:

  <map:transformer name="xslt" pool-grow="2" pool-max="32"
      pool-min="8" logger="sitemap.transformer.xslt"
      src="org.apache.cocoon.transformation.TraxTransformer">
    <use-request-parameters>false</use-request-parameters>
    <use-browser-capabilities-db>false</use-browser-capabilities-db>
    <use-session-parameters>false</use-session-parameters>
    <use-cookie-parameters>false</use-cookie-parameters>
    <xslt-processor-role>saxon</xslt-processor-role>
    <check-includes>true</check-includes>
  </map:transformer>

But then Cocoon spits out:

> Internal Server Error
> Message: Could not find component (key 
> [org.apache.excalibur.xml.xslt.XSLTProcessor/saxon])
> Description: org.apache.cocoon.ProcessingException: Lookup of transformer 
> 'xslt' failed at <map:transform> - 
> file:///usr/share/tomcat5/webapps/ROOT/sitemap.xmap:1174:71
> Sender: org.apache.cocoon.servlet.CocoonServlet
> Source: Cocoon Servlet
> 
> cause
> org.apache.avalon.framework.component.ComponentException: Could not find 
> component (key [org.apache.excalibur.xml.xslt.XSLTProcessor/saxon])
> full exception chain stacktrace
> org.apache.cocoon.ProcessingException: Lookup of transformer 'xslt' failed
>       at <map:transform> - 
> file:///usr/share/tomcat5/webapps/ROOT/sitemap.xmap:1174:71
>       at 
> org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:113)

What is it actually looking for when it says
org.apache.excalibur.xml.xslt.XSLTProcessor/saxon? I have no idea what
or where "org.apache.excalibur.xml.xslt.XSLTProcessor" points to (I'm
sure it's possible to find out, but I'm not a Java programmer :-)

///Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org

Reply via email to