Hi, it's me again ... could some one give me a hint how to use <xsp:logic> in the right way ?
I have to generate a document structure like this: document section A chapter 1 chapter 2 section B chapter 3 My problem is to combine the logic with my esql tags. <xsp:page laguage="java" xmlns:xsp="http://apache.org/xsp" xmlns:esql="http://apache.org/cocoon/SQL/v2"> <Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="schema.xsd" xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xsp="http://apache.org/xsp"> <esql:connection> <esql:pool>xmldb</esql:pool> <Document> <esql:execute-query> <esql:query>select * from document</esql:query> <esql:results> <esql:row-results> <DocObj><esql:get-string column="DocObject"/></DocObj> <DocTitle><esql:get-string column="DocTitle"/></DocTitle> <DocVer><esql:get-string column="DocVersion"/></DocVer> <DocAuth><esql:get-string column="DocAuthor"/></DocAuth> <DocDate><esql:get-date column="DocData"/></DocDate> </esql:row-results> </esql:results> </esql:execute-query> <Section> <esql:execute-query> <esql:query>select * from section where DocID 1</esql:query> // Here I have to make an output first for the section A and all its chapters and after that I have to realize an output of the section B and all its chapters ... how can I realize it ? <xsp:logic> for (int x=0; x< =<esql:row-results>; x++){ <esql:results> <esql:row-results> <SecTitle><esql:get-string column="SecTitle"/></SecTitle> <SecContent><esql:get-string column="SecContent"/></SecContent> </esql:row-results> </esql:results> </esql:execute-query> <Chapter> <esql:execute-query> <esql:query>select * from chapter where Chapter= nr AND Section=A</esql:query> <xsp:logic> for (int y=0; y<=<esql:row-results>; y++){ <esql:results> <esql:row-results> <ChapTitle><esql:get-string column="ChapTitle"/></ChapTitle> <ChapContent><esql:get-string column="ChapContent"/></ChapContent> </esql:row-results> </esql:results> } </xsp:logic> </esql:execute-query> } </xsp:logic> </Chatpter> </Section> </sql:connection> </Document> Is it possible to use esql or better to write everything in Java? I am really new to all this stuff ... sorry if I mix up everything ... J. --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>