Chapter 4. XPath Functions

In the last two chapters, you learned how to use XPath location paths to specify nodes and node sets in an XML source document.

In some cases, I used location paths for further processing by templates (xsl:template and xsl:apply-templates), or in test conditions (xsl:if and xsl:when). In both of these cases, there are times that you will not need or want to use all the data in the node set returned. With XPath functions, you can apply additional logic to these node sets to return only the data you need.

In other cases, I used location paths to extract the contents of a node using xsl:value-of. Remember, xsl:value-of outputs the string value of the first node in a node set. With XPath functions, you can perform one or more ...

Get XML: Visual QuickStart Guide, Second Edition now with O’Reilly online learning.

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