<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="about" page="installationjava" subpage="prerequisites"/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: Prerequisites</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title" content="Saxonica: XSLT and XQuery Processing: Prerequisites"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>Prerequisites</h1>
      <p>The following software must be installed separately, it is not included with the Saxon download.</p>
      <ul>
         <li content="para">
            <p>To run Saxon you need at least a Java VM, and preferably a Java development environment. 
  Saxon 9.3 requires JDK 1.5 (properly the Java 2 Platform, Standard Edition 5.0) or later (it 
  also runs under JDK 1.6). If for some reason you need to run under JDK 1.4, you will need to stick with
  Saxon 9.1 or an earlier release.</p>
         </li>
         <li content="para">
            <p>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 <code>jsr173_1.0_api.jar</code> obtainable
  from <a href="https://sjsxp.dev.java.net/" class="bodylink">https://sjsxp.dev.java.net/</a>.</p>
         </li>
         <li content="para">
            <p>Saxon will also accept input from a <code>StAXSource</code>. 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 <code>jaxp-api.jar</code> which can be downloaded from 
  <a href="https://jaxp.dev.java.net/" class="bodylink">https://jaxp.dev.java.net/</a>.</p>
         </li>
         <li>
            <p>Saxon has options to work with source trees constructed using DOM, JDOM, JDOM2, XOM, or DOM4J:</p>
            <ul>
               <li content="para">
                  <p>To use Saxon with DOM, you do not need any extra code on your classpath. (The relevant code has been
    integrated into the main JAR file; this has become possible because JDK 1.4 is no longer supported.)
   The DOM implementation should support DOM Level-3 interfaces. Saxon retains some legacy code designed
   to handle level-2 DOM implementations, which can be activated by calling the method
   <code>configuration.setDOMLevel(2)</code> on class <code>net.sf.saxon.Configuration</code>, 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.
                  </p>
               </li>
               <li content="para">
                  <p>For the other object models, JDOM, JDOM2, XOM, and DOM4J, 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
  <code>net.sf.saxon.option</code>. Whichever edition you are using, the external object model is available
    for use only if you register it using the method
                     <a class="bodylink"
                        href="../../javadoc/net/sf/saxon/Configuration.html#registerExternalObjectModel"><code>registerExternalObjectModel</code></a> on the
                     <a class="bodylink" href="../../javadoc/net/sf/saxon/Configuration.html"><code>Configuration</code></a> object,
  or via the <a class="bodylink" href="../../configuration/configuration-file.xml">configuration file</a>. 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.</p>
               </li>
               <li content="para">
                  <p><i>An exception to the previous paragraph: when Saxon is loaded using the JAXP 
     <a class="bodylink" href="../../javadoc/net/sf/saxon/xpath/XPathFactoryImpl.html"><code>XPathFactory</code></a> mechanism,
  the support modules for JDOM, JDOM2, XOM, and DOM4J are registered automatically, provided that the underlying JDOM, JDOM2, XOM, or DOM4J JAR files
  are on the classpath. This is because Saxon's <a class="bodylink" href="../../javadoc/net/sf/saxon/xpath/XPathFactoryImpl.html"><code>XPathFactory</code></a> implementation
  registers itself using the Java service mechanism as being able to handle these object models, so it must honor this promise.</i></p>
               </li>
               <li content="para">
                  <p>Saxon has been validated with
   JDOM 1.0, JDOM 1.1.1, XOM 1.1, XOM 1.2.1, XOM 1.2.6, and DOM4J 1.6.1. Saxon has <b>not</b> been tested with the alpha release
   of DOM4J 2.0.0 (which at the time of writing has been at alpha status for 18 months). Preliminary testing has been carried out
                      with JDOM 2, but this interface is not released with Saxon 9.4 because JDOM 2 is not yet sufficiently stable.
   </p>
               </li>
            </ul>
         </li>
      </ul>
      <p>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. By default, however,
 it uses the parser that comes with the Java platform (a version of Xerces in the case of JDK 1.5). The parser must
 be SAX2-compliant. All the relevant JAR files must be installed on your Java CLASSPATH.</p>
      <p>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.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="licensekey.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>
