ma, 2003-10-27 kello 14:01, John L. Webber kirjoitti:
> for (int i = 0; i < 10; ++i) {
>   <xsp:element name="elements"/>
> }

Ok, this works, but, What if I want to loop ESQL-commands?

<xsp:page ....>
 <test>
  <xsp:logic>
   <esql:connection>
    <esql:database>x</esql:database>
    for (int i = 0; i &lt; 10; i++) {
     <esql:execute-query>
      <esql:query>SELECT NEXTVAL('list_id_seq') as id</esql:query>
     </esql:execute-query>
    }
   </esql:connection>
  </xsp:logic>
 </test>
</xsp:page>

Will make:

<test xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1";
xmlns:esql="http://apache.org/cocoon/SQL/v2";
xmlns:xsp="http://apache.org/xsp";>
  
     <esql:database>x</esql:database>
     for (int i = 0; i &lt; 10; i++) {
 </test>

And no SELECT-clauses to SQL-server..

So, howto loop SELECT-clause?

- Joose

> 
> Joose Vettenranta wrote:
> 
> >Hi,
> >
> >how can I do this in XSP:
> >
> ><xsp:logic>
> >for (int i=0; i<10; ++i) {
> >   <elements />
> >}
> ></xsp:logic>
> >
> >so that <elements /> would be 10 times in XML-file.
> >
> >Using cocoon 2.1
> >
> >- Joose
> >
> >  
> >
-- 
Joose Vettenranta, Intertechnika Oy
E-Mail: [EMAIL PROTECTED]
WWW: http://www.intertechnika.com/
GSM: 044 561 0270


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

Reply via email to