cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nils Köster <>
Subject XSLT: Session-Content in Variables
Date Tue, 04 May 2004 09:30:25 GMT
Some weeks ago I comlained about not getting session content in variables in
xslt. I read much about others who had the same problem. Now I found out,
why it doesn't work.

It's not a bug, it's a feature.

What I tried:
<xsl:variable name="lang"><session:getxml context="bct"

My sitemap looked like this:
<map:pipeline type="noncaching">
	<map:match pattern="rmd_list">
		<map:generate src="content/foo.xml"/>
		<map:transform src="style/xsl/some.xsl"/>      (1)
		<map:transform type="session"/>                (2)
		<map:serialize type="html"/>

The simple reason, why there will never be something in the variable while
processing the xsl is, that alle the xsl-stuff (1) (including the usage of
the variable) is done before the session-tags are processed by the
session-transformer (2).

For example:

If I have a <xsl:value-of select="$lang"/> somewhere in some.xsl, cocoon
would first replace this with nothing (1) and afterwards care about the
session-tags (2).

So, using session-content in variables will never work using the

Any comments?


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

View raw message