jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jocsch <joc...@freaquac.de>
Subject sibling and basic understanding of jsr 170
Date Mon, 13 Dec 2004 17:04:46 GMT

sorry for posting a more jcr related question than a jackrabbit one, but I'm 
not in the expert group ;-)

I have a problem finding a sibling related to a given Node. 
I set up a container node which has an undetermined number of children. The 
order of the children matters. So it looks like:


Now I have a use case where tst:child[99] is given and I need to show its 
preceding sibling tst:child[98].
I found no possibility to get this node other than iterating over all children 
(comparing to the given node and remembering the preceding node), because it 
seems that there is no getPosition() or something like that on the Node type.

I think this solution is far from optimal. Is there a better solution?
OK, I guess I can implement a kind of a linked list functionality into the 
child node types, but if possible, I want to avoid this.
I know that there are xpath functions like following-sibling but I read 
somewhere that xpath queries are not yet implemented in jackrabbit.


View raw message