cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nils Köster <>
Subject [Solved] <session:getxml ...>
Date Fri, 02 Apr 2004 07:39:31 GMT
I've got a "solution" for that ?bug?:

The Stylesheet which needs the Session-Info in a variable (something.xsl)
now calls another stylesheet via the cocoon-protokoll. The other one gets
the session-variable and generates an xml-output. In that way i walk around
the problem which the session-transformer seems to have with generating the
session-stuff inside the variable...

Hope that helps others, too!

			<map:match pattern="getxml">
				<map:generate src="content/projects.xml"/>
				<map:transform src="style/xsl/get_xml.xsl"/>
				<map:transform type="session"/>
				<map:serialize type="xml"/>

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl=""

<xsl:template match="/">
		<session:createcontext name="test_nils"/>
		<session:getxml context="test_nils"


<xsl:variable name="count"><xsl:value-of

> -----Ursprüngliche Nachricht-----
> Von: Nils Köster [] 
> Gesendet: Donnerstag, 1. April 2004 15:35
> An:
> Betreff: XSL: <session:getxml ...>
> Hello there,
> I found out by searching this mailinglist that nobody figured 
> out how to get the result of a <session:getxml ...> call into 
> a variable in xsl. As far as I know now, things like 
> <xsl:variable ...><session:getxml ...></xsl:variable> don't work.
> Based on this, heres my question:
> I'd like to add a counter-variable to the session-context. 
> Everytime I add a node to the context, i'd like to count it 
> up by one. I'd like to use that counter inside of the strings 
> in other nodes in the context as well.
> My whole site ist implemented in XSL.
> Is there a possibility to use Javascript an XSL in one 
> Template or one Pipeline? Or to call a Javascript from an XSL 
> with parameters exchanged before and afterwards?
> Thanx for your help!
> Nils

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message