cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Cwiklinski <johan.cwiklin...@ajlsm.com>
Subject Re: Switching to Saxon
Date Fri, 17 Dec 2010 08:43:09 GMT
Hello,

Le 16/12/2010 16:58, Peter Flynn a écrit :
> 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
> 

Here is our configuration:
cocoon.xconf:
<!--+
    | Saxon XSLT Processor : 8.x
    +-->
  <component
    class="org.apache.excalibur.xml.xslt.XSLTProcessorImpl"
    logger="core.xslt-processor"
    role="org.apache.excalibur.xml.xslt.XSLTProcessor/saxon8"
    pool-grow="2"
    pool-min="8"
    pool-max="32">
      <parameter name="use-store" value="true" />
      <parameter name="incremental-processing" value="false" />
      <parameter name="transformer-factory"
value="net.sf.saxon.TransformerFactoryImpl" />
    </component>

  <!-- Xpath Processor: -->
  <xpath-processor
    class="org.apache.excalibur.xml.xpath.XPathProcessorImpl"
    logger="core.xpath-processor" />

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

Hope that could help you :)

Regards,
-- 
Johan Cwiklinski
AJLSM

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


Mime
View raw message