1.4. XSLT Stylesheet Concepts

XSLT stylesheets are best understood according to their structure and the named elements within them. It has always been a hallmark of markup languages that there be a diligent attempt at human-readability for the element-type names and, where possible, other components. With XSLT, this has been fairly well achieved, making it easier to learn and understand XSLT stylesheets.

Let's compare the XML tree structure of a book with that of an XSLT stylesheet, shown side-by-side in Figure 1-3.

Figure 1-3. Comparing XML trees to XSLT trees.

If we rendered the XSLT side of this diagram as a stylesheet, it would look like

Get XSLT and XPATH: A Guide to XML Transformations 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.