jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Edelson <justinedel...@gmail.com>
Subject Re: XPath query with path constraint and same name siblings
Date Wed, 17 Mar 2010 00:21:15 GMT
If you have the provider node, why not just follow the node graph from
there? Something just seems wrong about taking a node and using getPath() to
construct a (relatively trivial) query.


On Tue, Mar 16, 2010 at 7:56 AM, Gadbury <gadbury@googlemail.com> wrote:

> Hi Alex.  Thanks for your reply.
> I first get a given provider node by node uuid.  So, it isn't always the
> first provider (but the problem lies with the returned path of the first
> provider node (or any first SNS node) ).
> Once I have the node I use providerNode.getPath() to help construct the
> XPath query's path constraint.  The trouble is that the path of the first
> same name sibling is ../provider and not ../provider[1].
> I have put in a piece of code that appends "[1]" to the path constraint if
> pathNode.getIndex() == 1, but this seems nasty.  Shouldn't getPath() for
> the
> first provider return ../provider[1] and not ../provider ? Is this a bug?
> Thanks again.  Kind regards,
> James
> --
> View this message in context:
> http://n4.nabble.com/XPath-query-with-path-constraint-and-same-name-siblings-tp1594661p1594761.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message