On 14.Feb.2002 -- 03:36 PM, Olivier Rossel wrote: > I read the archives of the mailing-list about ESQL and nested queries. > I read an interesting thing about "ancestor" in the declaration of inner > requests. > But I can find no documentation at all, about that point. > > Anyone has a link? > Any docs has been updated in addition to the page available at: > http://xml.apache.org/cocoon/userdocs/xsp/esql.html ? > > My problem is to have something like: > > <query1> select foobar, foo, bar from table1; > for each foobar: { > <query2> select * from table2 where field1=<current-value-of foobar>; > for each barfoo (selected by the previous query, inside the '*'): { > <query3> select * from table3 where field1=<current-value-of barfoo; > } <esql:get-columns ancestor="1"/> <esql:get-columns/> <esql:get-columns ancestor="2"/> > } > > I do not plan to use a single complicated SQL request in order to have a > flat XML > output.
Have a look at the esql docs and look at the grouping example. It might suit your needs. The ancestor feature is very simple: add the attribute "ancestor" with the count of queries to any esql:get... element. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>