You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Marco Spinetti <m....@pisa.iol.it> on 2000/12/15 08:20:56 UTC

Question about esql and xsp

Hi all,
I have the following question on the esql and xsp. We suppose that I execute a Query in Esql, and can receive as answer no result or turned out more. If I obtain several results I must do other operations and do another query: the problem is that if I do not obtain any result I should finish returning a message. Is possible letting this in esql, that is have an instruction equivalent to the "Return" of the Java? 
I would like to make an operation of the kind: 

<esql:connection>
   <esql:pool>xxxxxx</esql:pool>
   <esql:execute-query>
....................
</esql:row-results>
     <esql:no-results>
      <xsp:content>
      <Result>
      <Error>...................</Error>
      </Result>
      </xsp:content>
 
Here I'd like to put an instruction "return": how can I do ?
 

     </esql:no-results>
    </esql:results>
    <esql:error-results>
    <xsp:content>
    <Result>
    <Error>....................</Error>
    </Result>
    </xsp:content>
 
Same problem: here I'd like to put an instruction "return": how can I do ?


    </esql:error-results>
</esql:execute-query>
   </esql:connection>

Here I must do many other operation with the risults I have obtained from the previous query.
Is it possible doing an operation of this kind?
Thanks
Marco
m.spinetti@pisa.iol.it

 

Re: Re[2]: Nested esql queries.

Posted by Uli Mayring <ul...@denic.de>.
On Fri, 22 Dec 2000, Donald Ball wrote:

> On Fri, 22 Dec 2000, Roman Zamorski wrote:
> >
> > <ps>
> >     <wish from="roman" to="everyone">
> >           merry x-mas
> >     </wish>
> > </ps>
> 
> <xsl:template match="ps">
>   <xsl:for-each select="wish/@from">
>     <wish from="balld" to="{.}">
>       and a happy new year!
>     </wish>
>   </xsl:for-each>
> </xsl:template>

This is NOT an XSL list! ;-)

<soap:call url="http://ulim.cocoonhost.com/soap/servlet/rpcrouter"
	id="Mailer"
	method="seasonalGreetings"
	as="XML">
	<soap:param name="soap_debug" value="yes"/>
	<soap:param name="action" value="sendmail"/>
</soap:call>

SCNR,

Ulrich

PS: no, this doesn't run live yet, but something will soon :)

-- 
Ulrich Mayring
DENIC eG, Softwareentwicklung


Re: Re[2]: Nested esql queries.

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 22 Dec 2000, Roman Zamorski wrote:

> >> It really has to be done that way - i've tried with one-query version,
> >> and it works, but not exaclty like this above would...
> >>
>
> DB> yes. with the latest cvs version of esql, you can do nested queries. see
> DB> the sample.
>
> thanks. now I can replace my java routines with nice xsp tags...
>
> <ps>
>     <wish from="roman" to="everyone">
>           merry x-mas
>     </wish>
> </ps>

<xsl:template match="ps">
  <xsl:for-each select="wish/@from">
    <wish from="balld" to="{.}">
      and a happy new year!
    </wish>
  </xsl:for-each>
</xsl:template>

- donald


Re[2]: Nested esql queries.

Posted by Roman Zamorski <ra...@tenbit.pl>.
Hello Donald,

Thursday, December 21, 2000, 7:30:36 AM, you wrote:

>
>> It really has to be done that way - i've tried with one-query version,
>> and it works, but not exaclty like this above would...
>>

DB> yes. with the latest cvs version of esql, you can do nested queries. see
DB> the sample.

thanks. now I can replace my java routines with nice xsp tags...

<ps>
    <wish from="roman" to="everyone">
          merry x-mas
    </wish>
</ps>

-- 
Best regards,
 Roman                            mailto:ramzam@tenbit.pl



Re: Nested esql queries.

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 15 Dec 2000, Roman Zamorski wrote:

> Hello,
>
> Is there possibility to do nested queries in esql when the inner query
> depend on the result of the outer one? I mean sth like this:
>
> <esql:query>select id,name from table1</esql:query>
> <esql:results>
>     <tag-outer>
>         <name><esql:get-string column="name"/></name>
>         ...
>             <esql:query>select name from table2
>             where id_table=<esql:get-int column="id"/></esql:query>
>             ...
>     </tag-outer>
> </esql:results>
>
> It really has to be done that way - i've tried with one-query version,
> and it works, but not exaclty like this above would...
>

yes. with the latest cvs version of esql, you can do nested queries. see
the sample.

- donald


Nested esql queries.

Posted by Roman Zamorski <ra...@tenbit.pl>.
Hello,

Is there possibility to do nested queries in esql when the inner query
depend on the result of the outer one? I mean sth like this:

<esql:query>select id,name from table1</esql:query>
<esql:results>
    <tag-outer>
        <name><esql:get-string column="name"/></name>
        ...
            <esql:query>select name from table2
            where id_table=<esql:get-int column="id"/></esql:query>
            ...
    </tag-outer>
</esql:results>

It really has to be done that way - i've tried with one-query version,
and it works, but not exaclty like this above would...


-- 
Best regards,
 Roman                            mailto:ramzam@tenbit.pl