The XSL Selection Operators

When a query is performed in a database operation, the result is a set of objects that's a subset of the data in the database. In the XML/XSL world, this set will be a set of nodes. The simplest way to create a result set is to apply the selectNodes() method with a suitable input in the parentheses. As the name implies, the selectNodes() method will simply select out all of the nodes that satisfy the given criteria.

The selection operators are used to move to a specific level in the node tree. You've already used one of them, the forward slash (/). Used in isolation, as in the following, it takes you to the root node of the XML file:

       <xsl:template match="/">

It has also been used to separate node levels in the tree: ...

Get Sams Teach Yourself XML in 24 Hours 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.