Saxon is an
XSLT
XSLT (Extensible Stylesheet Language Transformations) is a language originally designed for transforming XML documents into other XML documents, or other formats such as HTML for web pages, plain text or XSL Formatting Objects, which may subseque ...
and
XQuery
XQuery (XML Query) is a query and functional programming language that queries and transforms collections of structured and unstructured data, usually in the form of XML, text and with vendor-specific extensions for other data formats (JSON, bin ...
processor created by
Michael Kay and now developed and maintained by his company, Saxonica. There are
open-source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
and also
closed-source
Proprietary software is software that is deemed within the free and open-source software to be non-free because its creator, publisher, or other rightsholder or rightsholder partner exercises a legal monopoly afforded by modern copyright and inte ...
commercial versions. Versions exist for
Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
,
JavaScript
JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
and
.NET.
The current version, as of April 2022, is 11.3.
Versions
The original development line of Saxon ended with the version 6 series. This is a series of XSLT 1.0 processors. The current version, 6.5.5, is not undergoing further development aside from maintenance. The 6 series is only available for the Java programming language.
The current development line, Saxon 11, implements the XSLT 3.0 and XQuery 3.1 specifications. Saxon is also capable of processing XSLT 1.0 and XSLT 2.0 stylesheets. (XSLT 2.0 and 3.0 are highly backwards compatible with XSLT 1.0.).
There are two separate source bases: the Java source, and the JavaScript source. The Java source is used to generate products for three platforms: SaxonJ (for Java and other JVM languages such as Scala), SaxonCS (for C# and other .NET languages such as VB.NET), and SaxonC (with APIs for C, C++, Python, and PHP). The JavaScript source base is used to generate SaxonJS, which runs in Web browsers and under Node.js.
The Java-built versions come in three levels: Home Edition offers the minimal level of standards conformance defined in the specifications, as an open-source product. Professional Edition adds vendor-specific functionality not required by the standards, for example a range of extension functions and serialisation options. Enterprise Edition adds advanced features (defined in the W3C standards as optional) including schema-awareness and streaming, as well as performance-related features such as multi-threaded execution and bytecode generation.
The SaxonCS product is built from the Java source base by means of a custom Java-to-C# transpiler written in XSLT (see https://markupuk.org/webhelp/index.html#ar04.html). As of April 2022, only the Enterprise Edition is offered on this platform.
From 2004 until 2009, Saxon was available into two separate forms: Saxon-B and Saxon-SA. Both of these were built on similar codebases. Saxon-B was
open-source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
software released under the
Mozilla Public License
The Mozilla Public License (MPL) is a free and open-source weak copyleft license for most Mozilla Foundation software such as Firefox and Thunderbird The MPL license is developed and maintained by Mozilla, which seeks to balance the concerns ...
, while Saxon-SA was a closed-source commercial product.
The difference between Saxon-B and Saxon-SA was that B was "basic" while SA was "schema-aware". These terms are references to terms in the XSLT 2.0 and XQuery 1.0 specification. A processor that is "schema-aware" is able to use a
W3C XML Schema
XSD (XML Schema Definition), a recommendation of the World Wide Web Consortium ( W3C), specifies how to formally describe the elements in an Extensible Markup Language (XML) document. It can be used by programmers to verify each piece of item con ...
to define the data types of the various elements in the source XML document(s). These data types can then be used in
XPath
XPath (XML Path Language) is an expression language designed to support the query or transformation of XML documents. It was defined by the World Wide Web Consortium (W3C) and can be used to compute values (e.g., strings, numbers, or Boolean v ...
2.0 and XSLT 2.0 commands. A "basic" XSLT 2.0 processor is unable to use data typing information.
Saxon offers strict conformance to the XSLT 2.0, XPath 2.0 and 3.0, and XQuery 1.0 and 3.0 W3C Recommendations, and also implements XML Schema 1.0 and 1.1. As of 2021 the current version (10.6) conforms with the W3C Recommendations for XSLT 3.0, XPath 3.1, and XQuery 3.1.
The Saxon source code is written in Java. During 2005-6 M., David Peterson and others demonstrated that Saxon could be cross-compiled to run on .NET using the
IKVM.NET
IKVM.NET is an implementation of Java for Mono and the Microsoft .NET Framework. IKVM is free software, distributed under the zlib permissive free software license.
The original developer, Jeroen Frijters, discontinued work on IKVM in 2015. In ...
cross-compiler, launching Saxon.NET as a separate product independent of the original developer. With the release of Saxon 8.7, Saxonica adopted this technology and from that release onwards, all versions have been released simultaneously for Java and .NET. The .NET version of the product omits features that are specific to the Java platform (such as integration with
JDOM
JDOM is an open-source Java-based document object model for XML that was designed specifically for the Java platform so that it can take advantage of its language features. JDOM integrates with Document Object Model (DOM) and Simple API for X ...
,
Dom4j
dom4j is an open-source Java library for working with XML, XPath and XSLT. It is compatible with DOM, SAX and JAXP
In computing, the Java API for XML Processing, or JAXP ( ), one of the Java XML Application programming interfaces, provides ...
, and
XOM) and instead provides features that integrate with the XML processing capabilities of the .NET platform.
In 2012, following a series of prototypes, Saxonica released Saxon Client Edition (Saxon-CE), a version of the product adapted to run within the browser environment. This is achieved by adapting the Java source code so that it can be cross-compiled to JavaScript using the
GWT cross-compiler produced by
Google
Google LLC () is an American multinational technology company focusing on search engine technology, online advertising, cloud computing, computer software, quantum computing, e-commerce, artificial intelligence, and consumer electronics. ...
. Saxon-CE provides the first implementation of XSLT 2.0 running on the browser, and also extends the language so that rather than merely generating HTML, it can directly handle user interaction. With the release of Saxon-CE 1.1 in February 2013, the product became open source. In February 2016 Michael Kay announced that Saxonica was working on a replacement for Saxon-CE written in pure JavaScript, and dubbed Saxon-JS.
Michael Kay, the author of Saxon, was the editor of the XSLT 2.0 specification and is also editor of the XSLT 3.0 draft.
Features
The Saxon versions that are available for the Java, C (including PHP and Python), and .NET platforms are built from a single codebase. The latter version is built using a
transpiler
A source-to-source translator, source-to-source compiler (S2S compiler), transcompiler, or transpiler is a type of translator that takes the source code of a program written in a programming language as its input and produces an equivalent sou ...
. All technology platform versions share the same capabilities, and they are made available with three different feature sets under two different licensing conditions. For each of these technology platforms, there is an open-source product, Saxon-HE, that is licensed under
MPL-2.0. It provides basic XSLT 3.0, XPath 3.1, and XQuery 3.1 functionality, as defined by the respective specifications. In addition, Saxon-HE implements certain features that the XSLT 3.0 specification declares as optional and that were previously reserved for the commercial versions, such as dynamic XPath 3.1 evaluation and higher-order functions in XSLT 3.0. The commercial versions are called Saxon-PE and Saxon-EE. A detailed and up-to-date feature matrix can be found o
the Saxonica web site
The fourth technology platform is JavaScript. Previously the open-source XSLT processor Saxon-CE was cross-compiled from the common Java source using
GWT. SaxonJS is a completely new implementation in JavaScript. The XSLT sources can either be compiled using Saxon-EE or using a built-in XSLT-based XSLT compiler, which creates less optimized code. On the other hand, the XSLT-based XSLT compiler allows dynamic compilation and execution of XSLT. While SaxonJS supports most of the XSLT 3.0 and XPath 3.1 features available in Saxon-HE, SaxonJS does not support XQuery. In contrast to Saxon-HE and the discontinued Saxon-CE, SaxonJS is not open source, but it can be used for free in the browser or in
Node.js
Node.js is an open-source server environment. Node.js is cross-platform and runs on Windows, Linux, Unix, and macOS. Node.js is a back-end JavaScript runtime environment. Node.js runs on the V8 JavaScript Engine and executes JavaScript code o ...
.
[{{cite web , url=https://www.saxonica.com/saxon-js/documentation2/index.html#!conditions , title=SaxonJS Documentation ]
See also
*
libxml2
libxml2 is a software library for parsing XML documents. It is also the basis for the libxslt library which processes XSLT-1.0 stylesheets.
Description
Written in the C programming language, libxml2 provides bindings to C++, Ch, XSH, C#, Py ...
/
Libxslt
libxslt is the XSLT C library developed for the GNOME project. It provides an implementation of XSLT 1.0, plus most of the EXSLT set of processor-portable extensions functions and some of Saxon's evaluate and expressions extensions. libxslt i ...
(competitor)
*
Xalan
Xalan is a popular open source software library from the Apache Software Foundation, that implements the XSLT 1.0 XML transformation language and the XPath 1.0 language. The Xalan XSLT processor is available for both the Java and C++ programming ...
(competitor)
References
External links
Saxon-B homepageSaxonica homepage for Saxon-SA
AntillesXML (GUI for Saxon)
description of Saxon(German)
Free system software
Java platform
XQuery processors
XSLT processors