Chapter 7. Using and Understanding XPath

Chapter 4 explained how to construct match patterns, which you use with the match attribute of elements such as <xsl:template>. Those patterns are a subset of the full XPath language, and this chapter explores the full version of XPath.

XSLT actually has many more places to use XPath expressions than match patterns—you can use XPath expressions in the select attribute of the <xsl:apply-templates>, <xsl:value-of>, <xsl:for-each>, <xsl:param>, <xsl:variable>, <xsl:with-param>, <xsl:copy-of>, and <xsl:sort> elements, in attribute value templates, in the test attribute of <xsl:if> and <xsl:when> elements, ...

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.