cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeroen Reijn <j.re...@hippo.nl>
Subject Re: using temporary session-context to share value
Date Mon, 30 Oct 2006 13:22:56 GMT
Hi Kaj,

i do not have a lot of experience with the session-context and session 
transformer, but i will try as much as I can to help you out.

> I have a stylesheet that creates a key
> - ---
> <xsl:stylesheet
>   version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>   				xmlns:session="http://apache.org/cocoon/session/1.0">
> 
>    <xsl:template match="key">
> 	<!-- create some random number as base for a confirmation URL -->
> 	<xsl:variable name="rnd" select="translate(math:random(),'.','x')"
> 		xmlns:math="xalan://java.lang.Math"/>
>   	<xsl:copy>
> 		<xsl:value-of select="concat('cu',$rnd)"/>
>   	</xsl:copy>
>   	<session:setxml context="temporary" path="my_key"><xsl:value-of
> select="concat('cu',$rnd)"/></session:setxml>
>   </xsl:template>
> ...


Looking at the documentation about the session-context the following 
issues come to mind:

In the example they create their own context first by doing:
<session:createcontext name="trackdemo"/>

Where trackdemo is the context used somewhere else in the xml body like:
<session:mergexml context="trackdemo" path="/context">

So my first question: did you set your context? If so did you try to add 
a / in front of your path?

What happens if you do it like this?

Regards,

Jeroen Reijn
Hippo

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


Mime
View raw message