cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nils Köster <n...@lolili.de>
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!
nils

Sitemap:
----------------------------------
		<map:pipeline>
			<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"/>
			</map:match>
		</map:pipeline>
----------------------------------

getxml.xsl
----------------------------------
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	
xmlns:session="http://apache.org/cocoon/session/1.0"
				version="1.0">


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


</xsl:stylesheet>
----------------------------------

something.xsl
----------------------------------
<xsl:variable name="count"><xsl:value-of
select="document('cocoon:/getxml')/count"/></xsl:variable>
----------------------------------



> -----Ursprüngliche Nachricht-----
> Von: Nils Köster [mailto:nils@lolili.de] 
> Gesendet: Donnerstag, 1. April 2004 15:35
> An: users@cocoon.apache.org
> 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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message