What is SAXON?

The SAXON package is a collection of tools for processing XML documents. The main components of Saxon 6.5.x are:

So you can use SAXON by writing XSLT stylesheets, by writing Java applications, or by any combination of the two.

SAXON is particularly useful when converting XML data into other formats. The output format may be XML, or HTML, or some other format such as comma separated values, EDI messages, or data in a relational database.

SAXON implements the XSLT 1.0 recommendation, including XPath 1.0, in its entirety. SAXON also provides some XSLT 1.1 features, in particular:

Note that the XSLT 1.1 working draft was subsequently abandoned. Most of the new functionality (with the exception of Java and Javascript language bindings) reappeared in the XSLT 2.0 drafts, but in some cases with different syntax.

In addition, Saxon provides an extensive library of extension elements and extension functions, all implemented in conformance with the XSLT 1.0 standard to ensure that portable stylesheets can be written. These include the EXSLT extension libraries common, sets, math, dates-and-times, and functions. Many of these extensions were pioneered in Saxon and have since become available in other products.

Saxon also includes a number of powerful extension functions that go beyond EXSLT. Most of these rely on the concept of "stored expressions" as an additional data-type: this allows an XPath expression to be constructed at run-time from a string, and allows an expression to be passed as an argument to a function (which in effect provides higher-order functions). This allows:

As a Java class library, SAXON gives you the ability to use the XSLT rule-based approach to document processing, but with the flexibility of the full Java language. You can declare handler classes to match particular patterns in the document, and can process arbitrary sets of nodes selected using XPath expressions. This provides a high-level query capability which you can mix with purely navigational access.


Changes in version 6.5.4 (2005-06-22)

The TransformerFactoryImpl (Saxon's implementation of the JAXP TransformerFactory class) now supports the method setFeature introduced in JAXP 1.3. However, the "secure processing" feature which the specification says all implementations must provide is not supported.

The Controller (Saxon's implementation of the JAXP Transformer class) now implements the reset() method introduced in JAXP 1.3. Note that the reset() method does not clear the document pool (the collection of documents loaded using the document() function. This is because the purpose of resetting a Transformer rather than creating a new one is in order to reuse resources.

The Saxon tree models implement DOM interfaces. This support has been upgraded so that all DOM level 3 methods are present, as required in order to compile the code under JDK 1.5. In many cases, the new methods are trivial implementations, that is, they typically return null or throw an UnsupportedOperationException if called.

In the NodeInfo interface, the method isSameNode() has been renamed isSameNodeInfo() to avoid conflict with the DOM Level 3 interface of the same name.

To allow compilation under JDK 1.5, variables named "enum" have been renamed.

The algorithm for generating IDs for attribute and namespace nodes has been changed in both the tiny tree and the standard tree. The previous algorithm did not guarantee that the IDs consisted of ASCII alphanumeric characters, as required by the XSLT 1.0 specification.

In version 6.5.3 the following bug was present, and has now been fixed: When comparing two nodes for identity (e.g. when evaluating the union operator |), an element, text, comment or PI node may be considered identical to an attribute or namespace node if they happen to be at the same offset in their respective data structures. This problem applied to the TinyTree only.

A performance bug in the implementation of result tree fragments has been fixed. The code in FragmentValue.java used the construct new Vector(20, 20) to allocate space for nodes on the tree; the effect of this is that a fixed allocation unit of 20 items is used, meaning that the cost of constructing the tree increases as the square of the number of nodes.

Several bugs in xsl:number have been fixed:

An error is now reported if there are two templates in different stylesheet modules with the same name and the same import precedence, provided (a) that there is no template with that name and higher import precedence, and (b) that the template is actually referenced in an xsl:call-template instruction. {test error052}

An error is now reported if a namespace prefix used in the exclude-result-prefixes attribute of the xsl:stylesheet element of an imported or included stylesheet module has not been declared, unless the module is in forwards-compatible mode (for example, because it specifies version="2.0". {test error235}

Within xsl:for-each, any xsl:sort elements must now precede any other instructions. {test error172}

Some previously unreported errors have been found as a result of running Saxon 6.5.4 against the test suite for Saxon 8.5. The following bugs have been fixed:

Support for FOP has been dropped.

Saxon 6.5.4 is no longer supported under JDK 1.1. In consequence, Instant Saxon, which relied on the Microsoft JVM, is no longer available.

The applet support module XSLTProcessorApplet, and the sample HTML pages illustrating use of Saxon as an applet, have been dropped.