jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pankaj Gupta ...@fluent.com>
Subject Search multiple child properties
Date Tue, 28 Oct 2008 13:58:48 GMT

Hi,

Suppose I have two types defined: A and B. A can have any number of children
of type B. The properties of A are: foo and that of B are: bar and baz. Now
I want to search for all nodes of type A where foo = "x" and that have an
instance of B with bar="y" and baz="z". If I create the XPath predicate as
follows:

(@foo="x" and */@bar="y" and */@baz="z") 

I think this will return all instances of A that have foo="x" and atleast
one instance of B with bar="y" and perhaps another instance of B with
baz="z"

What I would like to do is something like:
(@foo="x" and */(@bar="y" and @baz="z"))

Can this be done using XPath or do I have to run separate searches for bar
and baz properties and then combine the search results programmatically.

Thanks,
Pankaj
-- 
View this message in context: http://www.nabble.com/Search-multiple-child-properties-tp20207736p20207736.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message