jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hsp_ <piccina...@ibest.com.br>
Subject RE: Search question, with jcr:path.
Date Fri, 08 Aug 2008 01:11:46 GMT

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)[@jcr: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)[@jcr: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
Well, if it works, so, there is not problem anymore, I will try this out,
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.

View raw message