1.3. What Is XPath?

XSLT is rarely discussed without a reference to XPath.[3] XPath is a separate recommendation from the W3C that uses a simple path language to address parts of an XML document. Although XPath is used by other W3C recommendations, there is hardly a use for XSLT that does not involve XPath. Generally speaking, XSLT provides a series of operations and manipulators, while XPath provides precision of selection and addressing.

[3] Both XSLT and XPath became full recommendations on the same day, November 16, 1999.

1.3.1. The XSLT Stylesheet

This structured hierarchy of elements for the book in Figure 1-1 is a useful way to begin to understand how XSLT stylesheets work. Figure 1-2 represents the same tree structure, only here it reflects ...

Get XSLT and XPATH: A Guide to XML Transformations 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.