cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carmona Perez, David" <DPerez...@fcc.es>
Subject RE: how to use output of transform in sitemap
Date Mon, 24 Nov 2003 08:25:26 GMT
XSPAction or ServerPagesAction?

--------
David

-----Mensaje original-----
De: Lars Huttar [mailto:lars_huttar@sil.org]
Enviado el: jueves, 20 de noviembre de 2003 23:34
Para: users@cocoon.apache.org
Asunto: RE: how to use output of transform in sitemap

Hi all,
To answer my own question, a good way to get output of a pipeline
for use in the sitemap is to use the XSPAction action.
This lets you run an XSP page created by a pipeline; the XSP code
can then use <action:set-success>, <action:set-result ... />
and so on to send results out to the sitemap.
This also allows me to put session:set-attribute instructions in
the XSP code, as desired; and I can do the redirects in the
sitemap, conditional on success or failure as determined by
the XSP code.

Regards,
Lars

> -----Original Message-----
> From: Lars Huttar [mailto:lars_huttar@sil.org]
> Sent: Wednesday, November 19, 2003 10:00 PM
>
> Hi all,
> I'm having a tough time figuring out how to use the output
> of a transformation in the sitemap.
> The task is fairly simple user authentication. Pseudocode for
> the desired operation:
>
> 1) check the id and password request params against the user
> database (users.xml)
>    <map:generate src="data/users.xml" />
>    <map:transform src="transforms/authenticate.xsl" />
>
> The stylesheet checks the id and password params against users.xml
> for a match. It outputs <success userid="lars"/> if
> successful; <failed/>
> otherwise.
>
> 2) If step 1 was successful, create a session and store the valid
>   of userid in it; then redirect to the "menu" pipeline.
>    Otherwise, redirect to the "login?login-failed=true" pipeline,
>    which will present an error message and a login form.
>
> PROBLEM: how to get the result from step 1 into a form that can
> be used by the sitemap for a conditional to control step 2?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message