Ard Schrijvers-3 wrote:
> 
> 
>> 
>> I need to search some nodes that are of an specific type, but 
>> not of specific another type nor its descendent.
>> 
>> something like //(*,y)[EMAIL PROTECTED]:primaryType != 'x']
>> 
>> So, the @jcr:primaryType!='x' would not resolve because only 
>> the nodes of type 'x' would be filtered.
>> Would this be resolved by an xpath expression, or I will 
>> filter after by the application?
>> I thought in get all the type descendants of x and put in the 
>> filter, but if another elegant solution exists...
> 
> Not sure if I get it all right but shouldn't your query look like:
> 
> //element(*,y)[EMAIL PROTECTED]:primaryType!='x']
> 
> Now, all nodes of type y would be selected but not of x or any of x's
> descendants (this nodetype is expanded automatically to all descendant
> nodetypes during the query)
> 
> Not sure if you want this though,
> 
> Regards Ard
> 
> 
> 
I was not sure that filtering by @jcr:primaryType it was filtering the
descendents of it too. I thought that only the specific type would be
filtered.
Well, if it works, so, there is not problem anymore, I will try this out,
thanks.
Another question, what is the difference between an expression search with
and without "element" if I do not need specify a path?
-- 
View this message in context: 
http://www.nabble.com/Search-question%2C-with-xpath.-tp18879386p18883098.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Reply via email to