XPath in XSL and XSLT
As you saw in Chapter 2, “XSL Jumpstart,” XPath is used in two slightly different ways, matching and selecting. They’re both similar in operation, with a slightly different bias. A match is used when a part of the document is being considered and appropriate rules for dealing with subparts must be chosen. For example, if a document contains a collection of <customer> and <order> elements, you might specify one rule that matches <customer> and another that matches <order>.
The important thing about matching is that multiple XPath expressions can be competing for that match. For example, usually, many XSLT templates must be considered by the engine when <xsl:apply-templates> is being processed, and occasionally more than ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access