The following software must be installed separately, it is not included with the Saxon download.
To run Saxon you need at least a Java VM, and preferably a Java development environment. Saxon 9.6 requires JDK 1.5 (properly the Java 2 Platform, Standard Edition 5.0) or later (it also runs under later Java versions).
If you use the XQJ XQuery API in Saxon, then you will need the StAX parser interfaces to be present on your classpath. These are available as standard in JDK 1.6. With JDK 1.5, however, you will need to install them separately. They can be obtained in the file
jsr173_1.0_api.jarobtainable from https://sjsxp.dev.java.net/.
Saxon will also accept input from a
StAXSource. This is a new class introduced in JAXP 1.4. It is available as standard in JDK 1.6, but to use it with JDK 1.5, you will need to install it separately: it can be found in the JAR file
jaxp-api.jarwhich can be downloaded from https://jaxp.dev.java.net/.
Saxon has options to work with source trees constructed using DOM, JDOM, JDOM2, XOM, DOM4J, or AXIOM:
To use Saxon with DOM, you do not need any extra code on your classpath. The DOM implementation should support DOM Level-3 interfaces, and the DOM must be built with namespace processing enabled. Saxon retains some legacy code designed to handle level-2 DOM implementations, which can be activated by calling the method
net.sf.saxon.Configuration, but this code is now untested and unsupported. Saxon is validated using the DOM implementation by the Apache Xerces parser, and the DOM that is packaged with the Sun JDK. It should work with other DOM implementations, but this can never be 100% guaranteed without testing. Many DOM implementations, especially non-productized implementations, deviate in minor but significant ways from the specifications.
For the other object models, JDOM, JDOM2, XOM, DOM4J, and AXIOM, the supporting Saxon adapter code is integrated into the JAR files for Saxon-PE and Saxon-EE, but is available only as source code for Saxon-HE. To exploit this code with the open source Home Edition, you will need to compile the source code from the relevant subpackage of
net.sf.saxon.option. Whichever edition you are using, the external object model is available for use only if you register it using the method
Configurationobject, or via the configuration file. Saxon no longer searches the classpath to see which object models are present, because classpath searches are expensive and make the application over-sensitive to details of the way it is run.
By default Saxon uses an XML parser that supports the SAX2 interface. Saxon has been tested successfully in the past with a wide variety of such parsers including Ælfred, Xerces, Lark, SUN Project X, Crimson, Piccolo, Oracle XML, xerces, xml4j, and xp. The recommended parser is the Apache version of Xerces (we have found this to be more reliable than the version bundled in the JDK). By default, however, Saxon uses the parser that comes with the Java platform. The parser must be SAX2-compliant. All the relevant JAR files must be installed on your Java CLASSPATH.
Saxon will also work with a StAX parser. Generally speaking, StAX parsers are currently less mature than SAX parsers, and any performance advantage is likely to be very minor. However, the support for StAX provides the ability to supply input via a customized pull pipeline. Saxon is tested with Woodstox 3.0.0. Saxon's schema validation is available only with a SAX2 parser.