XML-LINK implementation

James Clark jjc at jclark.com
Sat Apr 12 05:44:38 BST 1997


At 21:31 11/04/97 GMT, Peter Murray-Rust wrote:

>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>

One might think so, but since C has mixed content and no white-space in
mixed content is automatically ignored, the white-space following the D and
E elements will be data and hence constitute pseudo-elements.  Thus
ID(F)PREVIOUS(-2) will actually designate E.

James


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