SAXONICA

Saxon Documentation
Full Contents
About Saxon
Changes in this Release
Notices
Using XSLT 2.0
| Using XSLT 2.0 Stylesheets
| Running XSLT from the Command Line
| Compiling a Stylesheet
| Running Saxon XSLT transformations from Ant
» | Invoking XSLT from an application
| Performance Analysis
Using XQuery
Handling Source Documents
XML Schema Processing
XPath API for Java
Saxon on .NET
Extensibility
Saxon Extensions
Sample Saxon Applications
The Saxon SQL Extension
XSLT Elements
XPath 2.0 Expression Syntax
Function Library
Standards Conformance

# Invoking XSLT from an application

Rather than using the XSLT interpreter from the command line, you may want to include it in your own application, perhaps one that enables it to be used within an applet or servlet. If you run the interpreter repeatedly, this will always be much faster than running it each time from a command line.

There are several APIs you can use to invoke Saxon's XSLT processor from an application.

On the Java platform, Saxon incorporates support for the standard JAXP transformation API (originally known as TrAX). This is compatible with the API for invoking other XSLT processors such as Xalan and Oracle.

This API is described in the documentation provided with JDK 1.4. It is available online at http://java.sun.com/j2se/1.4/docs/api/ Look for the javax.xml.transform package.

Alternatively, you can use Saxon's own s9api interface. This is a newly designed interface designed to provide an integrated approach to XML processing across the different range of languages supported by Saxon; unlike JAXP, it includes support for XSLT 2.0 capabilities, and it also takes advantage of generics in Java 5.

There is also an API for Saxon on the .NET platform, designed to make Saxon available from .NET languages such as C#, VB.NET, and ASP.NET. See Saxon on .NET.

- Using s9api for Transformations

- Using JAXP for Transformations

Next