Michael.Kay at Michael.Kay at
Tue Feb 16 10:07:35 GMT 1999

SAXON is a Java library for processing XML documents: it provides a number
of services above the SAX and DOM level to make applications easier to write
and more modular. It is available as a free download with source code

SAXON 4.0 is available on

There are substantial changes in this release, notably:

* Improved support for processing using the DOM, in a way that is forwards
compatible with serial (SAX-based) applications: you can use the same
element handlers in both modes. (This is perhaps of particular interest in
the light of current xml-dev "SAX-vs-DOM" discussions). The processing model
(selecting an element handler based on a pattern match) is identical to that
for XSL.

* Support for Stylesheets. You can now invoke many of SAXON's capabilities
without writing any Java code. SAXON Stylesheets support a useful subset of
XSL and provide two important additional features: the ability to create
multiple output files, and the ability to freely mix XSL and Java code: XSL
can be used to process some elements, and Java for others, or you can
preprocess the element in Java before rendering it in XSL. Very useful if
you are doing more than simple rendering, e.g. if you are loading a
relational database.

(To implement some of these features I have had to make incompatible
changes: existing users please read the "changes" file carefully.)

The ability to create multiple output files is particularly attractive for
bulk rendering into HTML, and I'm not aware of any other tool that does it.
A sample XSL stylesheet is included for rendering Jon Bosak's version of the
New Testament: it is only 200 lines long, but produces a set of 292 linked
HTML files in a single directory. This was previously published as a Java
application: the SAXON download includes both Java and XSL versions for
comparison. You can see the result of the rendition at This feature
seems to fit very neatly into the XSL architecture and I commend it to the
authors of the spec.

I am still working on the next important innovation, stylesheets that can be
processed in a single serial pass of the source XML document: progress looks
promising - though as always, I do this stuff in the gaps between
revenue-earning projects.

Michael Kay
Michael.Kay at

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as: and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list