Here's where an XPath goes within our expression (in case you've forgotten!):
In the following example, we're using the XSL "value-of" element to select a node. The "select" attribute of this element specifies an XPath expression. In the expression,
[@status = 'active'] is the predicate. In this case, the predicate is being used to narrow the selection down to only those records that have their "status" attribute set to "active":
Predicate Expression Types
An XPath predicate allows you to write very specific rules about the nodes you'd like to select when constructing your expressions. There are different types of expressions that you can use in your predicates. Here are the types of expressions you can use with your predicates:
- Node Set
- Result tree fragment
Let's have a closer look at these expression types.