SAXONICA

Saxon Documentation
Full Contents
About Saxon
Changes in this Release
| Version 8.7 (2006-02-24)
| Version 8.6.1 (24 November 2005)
| Version 8.6 (3 November 2005)
| Version 8.5.1 (26 August 2005)
| Version 8.5 (2 August 2005)
| Version 8.4 (4 April 2005)
| Version 8.3 (11 February 2005)
» | Version 8.2 (21 December 2004)
| Version 8.1.1 (8 October 2004)
| Version 8.1 (24 September 2004)
| Version 8.0 (1 June 2004)
Conditions of Use
Using XSLT 2.0
Using XQuery
Handling Source Documents
XML Schema Processing
The XPath API
Saxon on .NET
Extensibility
Saxon Extensions
Sample Saxon Applications
The Saxon SQL Extension
XSLT Elements
XPath 2.0 Expression Syntax
Function Library
Standards Conformance

# JAXP 1.3 support

Saxon 8.2 implements APIs defined in JAXP 1.3 (JAXP is the Java API for XML Processing). JAXP 1.3 is a standard component in JDK 1.5, but if you are using JDK 1.4, it must be installed separately. For licensing reasons the JAXP package is not included in the Saxon distribution; instead you must download it separately from https://jaxp.dev.java.net/. This download includes two JAR files, `jaxp-api.jar` and `dom.jar`, which must be present on the classpath when running Saxon under JDK 1.4. Note that this means you cannot invoke Saxon using the `-jar` option, since this requires all files to be present in a single JAR archive, and ignores the CLASSPATH setting.

The JAXP 1.3 XPath API is supported. This allows XPath expressions to be evaluated programmatically from a Java application. The underlying tree structure can be any implementation of the Saxon Object Model (the `NodeInfo` interface), or a DOM, or JDOM, or XOM. For full details, see The XPath API.

This has been achieved largely by making the existing classes in the old Saxon XPath API implement the new JAXP interfaces. Existing applications using the old interfaces should for the most part continue to work unchanged, and can be migrated to use the new JAXP methods when the opportunity arises. Note however that the old `XPathExpression` class has been renamed `XPathExpressionImpl` to void confusion with the JAXP interface named `XPathExpression` (which `XPathExpressionImpl` now implements). Some applications will probably want to continue to use the native Saxon methods, because the JAXP interface is oriented towards XPath 1.0 rather than 2.0: although the Saxon implementation supports XPath 2.0, the JAXP interface imposes limitations in the way that results are returned.

To generalize the handling of external object models, a new interface `ExternalObjectModel` has been introduced, which is implemented by each object model. External object models can be registered with the `Configuration`, and there is a method in the `Configuration` to search for the object model implementation that supports a given class of node. This doesn't quite allow new object models to be plugged into Saxon without source code change, but it gets close.

The `QNameValue` class can convert between a Saxon `QNameValue` and a JAXP `QName`. Conversion between these two classes is also supported when calling Java extension functions and when passing stylesheet parameters.

The new Saxon `NamespaceContextImpl` class acts as a bridge between Saxon's `NamespaceResolver` and the equivalent JAXP 1.3 `NamespaceContext` interface. This allows any implementation of Saxon's `NamespaceResolver` to be wrapped as a JAXP 1.3 `NamespaceContext`.

The nodes in Saxon's standard tree and tinytree models now implement the DOM Level 3 Node interface.

Saxon-SA 8.2 also supports the JAXP 1.3 schema validation API. For details, see schema processing.

Next