You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by gu...@tin.it on 2000/11/13 12:34:28 UTC

R: Sql TagLib runs a query and Xsp logic uses the resulting Xmlquery fragment to take some kind of action.

----- Original Message -----
From: Donald Ball <ba...@webslingerZ.com>
To: <co...@xml.apache.org>; <gu...@tin.it>
Sent: Sunday, November 12, 2000 10:15 PM
Subject: Re: Sql TagLib runs a query and Xsp logic uses the resulting
Xmlquery fragment to take some kind of action.


> On Sun, 12 Nov 2000 gumario@tin.it wrote:
>
> > Hello everybody!!!
> >
> > I've got the following problem.
> >
> > I have to access a database to retrieve some field data. I use the Sql
> > TagLib. When that taglib is used, the <sql:execute-query> element is
> > replaced by the Xml fragment containing the query results.
> >
> > What about if this query is run inside an Xsp page, which has to
decide
> > what
> > action to take, according to the value of one of the fields belonging
to
> > that
> > Xml query fragment?
> >
> > EXAMPLE
> >
> > The query could produce either this Xml fragment
> >
> > <doc-element>
> > <row-element>
> > <field>value1</field>
> > </row-element>
> > </doc-element>
> >
> > or the following one.
> >
> > <doc-element>
> > <row-element>
> > <field>value2</field>
> > </row-element>
> > </doc-element>
> >
> >
> > Well, at this point the logic in the Xsp page could take two different
> > actions, according to the value of the <field> element.
>
> you want to use the esql logicsheet. using it, you can embed xsp logic
> and/or expr elements inside the results element. e.g.
>
> <esql:results>
>   <esql:row-results>
>     <xsp:logic>
>       if ("value1".equals(<esql:get-string column="1"/>)) {
>         file://first action
>       } else if ("value2".equals(<esql:get-string column="1"/>)) {
>         file://second action
>       }
>     </xsp:logic>
>   </esql:row-results>
> </esql:results>
>
> - donald
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>

I'd really apprectiate to know where I can find the esql logicsheet, if
it's
completely working and fully tested like the sql taglib was and where I
can
find some documentation.

Another question is: is esql logicsheet able to cacth and manage every
sort
of database exception?

I'd like to see some usefl example about its usage! Please let me have the
URL of that logicsheet!!

Regards!


Fw: Generating XML from XSP for external use

Posted by Konstantin Piroumian <KP...@flagship.ru>.
Is there anybody out there?

> Hi, all!
> 
> I have a task to generate an XML query from the user request data.
> F.e., I have a form with user data:
> 
> First name
> Last name
> Middle name
> Email
> 
> I receive POST-ed data and want to generate an XML (maybe XObject or
> DOM-node, is it the same thing?):
> 
> <query type="insert" creation-time="somedate">
>      <class type="person">
>            <attribute name="first_name"
> value="request.getParameter("firstname");"/>
>            ...
>      </class>
> </query>
> 
> Then I must send this XMl to a EJB for processing.
> 
> What is the best way of implementing such functionality with XSP?
> Thanks in advance.
> 
> Regards,
>    Konstantin Piroumian.
> Web Application developer
> Email: kpiroumian@flagship.ru
> 



Generating XML from XSP for external use

Posted by Konstantin Piroumian <KP...@flagship.ru>.
Hi, all!

I have a task to generate an XML query from the user request data.
F.e., I have a form with user data:

First name
Last name
Middle name
Email

I receive POST-ed data and want to generate an XML (maybe XObject or
DOM-node, is it the same thing?):

<query type="insert" creation-time="somedate">
     <class type="person">
           <attribute name="first_name"
value="request.getParameter("firstname");"/>
           ...
     </class>
</query>

Then I must send this XMl to a EJB for processing.

What is the best way of implementing such functionality with XSP?
Thanks in advance.

Regards,
   Konstantin Piroumian.
Web Application developer
Email: kpiroumian@flagship.ru




Re: R: Sql TagLib runs a query and Xsp logic uses the resulting Xmlquery fragment to take some kind of action.

Posted by Donald Ball <ba...@webslingerZ.com>.
On Mon, 13 Nov 2000 gumario@tin.it wrote:

> I'd really apprectiate to know where I can find the esql logicsheet, if
> it's
> completely working and fully tested like the sql taglib was and where I
> can
> find some documentation.

it's in cvs, documentation is embedded in the logicsheet and in the sql
samples directory. no, it's not completely working and fully tested like
the sql taglib was (though if you think that the sql taglib was... well,
nevermind).

> Another question is: is esql logicsheet able to cacth and manage every
> sort
> of database exception?

it lets you catch SQLExceptions if you want to, or pass them out if you
want to. if you want to do something fancy with the exceptions, you can
wrap the esql:connection element with your own try/catch block.

- donald