Hello Dan, > > I'm struggling a little bit to understand how to do a more > complex query. Let say I have a model like this: > > /blog > /blog/name = "Dan's Blog" > /blog/author = "Dan Diephouse" > /blog/entry > /blog/entry/title = "Jackrabbit" > /blog/entry/content .... > > I want to do a query where I select the blog node where > /entry/title = "Jackrabbit" OR /blog/author = "Dan Diephouse" > > In my own perverted SQL syntax: select /blog where author = > "Dan Diephouse" or entry/title = "Jackrabbit"
I haven't done much with SQL syntax (XPATH normally) but I think this one doesn't look right. Take a look at SimpleQueryTest in o.a.j.core.query. There are a lot of sql examples there that should get you started. Reading '8.5.1 The SQL Language' from jsr-170 might also help you understand the syntax (about 10 pages only) Regards ARd > > 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? > > Thanks, > - Dan > > -- > Dan Diephouse > MuleSource > http://mulesource.com | http://netzooid.com/blog > >
