Why don't you use the SQL Transformer combined with the FilterTransformer?
It might be easier?

-----Message d'origine-----
De : Otmar Vobejda [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 5 novembre 2003 10:47
A : [EMAIL PROTECTED]
Objet : Recursive reading from database


Hi, i'm a beginner in the Cocoon domain and first problem, what I'd like
to solve, is recursive reading from database. For example you have a
table test(id int, parent int, name varchar), where parent attribute
points to id attribute of parent rows and you need to read all the rows
to the tree.

for example something like this (excuse the syntax :):

// recursive function
public void readData (int parent) {
  select id, name from test where parent= $parent;
  for each result {
      print ($name);
      readData($id);
  }

// start recursion:
readData(null);

But how to write in XSP, when methods need to be in root <xsp:page>
element and esql tags must be inside top user element (or how it is
termed).

Thank a lot for each your outline!

osup



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to