The following Axis

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 tag, it counts that element. For example, consider this rule:

/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. This lands on John P. Muller's NAME element, <NAME>John P. Muller</NAME>, after passing through Elodie Bellau's DIED element, Elodie Bellau's SPOUSE element, Elodie Bellau's PERSON element, and John P. Muller's PERSON element, in this order. There's no abbreviation for the following axis.


Previous | Next | Top | Cafe con Leche

Copyright 1999, 2000 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified February 1, 2000