XML-LINK implementation
Peter Murray-Rust
Peter at ursus.demon.co.uk
Fri Apr 11 22:56:58 BST 1997
I'm having difficulty understanding the XML-LINK spec section about
PRECEDING (and implicitly FOLLOWING). I'd be grateful for guidance from
those who are TEI experts.
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/
xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list