Chapter 5. Making Choices and Sorting Data

This chapter is all about making choices, sorting, and handling the data in XML documents in various ways. Here, you’ll see the <xsl:if>, <xsl:choose>, <xsl:when>, <xsl:otherwise>, <xsl:for-each>, and <xsl:sort> elements. You can use these elements to handle your data, making choices on how transformations should proceed depending on the value of that data.

However, these elements don’t offer anything like the precision that a programming language does. For that reason, I also introduce XSLT extensions in this chapter, including the XSLT 1.1 working draft <xsl:script> element. This element was intended ...

Get Inside XSLT 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.