saxon - Using Saxon9 for XSLT with Apache Cocoon 2.2 -
i'd use saxon (9he) xslt processing in apache cocoon (2.2). i've followed instructions using saxon http://wiki.apache.org/cocoon/saxon. these instructions describe process using .xconf file, no longer preferred method of cocoon configuration (as described @ http://cocoon.apache.org/2.2/core-modules/core/2.2/1259_1_1.html), though page notes legacy .xconf configuration still supported.
i've tried placing core.xslt-processor configuration @ web-inf/cocoon.xconf (as described in saxon instructions), @ web-inf/cocoon/xconf/saxon-xslt.xconf (as described in cocoon config page linked above), , @ meta-inf/cocoon/saxon-xslt.xconf. in each case, error:
org.apache.avalon.framework.service.serviceexception: component \ 'org.apache.excalibur.xml.xslt.xsltprocessor/saxon' not defined in \ service manager. (key='avalonservicemanager') i've placed saxon9he.jar in web-inf/lib, , have tried removing meta-inf directory described in saxon instructions. have restarted servlet container (jetty) each case.
i'm java amateur, it's possible i'm missing basic step. should note i'm using cocoon in context of dspace system, it's possible dspace configured ignore .xconf files.
however, seems there should way specify saxon processor using spring config or .properties file, haven't found instructions doing online (they specify .xconf configuration process).
any thoughts? thanks!
answering own question--
using saxon cocoon xslt dspace
create xconf file @ [dspace-src]/dspace/modules/xmlui/src/main/resources/meta-inf/cocoon/avalon/cocoon-core-saxon-xslt.xconf , add 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 following lines [dspace-src]/dspace/modules/xmlui/pom.xml (or modify version of saxon):
<dependency> <groupid>net.sf.saxon</groupid> <artifactid>saxon-he</artifactid> <version>9.5.1-4</version> </dependency>
build dspace mvn package.
update webapps ant update_webapps (or fresh_install or whatever).
in [dspace]/webapps/xmlui/sitemap.xmap, change xslt transformer xslt-processor-role value saxon. note: can done part of build process, that's not how workflow set up.
Comments
Post a Comment