You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by H....@MI.unimaas.nl on 2003/12/29 17:06:32 UTC

How to get XML into session?

Hi,

I can't find how to put some cleaned up XML into a session attribute. This
is the sitemap pipeline:

<map:match pattern="setSessionAttribute">
	<map:generate src="system/getData.xsp" type="serverpages"
label="debug1">
		<map:parameter name="someParameter" value="someValue"/>
	</map:generate>
	<map:transform src="system/cleanup.xslt" label="debug2"/>
	<map:serialize type="xml"/>
</map:match>

I want to put the resulting XML into a session attribute.

Thanks.

Bye, Helma

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


Re: How to get XML into session?

Posted by Nicolas Toper <nt...@jouve.fr>.
http://cocoon.apache.org/2.1/developing/webapps/contexts.html
all is there. Quite complete and you'll understand how session with cocoon 
works

Nicolas 
Jouve SI

Le Lundi 29 Décembre 2003 17:06, H.vanderLinden@MI.unimaas.nl a écrit :
> Hi,
>
> I can't find how to put some cleaned up XML into a session attribute. This
> is the sitemap pipeline:
>
> <map:match pattern="setSessionAttribute">
> 	<map:generate src="system/getData.xsp" type="serverpages"
> label="debug1">
> 		<map:parameter name="someParameter" value="someValue"/>
> 	</map:generate>
> 	<map:transform src="system/cleanup.xslt" label="debug2"/>
> 	<map:serialize type="xml"/>
> </map:match>
>
> I want to put the resulting XML into a session attribute.
>
> Thanks.
>
> Bye, Helma
>
> ---------------------------------------------------------------------
> 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


Re: How to get XML into session?

Posted by Sebastian Klamar <se...@tux.wh17.tu-dresden.de>.
* H.vanderLinden@MI.unimaas.nl [2003-12-29 17:06 +0100] wrote:
> <map:match pattern="setSessionAttribute">
> 	<map:generate src="system/getData.xsp" type="serverpages"
> label="debug1">
> 		<map:parameter name="someParameter" value="someValue"/>
> 	</map:generate>
> 	<map:transform src="system/cleanup.xslt" label="debug2"/>
> 	<map:serialize type="xml"/>
> </map:match>
> 
> I want to put the resulting XML into a session attribute.

I'm currently using the WriteDOMSessionTransformer for this purpose.
All you need is a valid session (the transformer doesn't create one).
In your pipeline you place the following (»continue« is the session
attribute).

<map:transform type="writeDOMsession">
    <map:parameter name="dom-name" value="continue"/>
    <!-- extract everything under <ddl> root node -->
    <map:parameter name="dom-root-element" value="ddl"/>
</map:transform>

If you have problems with this drop me a line.

The solution Nicolas suggests (contexts) is new to me.  As a third
possible way to store your output I see the xmodule concept -- which is
new to me too.  As an example I saw today the thread on the dev list
<http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107256239108085&w=2>


HTH -- Sebastian

-- 
Die letzten Worte...
                       des Vertreters: "Brauchen sie einen Staubsauger?"
************************************************************************
PGP Key: 0x1E727CE6 / 9085 48BD 8332 4BFC D80C  A6CF D162 20BB 1E72 7CE6

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