jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Combined attribute test on childnode for xpath query
Date Tue, 10 Jul 2007 12:08:54 GMT
Christoph Kiehl wrote:
> I'm not a master of XPath at all, so may someone can tell me if the 
> following is possible with Jackrabbit, and if yes, how.
> I need to execute a query like this:
> //element(*, nt:foo)[test/*[@foo='a' and @bar='b']]

I guess you rather mean:

//element(*, nt:foo)[test[@foo='a' and @bar='b']]

but in any case, this is currently not possible in jackrabbit.

> This means I need all nodes of type "nt:foo" which have "foo=a" and 
> "bar=b" on _one_ specific childnode. If I write it like that
> //element(*, nt:foo)[test/@foo='a' and test/@bar='b']

that's kind of the workaround for the above mentioned limitation.

> it seems like the condition is matched if for example "test[1]/@foo='a' 
> and test[2]/@bar='b'" is true.


looks like another argument for Davids DM Rule #4.


View raw message