Chapter 5

XPath Espresso

In This Chapter

bullet Understanding XPath’s role in XSLT

bullet Creating XPath location steps

bullet Defining node relationships with axes

bullet Matching nodes with node tests

bullet Filtering node sets with predicates

bullet Creating absolute location steps

M y guess is that XPath is the espresso drinker of the X-Team. It’s the high-energy workman that tirelessly treads through XML documents all hours of the day and night looking for those pesky nodes. Geez, with all that effort, it needs a good shot of espresso just to keep going!

Besides, XPath has another tie-in with coffee: Creating XPath expressions reminds me of ordering a drink at Starbucks. XPath is the one X-Teamer built from the ground up to decipher confusing instructions like: “I’d like a venti, triple shot, wet cappuccino with nonfat milk and a dash of cinnamon.” This process of taking a specific request and going in and returning ...

Get XSLT for Dummies 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.