jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amir Mistric" <amist...@nemours.org>
Subject XPath difference in queries
Date Tue, 19 Jun 2007 00:46:37 GMT
Hi

I am a bit new to Xpath in Jackrabbit but can someone tell me what is the difference between
these 3 queries:

Q1: //*[@jcr:primaryType='mgnl:content']//*[jcr:contains(.,'term1') and jcr:contains(., 'term2')]

Q2: //*[@jcr:primaryType='mgnl:content' and jcr:contains(.,'term1') and jcr:contains(.,'term2')]

Q3: //element(*,nt:base)[@jcr:primaryType='mgnl:content' and jcr:contains(.,'term1') and jcr:contains(.,'term2')]


Basically all I want is to extract all the nodes of primary type "mgnl:content" and then to
search them for the query terms which are ANDed.


Any help is appreciated

Regards
Amir
Mime
View raw message