cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anjul Srivastava" <an...@anjul.com>
Subject esql Transitive closure (recursive queries) cocoon2
Date Mon, 19 Mar 2001 23:25:53 GMT
1. Is there any elegant way to construct an XML document built from recursive queries using
esql? (see example (5.))
2. Are there any plans to support such functionality in esql?
3. Is it possible to support such functionality in cocoon? I can't see any straightforward
way. Ideally one would want to use the "template" mechanism of stylesheets to do the recursion
for me.
4. How about cocoon2? Does it alleviate this problem or make it more difficult?
5. Example:

Table:

items (child int, parent int)
1 0
2 1
3 1
4 2
5 2
6 3
7 3
8 4
9 4

Desired XML output:

<item>
 1
  <item>
   2
    <item>
     4
      <item>
       8
      </item>
      <item>
       9
      </item>
    </item>
    <item>
     5
    </item>
  </item>
  <item>
   3
    <item>
     6
    </item>
    <item>
     7
    </item>
  <item>
</item>

Best regards,
Anjul.

Mime
View raw message