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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.