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 05:32:06 GMT
Dan Diephouse wrote:
> 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 this:
>
> /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 app).
>
> - Dan
>
FYI, I tried both the above and using "parent::node()/@author..." and 
neither worked.

- Dan

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


Mime
View raw message