Summary

Although our stylesheets here are trivial, they are much simpler than the corresponding procedural code (written in Visual Basic, C++, Java, etc.) to transform any <greeting> elements similarly. We’ve gone over the basics of what stylesheets are and how they work.

As we go through this book, we’ll demonstrate the incredible range of things you can do in XSLT stylesheets, including:

  • Using logic, branching, and control statements

  • Sorting and grouping elements

  • Linking and cross-referencing elements

  • Creating master documents that embed other XML documents, then sort, filter, group, and format the combined documents.

  • Adding new functions to the XSLT stylesheet processor with XSLT’s extension mechanism

XSLT has an extremely active user community. To see just how active, visit the XSL-List site at http://www.mulberrytech.com/xsl/xsl-list/index.html.

Before we dive in to those topics, we need to talk about XPath, the syntax that describes what parts of an XML document we want to transform into all of these different things.

Get XSLT, 2nd Edition 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.