ESQL elements don't have to be inside the top user element, at least in...
Yes, it is maybe possible, that it can be outside the top user element, but if ESQL elements are generating some XML output, the top element of this output is taken as top user element and that's not good. If I want to use it recursively, it will generate uncorrect data. What i want to generate, can be something like this:
<elements>
<element>blabla</element>
<element>- bleble</element>
<element>- - blibli</element>
<element>- blublu</element>
<element>blabla2</element>
</elements>And what to do now... ? :)
thanx
osup
Christopher Painter-Wakefield wrote:
ESQL elements don't have to be inside the top user element, at least in C2.0. We use ESQL in user-defined functions all the time. This wasn't the case in C1, as it used local variables in the generate() method, but now all its variables are declared at the object level, and just initialized in the generate() method.
I take it you are using a database other than Oracle? Oracle provides support for this kind of tree relationship in SQL (using the CONNECT BY clause).
-Christopher
|---------+----------------------------> | | Otmar Vobejda | | | <[EMAIL PROTECTED]>| | | | | | 11/05/2003 04:47 | | | AM | | | Please respond to| | | users | | | | |---------+----------------------------> >--------------------------------------------------------------------------------------------------------------| | | | To: [EMAIL PROTECTED] | | cc: | | Subject: 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]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
