jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <dan.diepho...@mulesource.com>
Subject Re: Complex Queries
Date Sat, 22 Dec 2007 03:24:45 GMT
Marcel Reutegger wrote:
> Dan Diephouse wrote:
>> I don't see how it's possible to create an SQL syntax where you test 
>> for properties both on the node you're selecting and on it's child 
>> though. Can anyone enlighten me?
> that's not possible using SQL. JSR 170 does not specify how properties 
> of a child node can be used in a predicate. you have to write a XPath 
> statement:
> blog[@author = 'Dan Diephouse' or entry/@title = 'Jackrabbit']
> regards
>  marcel
Cool, thanks Marcel.

Going to throw a wrench in the mix.  Is it possible to do something like 

/blog/entry[@title='Jackrabbit' or ../@author='Dan Diephouse']

As I apply this to may app I'm realizing its not actually the "blog" 
node I want to select, its the "entry" node. (This is a contrived 
example, I swear there is an actual non contrived usage for this in  my 

- Dan

Dan Diephouse
http://mulesource.com | http://netzooid.com/blog

View raw message