jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dean Jones" <dean.m.jo...@gmail.com>
Subject Behaviour of Node.getPath()
Date Wed, 12 Mar 2008 12:40:09 GMT

I have a question regarding the value returned by Node.getPath().
Where an ancestor of a node has a same-name sibling, the path includes
the appropriate index using the XPath square-bracket notation, except
when the ancestor node has an index of 1, in which case it is omitted.
My problem is that I want to create a path which I can later use as
part of an XPath query, and this omission causes problems (the XPath
expressions "parent/child" and "parent/child[1]" are obviously
different where 'parent' has multiple children called 'child'). I've
implemented a trivial workaround to just generate the path myself, but
I thought I'd check whether this was the intended behaviour.

Best wishes,


View raw message