Home >
Online Product Documentation >
Table of Contents >
Finding Nodes Relative to the Last Node in a Set
Finding Nodes Relative to the Last Node in a Set
To obtain nodes relative to the last node in the set, use the
position()
and
last()
functions with arithmetic. For example, the following queries both obtain the last
author
element in the current context:
The following queries both return the next-to-last
author
element:
For information about
position()
, see
Determining the Position Number of a Node. For information about
last()
, see
Determining the Context Size.