Create an xconf file at [dspace-src]/dspace/modules/xmlui/src/main/resources/META-INF/cocoon/avalon/cocoon-core-saxon-xslt.xconf
and add the following lines:
<?xml version="1.0" encoding="UTF-8"?>
<components>
<component 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>
</components>
Add the following lines to [dspace-src]/dspace/modules/xmlui/pom.xml
(or modify with your version of Saxon):
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>9.5.1-4</version>
</dependency>
Build DSpace with mvn package
.
Update your webapps with ant update_webapps
(or fresh_install
or whatever).
In [dspace]/webapps/xmlui/sitemap.xmap
, change the XSLT transformer xslt-processor-role
value to saxon
. Note: this can be done as part of the build process, but that's not how my workflow is currently set up.