Upgrading eXist for XSLT 2.0 (Saxon)
This howto assumes that you wish to replace eXist's default XSLT processor (Xalan) with a processor that supports XSLT 2.0 (Saxon). eXist is installed in EXIST_HOME. The following describes the necessary steps to replace Xalan with Saxon.
1.1 Required jars
This has been tested with Saxon version 8.7.3 and Jakarta RegExp version 1.4
Saxon is available from - http://sourceforge.net/projects/saxon
Apache Jakarta RegExp is available from - http://jakarta.apache.org/site/downloads/downloads_regexp.cgi
Download Saxon and Apache Jakarta Regexp and copy the following jars to EXIST_HOME/lib/endorsed:
- saxon8.jar
- saxon8-dom.jar
- saxon8-xpath.jar
- jakarta-regexp-1.4.jar (only needed if your using eXist with Cocoon and are also switching Cocoon to Saxon as well)
If you are not using eXist with Cocoon, or wish for Cocoon to also use Saxon instead of Xalan, delete the file xalan.jar in EXIST_HOME/lib/endorsed
1.2 eXist Configuration
In the eXist configuration file EXIST_HOME/conf.xml find the configuration section for the transformer and change:
to:
1.3 Cocoon Changes (Optional)
If you also wish for Cocoon to use Saxon instead of Xalan, you will also need to make changes to two Cocoon configuration files.
1.3.1 cocoon.xconf
Typically this is found in EXIST_HOME/webapp/WEB-INF
In the XSLT Processor section, comment out the two elements for configuring Xalan xslt and Xalan xsltc, e.g. -
Then uncomment the element for configuring Saxon, and make sure the transformer-factory parameter is set correctly, as below -
Modify the XPath Processor configuration from:
to:
1.3.2 sitemap.xmap
Typically this is found in EXIST_HOME/webapp
Here we need to change the XSLT Transformer section from:
to:
Also comment out the other XSLT transformers for Xalan xslt and xsltc, e.g. -
- 2 Comments
- Add Comment