Saxon XSLT

Last updated

Saxon is an XSLT and XQuery processor created by Michael Kay and now developed and maintained by his company, Saxonica. There are open-source and also closed-source commercial versions. Versions exist for Java, JavaScript [1] and .NET.

Contents

The current version, as of April 2022, is 11.3. [2]

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 12, implements the XSLT 3.0 and XQuery 3.1 specifications. Saxon 12 can process XSLT 1.0 and XSLT 2.0 stylesheets. (XSLT 2.0 and 3.0 are highly backwards compatible with XSLT 1.0. [3] ) and also includes selective support for the proposed XSLT 4.0 specification [4] .

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 software released under the Mozilla Public License, 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 to define the data types of the various elements in the source XML document(s). These data types can then be used in XPath 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 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, Dom4j, 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. 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. [5]

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. [6] 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 on 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. [7]

See also

Related Research Articles

<span class="mw-page-title-main">Object database</span> Type of database management system

An object database or object-oriented database is a database management system in which information is represented in the form of objects as used in object-oriented programming. Object databases are different from relational databases which are table-oriented. A third type, object–relational databases, is a hybrid of both approaches.

<span class="mw-page-title-main">XML</span> Markup language by the W3C for encoding of data

Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. The World Wide Web Consortium's XML 1.0 Specification of 1998 and several other related specifications—all of them free open standards—define XML.

In computing, the term Extensible Stylesheet Language (XSL) is used to refer to a family of languages used to transform and render XML documents.

XSLT 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 subsequently be converted to other formats, such as PDF, PostScript and PNG. Support for JSON and plain-text transformation was added in later updates to the XSLT 1.0 specification.

The Java programming language XML APIs developed by Sun Microsystems consist of the following separate computer-programming APIs:

XForms is an XML format used for collecting inputs from web forms. XForms was designed to be the next generation of HTML / XHTML forms, but is generic enough that it can also be used in a standalone manner or with presentation languages other than XHTML to describe a user interface and a set of common data manipulation tasks.

XPath 2.0 is a version of the XPath language defined by the World Wide Web Consortium, W3C. It became a recommendation on 23 January 2007. As a W3C Recommendation it was superseded by XPath 3.0 on 10 April 2014.

<span class="mw-page-title-main">XMLSpy</span> XML and JSON editing integrated development environment

XMLSpy is a proprietary XML editor and integrated development environment (IDE) developed by Altova. XMLSpy allows developers to create XML-based and Web services applications using technologies such as XML, JSON, XBRL, XML Schema, XSLT, XPath, XQuery, WSDL and SOAP.

<span class="mw-page-title-main">Michael Howard Kay</span>

Michael Howard Kay Ph.D FBCS is the editor of the W3C XSLT 2.0 and 3.0 language specifications for performing XML transformations, and the developer of the Saxon XSLT and XQuery processing software.

<span class="mw-page-title-main">Oxygen XML Editor</span>

The Oxygen XML Editor is a multi-platform XML editor, XSLT/XQuery debugger and profiler with Unicode support. It is a Java application so it can run in Windows, Mac OS X, and Linux. It also has a version that can run as an Eclipse plugin.

XQuery Update Facility is an extension to the XML Query language, XQuery. It provides expressions that can be used to make changes to instances of the XQuery 1.0 and XPath 2.0 Data Model.

XProc is a W3C Recommendation to define an XML transformation language to define XML Pipelines.

<span class="mw-page-title-main">RegexBuddy</span>

RegexBuddy is a regular expression programming tool by Just Great Software Co. Ltd. for the Microsoft Windows operating system. It provides an interface for building, testing, and debugging regular expressions, in addition to a library of commonly used regular expressions, an interface for generating code to use regular expressions in the desired programming environment, a graphical grep tool for searching through files and directories, and an integrated forum for seeking and providing regular expression advice with other RegexBuddy users.

XPath 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 from the content of an XML document. Support for XPath exists in applications that support XML, such as web browsers, and many programming languages.

Content Assembly Mechanism (CAM) is an XML-based standard for creating and managing information exchanges that are interoperable and deterministic descriptions of machine-processable information content flows into and out of XML structures. CAM is a product of the OASIS Content Assembly Technical Committee.

XQuery 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. The language is developed by the XML Query working group of the W3C. The work is closely coordinated with the development of XSLT by the XSL Working Group; the two groups share responsibility for XPath, which is a subset of XQuery.

<span class="mw-page-title-main">XQuery API for Java</span> Application programming interface

XQuery API for Java (XQJ) refers to the common Java API for the W3C XQuery 1.0 specification.

<span class="mw-page-title-main">XML transformation language</span> Type of programming language

An XML transformation language is a programming language designed specifically to transform an input XML document into an output document which satisfies some specific goal.

Zorba is an open source query processor written in C++, implementing

Stylus Studio is an integrated development environment (IDE) for the Extensible Markup Language (XML). It consists of a variety of tools and visual designers to edit and transform XML documents and legacy data such as electronic data interchange (EDI), comma-separated values (CSV) and relational data.

References

  1. "Saxon Client Edition 1.0". Saxonica. Retrieved 14 August 2012.
  2. Saxon XSLT official website
  3. This Recommendation builds on the success of [XSLT 1.0], which was published on 16 November 1999. Many new features have been added to the language (see J.2 New Functionality) while retaining a high level of backwards compatibility. XSL Transformations (XSLT) Version 2.0
  4. XSL Transformations (XSLT) Version 4.0.
  5. "Introducing Saxon-JS".
  6. https://www.saxonica.com/papers/markupuk-2021mhk.pdf [ bare URL PDF ]
  7. "SaxonJS Documentation".