Predicates occur after the node test in square brackets. A wide range of expressions are possible.
Most node tests return nodes in document order, only the tests which select ancestor or preceding elements return nodes in reverse document order. The practical result of this is that the "first" node is almost always the one closest to the context node, although parenthesis can change the effective order.
Matches the last node
Matches even nodes
Matches the element(s) with id attributes whos value is "foo"
Matches elements that don't have an id attribute
Match <author> elements that have <firstname> children with the content "Norman".
Match "Norman" without regard to leading and trailing space.
Predicate expressions can be more-or-less arbitrarily complex.