2.0.3 seems to have problems using xsltc to compile the sitemap. So you need to install xsltc side-by-side with Xalan.
In the "xslt processor" section of cocoon.xconf, add
<xslt-processor class="org.apache.cocoon.components.xslt.XSLTProcessorImpl" logger="core.xslt-processor" role="org.apache.cocoon.components.xslt.XSLTProcessor/XSLTC" > <parameter name="use-store" value="true"/> <parameter name="transformer-factory" value="org.apache.xalan.xsltc.trax.TransformerFactoryImpl" /> </xslt-processor>
There are two differences between this and the regular xslt component declaration:
- you are giving this component a "role"
- you are specifying a different transformer factory which points to xsltc.
In the transformers section of your sitemap, add:
<map:transformer name="xslt-xsltc" logger="sitemap.transformer.xslt" src="org.apache.cocoon.transformation.TraxTransformer" pool-max="32" pool-min="16" pool-grow="4" > <use-request-parameters>false</use-request-parameters> <use-browser-capabilities-db>false</use-browser-capabilities-db> <xslt-processor-role> org.apache.cocoon.components.xslt.XSLTProcessor/XSLTC </xslt-processor-role> </map:transformer>
Note that you are specifying the processor with the role you assigned earlier.
You probably also want to change the default transformer to be xsltc:
I was unable to use mix xslt and xsltc transformations in a single pipeline--I got strange errors.
I also noticed (minor) incompatibilities between xsltc and Xalan. (I had trouble with document('x'), and found a weird problem with <xsl:variable name="x" select="normalize-space(y)"/> which I fixed by rewriting it as <xsl:variable name="x"><xsl:value-of select="normalize-space(y)"/>...).
Many thanks to Vadim for his help with this.
I am unable to get this to work with 2.0.4 - Cocoon Confusion results.
can someone confirm this, please? I'm considering using 2.0.4 +