CR: XSL Transformations (XSLT) Version 3.0

XSL Transformations (XSLT) Version 3.0

https://www.w3.org/TR/2017/CR-xslt-30-20170207/

feedback due by: 2017-03-07

Abstract


This specification defines the syntax and semantics of XSLT 3.0, a language designed primarily for transforming XML documents into other XML documents.

XSLT 3.0 is a revised version of the XSLT 2.0 Recommendation [XSLT 2.0] published on 23 January 2007.

The primary purpose of the changes in this version of the language is to enable transformations to be performed in streaming mode, where neither the source document nor the result document is ever held in memory in its entirety. Another important aim is to improve the modularity of large stylesheets, allowing stylesheets to be developed from independently-developed components with a high level of software engineering robustness.

XSLT 3.0 is designed to be used in conjunction with XPath 3.0, which is defined in [XPath 3.0]. XSLT shares the same data model as XPath 3.0, which is defined in [XDM 3.0], and it uses the library of functions and operators defined in [Functions and Operators 3.0]. XPath 3.0 and the underlying function library introduce a number of enhancements, for example the availability of higher-order functions.

As an implementer option, XSLT 3.0 can also be used with XPath 3.1. All XSLT 3.0 processors provide maps, an addition to the data model which is specified (identically) in both XSLT 3.0 and XPath 3.1. Other features from XPath 3.1, such as arrays, and new functions such as random-number-generatorFO31 and sortFO31, are available in XSLT 3.0 stylesheets only if the implementer chooses to support XPath 3.1.

Some of the functions that were previously defined in the XSLT 2.0 specification, such as the format-dateFO30 and format-numberFO30 functions, are now defined in the standard function library to make them available to other host languages.

XSLT 3.0 also includes optional facilities to serialize the results of a transformation, by means of an interface to the serialization component described in [XSLT and XQuery Serialization]. Again, the new serialization capabilities of [XSLT and XQuery Serialization 3.1] are available at the implementer’s option.

This document contains hyperlinks to specific sections or definitions within other documents in this family of specifications. These links are indicated visually by a superscript identifying the target specification: for example XP30 for XPath 3.0, DM30 for the XDM data model version 3.0, FO30 for Functions and Operators version 3.0.

Status of the Document


This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at https://www.w3.org/TR/.

This document is governed by the 1 September 2015 W3C Process Document.

This is a Candidate Recommendation as described in the process document. It has been developed by the W3C XSLT Working Group. Comments on this document will be formally accepted until 7 March 2017. The Working Group expects to advance this specification first to Proposed Recommendation and then to Recommendation status.

This document is a revised Candidate Recommendation; it incorporates changes made against the Candidate Recommendation of 19 December 2015 as a result of review feedback. Changes to this document since the previous Candidate Recommendation are detailed in K Changes since the Candidate Recommendation of 19 November 2015. These changes result from: Comments made directly by readers of the specification; Implementation experience from two implementers represented on the Working Group who have indicated their intention to produce complete implementations, and others who have developed prototype implementations of selected features for research purposes; Feedback from the users of these implementations via their respective vendors; The results of interoperability workshops held during XML conferences in Prague (February 2016) and London (June 2016).

As the change log indicates, there are no major changes in functionality since the previous Candidate Recommendation, but many clarifications of the detailed semantics, a few improvements to the syntax of certain constructs, and some addition or removal of restrictions and error cases.

In publishing a Candidate Recommendation, the Working Group invites interested parties to implement the specification and to submit feedback from their implementation experience, in the form of comments on the specification, reports of test results, or otherwise. The Working Group considers that the specification is now technically mature and therefore intends to proceed rapidly to the next stage in the process, namely Proposed Recommendation, after a short opportunity for external review. To demonstrate achievement of the criteria for transition to Proposed Recommendation the Working Group plans to provide evidence of two independent and substantially complete implementations of the basic XSLT processor conformance level as well as the optional streaming feature, and at least one substantially complete implementation of other optional features defined in 27 Conformance. The Working Group is also aware of a third implementation produced by a non-member company.

This specification has been developed in conjunction with [XPath 3.0] and other documents that underpin both XSLT and XQuery. XSLT 3.0 requires support for XPath 3.0 augmented by a selection of features from XPath 3.1 which are described in 21 Maps and 22 Processing JSON Data. XSLT 3.0 in addition allows a processor to support the whole of XPath 3.1, in which case it must do so as described in 27.7 XPath 3.1 Feature. In the event that future versions of XPath are defined beyond XPath 3.1, this specification allows XSLT 3.0 processors to provide support for such versions, but leaves it implementation-defined how this is done. References in this document to XPath and related specifications are by default to the 3.0 versions, but such references should be treated as version-agnostic unless the relevant prose indicates otherwise.

XSLT 3.0 specifies extensions to the XDM 3.0 data model, to the XPath 3.0 language syntax, and to the XPath 3.0 function library to underpin the introduction of maps, which were found necessary to support some XSLT streaming use cases, to enable XSLT to process JSON data, and to make many other processing tasks easier. This has involved extensive consultation with the XQuery Working Group (which has joint responsibility for XDM and XPath), and these extensions have been incorporated into XDM 3.1 and XPath 3.1. Although at the time of publication it appears likely that XPath 3.1 is a few weeks ahead of XSLT 3.0 in its progression to Recommendation status, XSLT 3.0 has not been made dependent on XPath 3.1, other than those features needed to meet the XSLT 3.0 requirements.

Changes since the previous Recommendation are listed in J Changes since XSLT 2.0. The only incompatibilities with XSLT 2.0 relate to the way in which certain error conditions are handled: the details are given in L Incompatibilities with XSLT 2.0.

The previous Candidate Recommendation designated certain features "at risk", because of concerns about feasibility of implementation. The Working Group has now satisfied itself that these features are implementable, so they remain in the specification and are no longer designated as being "at risk".

Please report errors in this document using W3C’s public Bugzilla system (instructions can be found at https://www.w3.org/XML/2005/04/qt-bugzilla). If access to that system is not feasible, you may send your comments to the W3C XSLT/XPath/XQuery public comments mailing list, public-qt-comments@w3.org. It will be very helpful if you include the string “[XSLT30]” in the subject line of your report, whether made in Bugzilla or in email. Please use multiple Bugzilla entries (or, if necessary, multiple email messages) if you have more than one comment to make. Archives of the comments and responses are available at https://lists.w3.org/Archives/Public/public-qt-comments/.

A public test suite for XSLT 3.0 has been developed (and at the time of publication continues to grow). The test suite currently contains over 14,500 tests specific to XSLT; in addition it provides the opportunity to run nearly 20,000 XPath tests in an XSLT environment. Implementers and others are encouraged to run these tests, to submit comments and contributions, and to report their results. W3C will maintain confidentiality and anonymity of submitted results if requested. Test results are useful even if they demonstrate only partial implementation, and the implementation under test does not need to be generally available to the public at the time of submission, or indeed later. The test suite is available at https://dvcs.w3.org/hg/xslt30-test/.

An implementation report detailing results of tests against this test suite will be published prior to transition to Proposed Recommendation.

Publication as a Candidate Recommendation does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Received on Tuesday, 7 February 2017 14:47:31 UTC