XSL Transformations

XSL is most often used in its transformational aspect (XSLT) to transform XML documents into HTML or into other XML documents. XSL and CSS can also work together by using XSLT to customize an XML document, then applying CSS to style it. You can also use XSL to transform an XML document into an SVG document.

XSL works by using templates. A template in XSL is a set of formatting or transforming rules (called a pattern), which you create and define. XSL then matches each template to its corresponding element tag in the XML source document. When a match is found, XSL transforms, or changes, the element tag in the source document to the result tag.

The structure of the XSL style sheet as it relates to the XML document is something ...

Get SVG for Web Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.