-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there,
I need help with using the temporary session-context to share value.

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>
...
- ---
and I need to use this key in an e-mail I creating later in the request:
- ---
      <map:match pattern="save">
                <map:generate src="newuser.xml"/>
<!-- generate key -->   <map:transform src="stylesheets/generate-key.xsl"/>
                <map:transform type="session"/>
                <map:transform type="cinclude"/>
                <map:transform type="write-source"/>
                <map:serialize type="xml"/>
     </map:match>


      <map:match pattern="do-register">
        <map:aggregate element="site" label="raw-data">
<!-- this generates the key -->  <map:part src="cocoon:/save"/>
                        <map:part src="cocoon:/thanks"/>
        </map:aggregate>
        <map:transform type="idgen" label="id"/>
        <map:transform type="xinclude" label="include"/>
...
        <map:act type="sendmail">
...
                <map:parameter name="body" value="Thank you for registring with 
Plan-B
for OpenOffice.org. Please confirm your e-mail address by clicking on
'{session-context:temporary/my_key}'"/>
...
            <map:serialize/>
        </map:act>
     </map:match>
- ---
However I never see the temporary/my_key in the sitemap. Any ideas what
I'm doing wrong.

K<o>
- --
[EMAIL PROTECTED]
 http://conficio.blogspot.com/
 ================================================
 |  We teach software one screencast at a time  |
 ================================================
 http://www.conficio.com/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)

iD8DBQFFRfXkRDUvrJRNjTARAjIQAJ9xkDHEANjNKoAUD/tSfRgA0nuszgCgjN4/
y6Fu6fzD7rxPJujpXKwEtHk=
=U0JM
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to