Glossary · 3 · Publishing SDKs and structured content
XSLT
Also known as: XSL Transformations, Extensible Stylesheet Language Transformations
In XML processing, XSLT (XSL Transformations) is a W3C language for transforming XML documents into other XML documents, HTML, text or other formats, using stylesheets of template rules that match parts of the source with XPath patterns and construct the result.
- Publishing SDKs
- Standards
In one sentence
XSLT is the W3C template-rule language for transforming XML into XML, HTML or text; it is the core transformation technology of DITA-OT.
Example
An XSLT stylesheet turns each DITA `task` topic into an HTML page with numbered steps and moves every hazard statement to the top of the page.
How it applies
- Publishing SDKs: XSLT is the core transformation technology of XML publishing toolkits. DITA Open Toolkit uses Ant, XSLT and Java; its processing modules are written in Java or XSLT, and virtually all of them can be extended by plug-ins that add or override XSLT templates. HTML, help formats and the XSL-FO for PDF are all produced by stylesheets.
- How it works: A stylesheet consists of template rules. The processor walks the source tree, finds the template whose XPath pattern matches each node and writes the result the template constructs. Imports and priorities let a customization override only the templates it needs.
- Validation: Schematron schemas are commonly compiled to XSLT and run like any other stylesheet.
- Developer and platform SDKs: XSLT converts between XML formats in integrations, for example between an export format and an import format, and generates code or documentation from XML interface descriptions.
- Documentation and maintenance: Stylesheets encode publishing decisions (what appears where, in which order, under which conditions). Comments, tests on sample content and version control keep them understandable; an unnoticed template change can alter every output.
Versions
XSLT 1.0 became a W3C Recommendation on November 16, 1999, together with XPath 1.0, and is still the version built into many libraries and browsers. XSLT 2.0 (January 23, 2007) added XPath 2.0, grouping and multiple outputs. XSLT 3.0 (June 8, 2017) added streaming, so that large documents can be transformed without being held in memory, as well as packages and support for maps and JSON. As of October 11, 2026, 3.0 is the latest W3C Recommendation; the QT4 Community Group is drafting XSLT 4.0, which is not a Recommendation. A stylesheet declares the version it needs, and the processor must support it.
XSLT vs. general-purpose code
Transformations can also be written in a general-purpose language. XSLT is declarative and rule-based: it suits documents whose structure varies, because each element is handled by a matching rule wherever it occurs. Procedural code suits data with a fixed structure and logic that depends little on document structure.