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 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.