Context item expressions
A context item expression
consists of a single period character (.). A context item expression
evaluates to the item that is currently being processed, which is
known as the context item.
The
context item can be either a node or an atomic value. Context items
are defined only in path expressions and predicate expressions.
Example
The following example contains a
context item expression that invokes the modulus operator on every
item in the sequence that is returned by the range expression 1
to 100
:
(1 to 100)[. mod 5 eq 0]
The result of this example is the sequence of integers between 1 and 100 that are evenly divisible by 5.