What is XSLT 2.0?
XSLT 2.0 is the second major version of the XSL Transformations language, published by the W3C in 2007. It dramatically extends XSLT 1.0 with powerful grouping capabilities, regular expression support, XPath 2.0's richer type system, and the ability to generate multiple output documents from a single transformation.
XSLT 2.0 is widely used in enterprise data integration, document publishing, and ETL pipelines. XSLT Playground's Saxon HE backend is the reference implementation of XSLT 2.0 — results match production exactly, making it ideal for development and debugging.
Key Features of XSLT 2.0
Grouping with xsl:for-each-group
Group nodes by value, adjacency, or pattern. Replaces complex Muenchian grouping from XSLT 1.0 with clean, readable syntax.
Regular Expressions
Use matches(), replace(), and tokenize() for powerful string processing with regex patterns.
Multiple Output Documents
xsl:result-document lets a single stylesheet generate multiple output files in one transformation pass.
XPath 2.0 & Types
Full XPath 2.0 with sequences, types (xs:date, xs:integer…), and functions like distinct-values().
User-Defined Functions
xsl:function lets you define reusable functions with typed parameters and return values.
Schema-Aware Processing
Validate input against XSD schemas and use type annotations to write more robust transformations.
How to Test XSLT 2.0 Online
- Click Open XSLT 2.0 Editor to launch the tool with XSLT 2.0 pre-selected.
- Paste your XSLT 2.0 stylesheet in the editor panel.
- Add your XML input document in the Data Pipeline section.
- Results appear automatically in the output panel.
- Use the trace feature to debug variable values and template matching.
XSLT 2.0 vs XSLT 1.0 — Key Differences
- Grouping: XSLT 1.0 requires Muenchian grouping (keys + generate-id tricks). XSLT 2.0 has
xsl:for-each-group. - Strings: XSLT 1.0 has basic string functions. XSLT 2.0 adds regex,
tokenize(),normalize-unicode(). - Types: XSLT 1.0 works with node-sets. XSLT 2.0 uses XPath 2.0 sequences and the XML Schema type system.
- Multiple outputs: XSLT 1.0 produces one output. XSLT 2.0 can produce many with
xsl:result-document. - Date/time: XSLT 2.0 has built-in date, time and duration types with arithmetic support.
Frequently Asked Questions
- What features does XSLT 2.0 add over XSLT 1.0?
- XSLT 2.0 introduces
xsl:for-each-groupfor grouping, regular expression functions, multiple output documents withxsl:result-document, XPath 2.0 with sequences and types, user-defined functions, and richer string handling. - Is there a free online XSLT 2.0 tester?
- Yes. XSLT Playground offers a completely free online XSLT 2.0 tester powered by Saxon HE 12.5. No installation or account required.
- Can I test xsl:for-each-group online?
- Yes. XSLT Playground fully supports
xsl:for-each-groupwithgroup-by,group-adjacent,group-starting-with, andgroup-ending-with. - Does XSLT 2.0 work in all browsers?
- No. Browsers only support XSLT 1.0 natively. XSLT 2.0 requires a processor like Saxon. XSLT Playground runs Saxon on the server so you can test XSLT 2.0 stylesheets without installing anything.
Also Available
Looking for XSLT 3.0 with maps, arrays and higher-order functions? Try the XSLT 3.0 Online Tester →