cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joakim Verona <joa...@verona.se>
Subject Re: AW: How do I set session variables from xslt or jxtransforms?
Date Fri, 30 Jan 2004 05:20:20 GMT
Many thanks Markus!

Regards,
/Joakim

Markus Heussen wrote:

>In a first transformation you can create the xml syntax for the second
>transformer, the session transformer using xslt/xpath functions.
>
>look at http://cocoon.apache.org/2.1/developing/webapps/contexts.html
>
>you can do something like this:
>
><map:match pattern="test">
>	<map:generate type="file" src="test.xsp"/>
>	<map:transform type="xalan"
>src="xsl-file-that-produces-the-session-syntax.xsl"/>
>	<map:transform type="session"/>
>	<map:serialize type="xml"/>
></map:match>
>
>Greetings, Markus
>
>
>  
>
>>-----Urspr√ľngliche Nachricht-----
>>Von: Joakim Verona
>>Gesendet: Donnerstag, 29. Januar 2004 13:44
>>An: users@cocoon.apache.org
>>Betreff: How do I set session variables from xslt or jxtransforms?
>>
>>
>>Hello list,
>>
>>I have a XSP file that generates XML by decrypting a string sent in a
>>url parameter.
>>
>>This works, and the XSP generates a XML representation of the decrypted
>>string.
>>
>>Now I would like to pass this generated XML to a transform of some kind,
>>that will extract data
>>and put it in session variables.
>>
>>Whats the best way to do this?
>>
>>The only way I can think of is using a XSLT transform that gets at the
>>data I want with XPath,
>>and then uses xalan java extensions to set the session variables
>>somehow, but this seems so awkward.
>>
>>Any ideas?
>>
>>Here is an example:
>>
>>an XSP generates this XML:
>>
>><root>
>>   <var1>foo</var1>
>>   <var2>foo2</var2>
>></root>
>>
>>I want to do something like:
>>setSessionVariable("var1", xpathExpression("/root/var1"))
>>
>>
>>Cheers,
>>/Joakim
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>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
>  
>



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


Mime
View raw message