SaxonJS is a high-performance XSLT 3.0 processor that runs either in the browser, or on Node.js. It conforms with the latest W3C specifications (notably XSLT 3.0 and XPath 3.1), together with extensions designed to meet the needs of modern web applications.
SaxonJS works with JSON as well as XML, and is ideally suited for applications that need to handle both.
And by offering both client-side and server-side capability, SaxonJS allows you to reuse code between the two environments and deploy it in a flexible way for maximum performance.
DOWNLOAD
|
Download the latest SaxonJS releases from the JavaScript platform download page. |
If you've used XSLT 1.0 and XPath 1.0 in the past, you'll find that the latest versions of the standards open up a new world. They now offer much richer data manipulation (grouping, regular expressions, date-and-time handling, URI manipulation), modern programming constructs such as higher order functions, and support for data formats other than XML, most notably JSON, plain text files, and HTML5. SaxonJS further extends this capability with support for asynchronous HTTP requests and handling of user interaction.
SaxonJS can be invoked either from the Node.js command line, or from JavaScript code running either client-side or server-side. As well as allowing XSLT transformations to be scheduled, the API allows direct invocation of XPath expressions against DOM Nodes, allowing it to be used as a replacement for the aging XPath 1.0 engine bundled with the JavaScript DOM. It also provides a standalone serializer allowing the results of queries (whether coded in XPath or JavaScript) to be output as XML, HTML5, or JSON.
Return to top of page
SaxonJS 3 is a major upgrade. The first release in December 2024 is a preview release of the free Home Edition product, available on Node.js and the browser. An Enterprise Edition for Node.js with advanced features is also in the works.
The most significant changes are:
Return to top of page
SaxonJS 2 is a major upgrade.
The most noticeable differences are:
There are many other enhancements. Some of the most important are:
Although SaxonJS now has its own XSLT compiler and XPath parser, it is still possible to use it with code generated by the optimizing compiler in the Saxon-EE product.
Return to top of page
SaxonJS 3.0.0-beta1 released 18 December 2024, preview release for web browsers and Node.js.
SaxonJS 2.7 released 17 October 2024, bug fixing maintenance release for web browsers and Node.js.
SaxonJS 2.6 released 13 October 2023, bug fixing maintenance release for web browsers and Node.js.
SaxonJS 2.5 released 4 October 2022, bug fixing maintenance release for web browsers and Node.js.
SaxonJS 2.4 released 12 May 2022, bug fixing maintenance release for web browsers and Node.js.
SaxonJS 2.3 released 20 August 2021, bug fixing maintenance release for web browsers and Node.js.
SaxonJS 2.2 released 11 May 2021, bug fixing maintenance release for web browsers and Node.js.
SaxonJS 2.1 released 2 March 2021, bug fixing maintenance release for web browsers and Node.js.
SaxonJS 2.0 released 12 June 2020, for web browsers and Node.js.
For SaxonJS 2+, there are two XSLT-to-SEF (stylesheet export file) compilers available: the XJ compiler in Saxon-EE 10+, and the XX compiler integrated into SaxonJS 2+ for Node.js. XJ-compiled SEFs for SaxonJS 2 must be produced using Saxon-EE 10+, SEFs produced by earlier versions of Saxon-EE will not work with SaxonJS 2. To use all latest features for SaxonJS 3, XJ-compiled SEFs must be produced using Saxon-EE 12.5+.
For information on earlier releases, go to Saxon-JS 1 releases.
For detailed information on all SaxonJS releases, see the Release notes.
Return to top of page
Full documentation is available for the latest versions of the product, SaxonJS 3 and 2, containing information about the capabilities of the product, the different product components for Node.js and browsers, instructions for installing the product and writing applications, details of the API and how to run from the Node command line, and sample applications:
Return to top of page
The SaxonJS tutorial, presented at Declarative Amsterdam 2021, provides a hands-on introduction to getting started with SaxonJS, with plenty of exercises and code samples. Further examples of sample applications and demos are described in the Samples section of the SaxonJS documentation.
LinkedDataHub is an open-source, RDF-native Knowledge Graph notebook developed by AtomGraph. All of its UI is rendered using XSLT 3.0 and IXSL, with SaxonJS in the browser. For more information, see the LinkedDataHub project homepage.
Return to top of page
SaxonJS is free of charge but not open source. Details of the license can be found in the Licensing section of the documentation.
For enterprise users who want additional support, Saxonica provides a subscription service for an annual fee: see SaxonJS Enterprise Services in the Saxonica online store. As well as traditional support, this provides access to source code, add-on development and debugging tools, and (in due course) additional product functionality. Details of this service are provided in the SaxonJS Enterprise Services product definition and licensing terms (PDF). Please contact us by email to saxon-orders@saxonica.com if you would like more information.
Return to top of page
SaxonJS for the browser is issued in the form of compressed JavaScript code that is mounted on your web server to be fetched and executed from HTML pages running in a web browser. The software is issued as a zip file that you will first need to unzip into your chosen location (the relevant section of your web server filestore). See the Installing and running client-side page of the documentation for more details.
Run npm install saxon-js
to install SaxonJS 2 for Node.js, and npm
install xslt3
to install the command line interface. For further details see
Installing and running in Node.js in the SaxonJS 2 documentation.
Run npm install saxonjs-he
to install SaxonJS 3 for Node.js, and npm
install xslt3-he
to install the command line interface. For further details see
Installing and running in Node.js in the SaxonJS 3 documentation.
Return to top of page
Please use the help forums and bug trackers in the SaxonJS project at the Saxonica community site if you need help or advice.
For more specialized advice, Saxonica may be able to offer consultancy.
Return to top of page
The following table gives an overview of the compatibility between SaxonJS releases and the Saxon-EE version used to generate SEFs.
In particular, note that from Saxon 10, SEFs generated for use with SaxonJS are in JSON format, and require SaxonJS 2. Saxon 9.9 and earlier produce SEFs in XML format, which will not work with SaxonJS 2.
If using Saxon 11, please use 11.3 or later, as a number of bugs in compiling to SEF were fixed in the 11.3 maintenance release.
To be able to use all the new features of SaxonJS 3, SEFs must be produced with Saxon-EE
12.5 or later, specifying -target:JS3
on the command line.
Saxon-EE | SaxonJS | ||||||
1.0.0 | 1.0.1 | 1.0.2 | 1.1.0 | 1.2.0 | 2.0+ | 3.0+ | |
9.7.0.15+
|
● |
* |
* |
* |
* |
||
9.8.0.1+
|
● |
● |
● |
* |
* |
||
9.8.0.12+
|
● |
● |
● |
● |
● |
||
9.9.0.1+
|
● |
||||||
10.0+
|
● |
* |
|||||
11.3+
|
● |
* |
|||||
12.5+
|
● |
● = all features of the SaxonJS release are available for SEFs generated by this version of Saxon-EE.
* = SaxonJS can run SEFs generated by this Saxon-EE version, but not all of its features will be available.
Otherwise, there is no guarantee that SEFs will work correctly with the SaxonJS release.
Return to top of page