CR: XSL Transformations (XSLT) Version 3.0

XSL Transformations (XSLT) Version 3.0

http://www.w3.org/TR/2015/CR-xslt-30-20151119/

feedback due by: 2016-03-31

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 http://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, which is part of the XML Activity. Comments on this document will be formally accepted until 31 March 2016. The Working Group expects to advance this specification first to Proposed Recommendation and then to Recommendation status.

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 intends to proceed to the next stage in the process, namely Proposed Recommendation, as soon as sufficient implementation experience has been generated. This will include evidence of at least 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.

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.

This document 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 have been 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 the current drafts of XDM 3.1 and XPath 3.1.

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 second Last Call Working Draft was published on 2 October 2014. Some 147 formal comments were received and most of these resulted in changes to the specification. The changes are listed at K Changes since the Last Call Working Draft of 2 October 2014. The change-marked version of this publication links each entry in the change list to the specific places in the text that changed as a result. Some of the changes are substantive. Many are concerned with the detailed rules for streamability of stylesheets. Most of the changes result from practical experience in implementing product features and writing test cases; some of them result from user experience with early implementations.


Note:

At a late stage during the development of this specification, the W3C Internationalization Working Group (I18N) requested that the XSLT WG consider closer alignment of some of the language features (for sorting strings and for formatting numbers and dates) with various external specifications. The XSLT WG declined to make any substantial changes in this area on the grounds that the work fell outside the agreed charter and requirements for XSLT 3.0; that the WG lacked resources; and that such changes would result in significant delays. The Internationalization Working Group accepted this decision but requested that it be highlighted for the attention of W3C reviewers.

Certain features in this specification are designated "at risk". These features may be removed from the specification before advancing to Proposed Recommendation status if feedback on these features from implementers or users is negative. These features are:Streamable stylesheet functions: see 19.8.5 Classifying Stylesheet Functions. Streamability of the xsl:for-each-group instruction. The requirement for every processor to report any departure from guaranteed streamability, even in cases where the processor is able to use streaming anyway. Note: It is important for interoperability that users should have access to tools that assess a stylesheet against the rules for guaranteed streamability; but it is not clear that every conformant processor needs to include such tools.

Please report errors in this document using W3C’s public Bugzilla system (instructions can be found at http://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 http://lists.w3.org/Archives/Public/public-qt-comments/.

A public test suite for XSLT 3.0 is under continuous development. The test suite currently contains nearly 11,000 tests, of which over half depend on new XSLT 3.0 features. 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/.

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 Thursday, 19 November 2015 14:29:33 UTC