The following
axis selects all elements that occur after the
context node's closing tag.
Like preceding
, following
has no respect for hierarchy. The first time it encounters an element's start
tag or empty element tag, it counts that element.
For example, consider this XPath:
/descendant::BORN[position()=2]/following::*[position()=5]
This says go to Elodie Bellau's birthday, <BORN>11 Feb
1858</BORN>
, and then move forward five elements,
not counting any ancestor elements. This lands on
John P. Muller's SPOUSE
element
after passing through Elodie Bellau's DIED
element, Elodie Bellau's SPOUSE
element,
John P. Muller's PERSON
element, and
John P. Muller's NAME
element,
in this order.
There's no abbreviation for the following
axis.