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

Get Special Edition Using XSLT 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.