Chapter 12. Saxon, XT, Xalan: Java-based XSLT engines

Table of Contents
Get the files
Install the Java Runtime Engine
Install the XP and XT Java classes
Install the Xerces and Xalan Java classes
Install the Saxon and Ælfred Java classes
The first steps with the Java-based tools
Further Reading
A bunch of parsers and XSLT engines implemented in Java

This chapter presents three Java-based XSLT engines with their XML parsers. You can install all of them, or choose the one most suitable for your needs.

XP and XT were written by one of the most renowned programmers in the SGML/XML field, James Clark. The parser is non-validating which helps it to be the fastest XML parser implemented in Java (so the author claims).

Xerces and Xalan are being developed under the same virtual roof as the Apache web server and other web-related tools. Xerces is a full-fledged validating XML parser with DOM and SAX interfaces. Xalan is a matching XSLT engine. Implementations in both C++ and Java are available. We'll use the Java versions of both tools here.

Saxon is actually both a Java library for XML processing and a XSLT engine. We will look at the latter functionality only, though. Saxon ships with the Ælfred XML parser.

To run these Java applications, we will install the latest version of Sun's Java Runtime Engine. Before you go ahead you should check whether your system already has this JRE installed, as browsers like Netscape and Mozilla use this to run Java applets. Browse the software list in the "Add/remove software" applet in the system control panel to see which version of the JRE, if at all, is installed. If you have a real old version (something like 1.1) you'll still have to update.

Get the files

  1. XP

  2. XT

  3. Xalan (Java). This archive contains all necessary classes including the Xerces parser.

  4. Saxon 6.4.4 Choose the full version, not the smaller, but slower, instant version.

  5. Java Runtime Engine