My understanding of PRECEDING is that it can choose from 'the set of all
elements and strings in the entire document which occur or begin before the
location source'. So in the example:
<A ID="A">
<B ID="B">
Bstring
</B>
<C ID="C">
Cstring
<D ID="D"/>
<E ID="E"/>
<F ID="F"/>
</C>
</A>
I'd be grateful to know if I've got these right:
ID(D)PREVIOUS(1) gives 'CString'
ID(D)PREVIOUS(2) fails
ID(F)PREVIOUS(-2) gives <D>
ID(D)PRECEDING(1) gives 'CString'
ID(D)PRECEDING(2) gives <C>...</C>
ID(D)PRECEDING(5) gives <A>...</A>
ID(D)PRECEDING(6) fails
ID(D)PRECEDING(ALL) gives <A> <B> Bstring </B> <C> Cstring
ID(D)PRECEDING(-2) gives <A> <B>
However I can't understand the section beginning 'thus designates the fifth
element', where it says:
"The location source must have at least as many elder siblings as the absolute
value of the instance number". By this criterion
ID(D)PRECEDING(2), (5) (6) and (-2)
all fail. I can't see how siblings are important in PRECEDING, since this
is what PREVIOUS is for.
Since FOLLOWING is not perfectly (anti)symmetrical I assume that (ALL) returns
elements which still occurr in document order rather than reversed.
P.
-- Peter Murray-Rust, domestic net connection Virtual School of Molecular Sciences http://www.vsms.nottingham.ac.uk/