Amir Mistric wrote:
Q1: //[EMAIL PROTECTED]:primaryType='mgnl:content']//*[jcr:contains(.,'term1') 
and jcr:contains(., 'term2')]

returns all node that contain 'term1' and 'term2' in one of its properties and are a descendant of a node with primary type mgnl:content.

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

returns all node with a primary type mgnl:content that contain 'term1' and 'term2' in one of its properties

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

same as Q2

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.

that's:

//[EMAIL PROTECTED]:primaryType = 'mgnl:content' and jcr:contains(., 'term1 
term2')]

or if you are also interested in nodes, which are sub types of mgnl:content:

//element(*, mgnl:content)[jcr:contains(., 'term1 term2')]

regards
 marcel

Reply via email to