XSLT 2.0 depends on a number of other specifications that have progressed to Recommendation status at the same time: see [XPath 2.0], [Data Model], [Functions and Operators], and [XSLT and XQuery Serialization].
These subsidiary documents are also referenced in the specification of XQuery 1.0.
General public discussion of XSLT takes place on the XSL-List forum.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy.
XSLT 2.0 is designed to be used in conjunction with XPath 2.0, which is defined in [XPath 2.0].
XSLT shares the same data model as XPath 2.0, which is defined in [Data Model], and it uses the library of functions and operators defined in [Functions and Operators].
XSLT 2.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].
This document contains hyperlinks to specific sections or definitions within other documents in this family of specifications.
Archives of the comments and responses are available at A transformation expressed in XSLT describes rules for transforming zero or more source trees into one or more result trees.The structure of these trees is described in [Data Model].These links are indicated visually by a superscript identifying the target specification: for example XP for XPath, DM for the XDM data model, FO for Functions and Operators.This section describes the status of this document at the time of its publication. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at
Archives of the comments and responses are available at
A transformation expressed in XSLT describes rules for transforming zero or more source trees into one or more result trees.
The structure of these trees is described in [Data Model].
These links are indicated visually by a superscript identifying the target specification: for example XP for XPath, DM for the XDM data model, FO for Functions and Operators.
This section describes the status of this document at the time of its publication. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at
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. 2 Concepts 2.1 Terminology 2.2 Notation 2.3 Initiating a Transformation 2.4 Executing a Transformation 2.5 The Evaluation Context 2.6 Parsing and Serialization 2.7 Extensibility 2.8 Stylesheets and XML Schemas 2.9 Error Handling 3 Stylesheet Structure 3.1 XSLT Namespace 3.2 Reserved Namespaces 3.3 Extension Attributes 3.4 XSLT Media Type 3.5 Standard Attributes 3.6 Stylesheet Element 3.6.1 The default-collation attribute 3.6.2 User-defined Data Elements 3.7 Simplified Stylesheet Modules 3.8 Backwards-Compatible Processing 3.9 Forwards-Compatible Processing 3.10 Combining Stylesheet Modules 3.10.1 Locating Stylesheet Modules 3.10.2 Stylesheet Inclusion 3.10.3 Stylesheet Import 3.11 Embedded Stylesheet Modules 3.12 Conditional Element Inclusion 3.13 Built-in Types 3.14 Importing Schema Components 4 Data Model 4.1 XML Versions 4.2 Stripping Whitespace from the Stylesheet 4.3 Stripping Type Annotations from a Source Tree 4.4 Stripping Whitespace from a Source Tree 4.5 Attribute Types and DTD Validation 4.6 Limits 4.7 Disable Output Escaping 5 Features of the XSLT Language 5.1 Qualified Names 5.2 Unprefixed QNames in Expressions and Patterns 5.3 Expressions 5.4 The Static and Dynamic Context 5.4.1 Initializing the Static Context 5.4.2 Additional Static Context Components used by XSLT 5.4.3 Initializing the Dynamic Context 22.214.171.124 Maintaining Position: the Focus 126.96.36.199 Other components of the XPath Dynamic Context 5.4.4 Additional Dynamic Context Components used by XSLT 5.5 Patterns 5.5.1 Examples of Patterns 5.5.2 Syntax of Patterns 5.5.3 The Meaning of a Pattern 5.5.4 Errors in Patterns 5.6 Attribute Value Templates 5.7 Sequence Constructors 5.7.1 Constructing Complex Content 5.7.2 Constructing Simple Content 5.7.3 Namespace Fixup 5.8 URI References 6 Template Rules 6.1 Defining Templates 6.2 Defining Template Rules 6.3 Applying Template Rules 6.4 Conflict Resolution for Template Rules 6.5 Modes 6.6 Built-in Template Rules 6.7 Overriding Template Rules 7 Repetition 8 Conditional Processing 8.1 Conditional Processing with xsl:if 8.2 Conditional Processing with xsl:choose 9 Variables and Parameters 9.1 Variables 9.2 Parameters 9.3 Values of Variables and Parameters 9.4 Creating implicit document nodes 9.5 Global Variables and Parameters 9.6 Local Variables and Parameters 9.7 Scope of Variables 9.8 Circular Definitions 10 Callable Components 10.1 Named Templates 10.1.1 Passing Parameters to Templates 10.1.2 Tunnel Parameters 10.2 Named Attribute Sets 10.3 Stylesheet Functions 11 Creating Nodes and Sequences 11.1 Literal Result Elements 11.1.1 Setting the Type Annotation for Literal Result Elements 11.1.2 Attribute Nodes for Literal Result Elements 11.1.3 Namespace Nodes for Literal Result Elements 11.1.4 Namespace Aliasing 11.2 Creating Element Nodes Using xsl:element 11.2.1 Setting the Type Annotation for a Constructed Element Node 11.3 Creating Attribute Nodes Using xsl:attribute 11.3.1 Setting the Type Annotation for a Constructed Attribute Node 11.4 Creating Text Nodes 11.4.1 Literal Text Nodes 11.4.2 Creating Text Nodes Using xsl:text 11.4.3 Generating Text with xsl:value-of 11.5 Creating Document Nodes 11.6 Creating Processing Instructions 11.7 Creating Namespace Nodes 11.8 Creating Comments 11.9 Copying Nodes 11.9.1 Shallow Copy 11.9.2 Deep Copy 11.10 Constructing Sequences 12 Numbering 12.1 Formatting a Supplied Number 12.2 Numbering based on Position in a Document 12.3 Number to String Conversion Attributes 13 Sorting 13.1 The xsl:sort Element 13.1.1 The Sorting Process 13.1.2 Comparing Sort Key Values 13.1.3 Sorting Using Collations 13.2 Creating a Sorted Sequence 13.3 Processing a Sequence in Sorted Order 14 Grouping 14.1 The Current Group 14.2 The Current Grouping Key 14.3 The xsl:for-each-group Element 14.4 Examples of Grouping 15 Regular Expressions 15.1 The xsl:analyze-string instruction 15.2 Captured Substrings 15.3 Examples of Regular Expression Matching 16 Additional Functions 16.1 Multiple Source Documents 16.2 Reading Text Files 16.3 Keys 16.3.1 The xsl:key Declaration 16.3.2 The key Function 16.4 Number Formatting 16.4.1 Defining a Decimal Format 16.4.2 Processing the Picture String 16.4.3 Analysing the Picture String 16.4.4 Formatting the Number 16.5 Formatting Dates and Times 16.5.1 The Picture String 16.5.2 The Language, Calendar, and Country Arguments 16.5.3 Examples of Date and Time Formatting 16.6 Miscellaneous Additional Functions 16.6.1 current 16.6.2 unparsed-entity-uri 16.6.3 unparsed-entity-public-id 16.6.4 generate-id 16.6.5 system-property 17 Messages 18 Extensibility and Fallback 18.1 Extension Functions 18.1.1 Testing Availability of Functions 18.1.2 Calling Extension Functions 18.1.3 External Objects 18.1.4 Testing Availability of Types 18.2 Extension Instructions 18.2.1 Designating an Extension Namespace 18.2.2 Testing Availability of Instructions 18.2.3 Fallback 19 Final Result Trees 19.1 Creating Final Result Trees 19.2 Validation 19.2.1 Validating Constructed Elements and Attributes 188.8.131.52 Validation using the [xsl:]validation Attribute 184.108.40.206 Validation using the [xsl:]type Attribute 220.127.116.11 The Validation Process 19.2.2 Validating Document Nodes 20 Serialization 20.1 Character Maps 20.2 Disabling Output Escaping 21 Conformance 21.1 Basic XSLT Processor 21.2 Schema-Aware XSLT Processor 21.3 Serialization Feature 21.4 Backwards Compatibility Feature A References A.1 Normative References A.2 Other References B The XSLT Media Type B.1 Registration of MIME Media Type application/xslt xml B.2 Fragment Identifiers C Glossary (Non-Normative) D Element Syntax Summary (Non-Normative) E Summary of Error Conditions (Non-Normative) F Checklist of Implementation-Defined Features (Non-Normative) G Schema for XSLT Stylesheets (Non-Normative) H Acknowledgements (Non-Normative) I Checklist of Requirements (Non-Normative) J Changes from XSLT 1.0 (Non-Normative) J.1 Incompatible Changes J.1.1 Tree construction: whitespace stripping J.1.2 Changes in Serialization Behavior J.1.3 Backwards Compatibility Behavior J.1.4 Incompatibility in the Absence of a Schema J.1.5 Compatibility in the Presence of a Schema J.1.6 XPath 2.0 Backwards Compatibility J.2 New Functionality J.2.1 Pervasive changes J.2.2 Major Features J.2.3 Minor Changes J.2.4 Changes since Proposed Recommendation (see 3.1 XSLT Namespace), which is referred to in this specification as the XSLT namespace.