JAXP Transformation Examples

This section applies to the Java platform only.

As an alternative to the s9api interface, Saxon supports the Java JAXP Transformation API (package javax.xml.transform), originally known as TrAX, for invoking the XSLT stylesheet processor (see Using JAXP for Transformations). This API is useful when you want to write your own Java applications that invoke Saxon XSLT transformations.

A sample program that illustrates many features of the JAXP Transformation interface (including Saxon-specific extensions) is included in the saxon-resources download as JAXPExamples.java. Source XML and XSLT files for use with this program are included in the data and style directories. To run the program, use the command:

cd samples
java he/JAXPExamples

You can supply an argument to indicate which of the examples you want to run; see the source code for details. By default, they are all executed in turn.