You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Kogan Irina <Ir...@mchp.siemens.de> on 2003/05/12 15:01:48 UTC
Session context in Cocoon.
Hello everybody,
I am starting to work with session context in Cocoon. I need to create
session context, write to it (the values from the database), read it and use
it in my transformations. I have read the information written on
http://xml.apache.org/cocoon/developing/webapps/session.html.
It seems to be clear which commands (session elements like session:setxml) I
should use. But should these elements be in my .xsl file with
transformations (rather than in an xml file that I am generating)? Which
transformer should I use (session dom read / write or simply xslt)? Does
somebody have any examples, especially with the use of database?
Thanks a lot for your help!
Irina.
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: Session context in Cocoon.
Posted by Alex Romayev <ro...@yahoo.com>.
Hi Irina,
You need to use SessionTransformer:
<map:transform type="session"/>.
There are several ways of using it. The most simple
is to use directives like session:getxml in an xml
file and them run the tranformer, e.g.:
<map:generate src="foo.xml"/>
<map:tranform type="session"/>
...
You can also insert session directives via an xsl
stylesheet before running the tranformer, e.g.:
<map:generate src="foo.xml"/>
<map:transform src="insert-session-directives.xsl"/>
<map:tranform type="session"/>
If you need to get more fancy, you could also tranform
your stylesheet before using it (you'd need to used it
via cocoon: protocol.
Hope this helps,
-Alex
--- Kogan Irina <Ir...@mchp.siemens.de> wrote:
> Hello everybody,
>
> I am starting to work with session context in
> Cocoon. I need to create
> session context, write to it (the values from the
> database), read it and use
> it in my transformations. I have read the
> information written on
>
http://xml.apache.org/cocoon/developing/webapps/session.html.
>
> It seems to be clear which commands (session
> elements like session:setxml) I
> should use. But should these elements be in my .xsl
> file with
> transformations (rather than in an xml file that I
> am generating)? Which
> transformer should I use (session dom read / write
> or simply xslt)? Does
> somebody have any examples, especially with the use
> of database?
>
> Thanks a lot for your help!
>
> Irina.
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org