You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mustapha Dada <da...@iskv.de> on 2000/11/20 14:45:28 UTC

XSP & ESQL

Hello ,

I have read that I can insert my logic inside the Tag Esql. I have tried
to do that (I must do some elaborations on the
results) but I obtain some mistakes as if the logic was not elaborated.
 In my file I write:

<esql:results>
    <header>Example</header>
    <esql:row-results>
    <xsp:logic>
    for(int i=1; i&lt;=12; i++) {
     <ResultElement>
     <Name><xsp:expr>nomi[i-1]</xsp:expr></Name>
     <Value>
     if( i==2 | i==3 |i==4 | i==11 ) {
      <esql:get-int column="i"/>
     }
     else {
      <esql:get-string column="i"/>
     }
     </Value>
     </ResultElement>
    }
    </xsp:logic>
    </esql:row-results>
   </esql:results>

Where is the error?
Can you help me?
Thanks many

--
Mit freundlichen Grüßen
--------------------------------------------------------------------------

DADA Mustapha, ARGE ISKV GmbH, Bismarckstr. 36, 45128 Essen
Telefon: 0201/1094-210, E-mail: dada@iskv.de , km-support@iskv.de
--------------------------------------------------------------------------

KM-Support Team
DADA Mustapha


Re: XSP & ESQL

Posted by Mustapha Dada <da...@iskv.de>.
Hello ,

yes .

Dominic Jackson schrieb:

> Not sure about this, but do you mean      if( i==2 || i==3 || i==4 ||
> i==11 )
>
> Dominic Jackson
>
> -----Original Message-----
> From: Mustapha Dada [mailto:dada@iskv.de]
> Sent: Monday, November 20, 2000 1:45 PM
> To: cocoon-users@xml.apache.org
> Subject: XSP & ESQL
>
> Hello ,
>
> I have read that I can insert my logic inside the Tag Esql. I have tried
> to do that (I must do some elaborations on the
> results) but I obtain some mistakes as if the logic was not elaborated.
>  In my file I write:
>
> <esql:results>
>     <header>Example</header>
>     <esql:row-results>
>     <xsp:logic>
>     for(int i=1; i&lt;=12; i++) {
>      <ResultElement>
>      <Name><xsp:expr>nomi[i-1]</xsp:expr></Name>
>      <Value>
>      if( i==2 | i==3 |i==4 | i==11 ) {
>       <esql:get-int column="i"/>
>      }
>      else {
>       <esql:get-string column="i"/>
>      }
>      </Value>
>      </ResultElement>
>     }
>     </xsp:logic>
>     </esql:row-results>
>    </esql:results>
>
> Where is the error?
> Can you help me?
> Thanks many
>
> --
> Mit freundlichen Grüßen
> --------------------------------------------------------------------------
>
> DADA Mustapha, ARGE ISKV GmbH, Bismarckstr. 36, 45128 Essen
> Telefon: 0201/1094-210, E-mail: dada@iskv.de , km-support@iskv.de
> --------------------------------------------------------------------------
>
> KM-Support Team
> DADA Mustapha
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

--
Mit freundlichen Grüßen
--------------------------------------------------------------------------
DADA Mustapha, ARGE ISKV GmbH, Bismarckstr. 36, 45128 Essen
Telefon: 0201/1094-210, E-mail: dada@iskv.de , km-support@iskv.de
--------------------------------------------------------------------------
KM-Support Team
DADA Mustapha


RE: XSP & ESQL

Posted by Dominic Jackson <do...@wirestation.co.uk>.
Not sure about this, but do you mean      if( i==2 || i==3 || i==4 ||
i==11 )

Dominic Jackson

-----Original Message-----
From: Mustapha Dada [mailto:dada@iskv.de]
Sent: Monday, November 20, 2000 1:45 PM
To: cocoon-users@xml.apache.org
Subject: XSP & ESQL


Hello ,

I have read that I can insert my logic inside the Tag Esql. I have tried
to do that (I must do some elaborations on the
results) but I obtain some mistakes as if the logic was not elaborated.
 In my file I write:

<esql:results>
    <header>Example</header>
    <esql:row-results>
    <xsp:logic>
    for(int i=1; i&lt;=12; i++) {
     <ResultElement>
     <Name><xsp:expr>nomi[i-1]</xsp:expr></Name>
     <Value>
     if( i==2 | i==3 |i==4 | i==11 ) {
      <esql:get-int column="i"/>
     }
     else {
      <esql:get-string column="i"/>
     }
     </Value>
     </ResultElement>
    }
    </xsp:logic>
    </esql:row-results>
   </esql:results>

Where is the error?
Can you help me?
Thanks many

--
Mit freundlichen Grüßen
--------------------------------------------------------------------------

DADA Mustapha, ARGE ISKV GmbH, Bismarckstr. 36, 45128 Essen
Telefon: 0201/1094-210, E-mail: dada@iskv.de , km-support@iskv.de
--------------------------------------------------------------------------

KM-Support Team
DADA Mustapha



Re: XSP & ESQL

Posted by Donald Ball <ba...@webslingerZ.com>.
On Mon, 20 Nov 2000, Mustapha Dada wrote:

> Hello ,
> 
> I have read that I can insert my logic inside the Tag Esql. I have tried
> to do that (I must do some elaborations on the
> results) but I obtain some mistakes as if the logic was not elaborated.
>  In my file I write:
> 
> <esql:results>
>     <header>Example</header>

^-- there's a bug in the logicsheet that you might be exposing
here. remove all elements _other_ than row-results from your page and see
what happens.

>     <esql:row-results>
>     <xsp:logic>
>     for(int i=1; i&lt;=12; i++) {
>      <ResultElement>
>      <Name><xsp:expr>nomi[i-1]</xsp:expr></Name>
>      <Value>
>      if( i==2 | i==3 |i==4 | i==11 ) {

^-- you almost certainly mean || instead of |. but why force it to get an
int? unless you're _using_ the column's data in your xsp logic, you can
just go ahead and get it as a string - it's going to be printed as a
string to the xml result tree, right?

>       <esql:get-int column="i"/>
>      }
>      else {
>       <esql:get-string column="i"/>
>      }
>      </Value>
>      </ResultElement>
>     }
>     </xsp:logic>
>     </esql:row-results>
>    </esql:results>

- donald