# What is Saxon?

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

- An XSLT 2.0 processor, which implements the Version 2.0 XSLT and XPath Recommendations from the World Wide Web Consortium, found at http://www.w3.org/TR/xslt20 and http://www.w3.org/TR/xpath20 with a number of powerful extensions.
- An XPath 2.0 processor accessible via an API to Java applications.
- An XQuery 1.0 processor that can be used from the command line, or invoked from a Java application by use of an API.

So you can use Saxon by writing XSLT stylesheets, by writing XQuery queries by writing Java applications, or by combinations of the approaches.

Saxon implements the XSLT 1.0 recommendation, including XPath 1.0, in its entirety. Saxon 7.x also implements most of the features defined in the XSLT 2.0, XPath 2.0, and XQuery 1.0 working drafts, in particular:

- Support for multiple output files using `xsl:result-document`
- Full processing capability on temporary trees (previously known as result tree fragments)
- Support for sequences of nodes and simple values
- Grouping facilities
- Regular expression processing
- Support for the new XPath expressions `if`, `for`, `some` and `every`
- Support for named collating sequences
- Many new functions and operators
- Support for new data types, such as dates, times, and durations

Saxon does not yet implement all of XSLT 2.0, XPath 2.0, or XQuery 1.0. The most notable omission is support for XML Schema data typing. Most of the important built-in types are supported, but not user-defined types. Development of a schema-aware version of Saxon is well advanced; this will be available as a commercial product from Saxonica Limited.

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

These functions are in general accessible from XQuery as well as XSLT, except where they depend on stylesheet information.

Saxon also provides an API allowing a Java application to execute XPath and XQuery expressions and process the results. The XPath API is modelled on the proposed DOM Level 3 API, but adapted to the requirements of XPath 2.0. A separate API is available for XQuery 1.0, reflecting differences in the way the context is set up.