jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Polci <andrea.po...@exmachina.ch>
Subject XPath: multiple condition on child node
Date Mon, 07 Mar 2011 09:18:26 GMT
Actually I have a query similar to this one:
/jcr:root//element(*,exm:document)[exm:feature/@exm:prop1='value1' and
exm:feature/@exmp:prop2 = 'value2']

The problem is that a "exm:document" node can have multiple
"exm:feature" childs and the two conditions can match different
childs.

For example I don't want the query to match a document like this:

document/feature1/prop1='value1'
document/feature1/prop2='xxxx'
document/feature2/prop1='yyyy'
document/feature2/prop2='value2'

while I want to match this one:


document/feature1/prop1='value1'
document/feature1/prop2='value2'
document/feature2/prop1='xxxx'
document/feature2/prop2='yyyy'

Is there a way to obtain this?

Thanks,
Andrea Polci

Mime
View raw message