-----Urspr�ngliche Nachricht-----
Von: Nils K�ster [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 2. April 2004 09:40
An: [EMAIL PROTECTED]
Betreff: [Solved] <session:getxml ...>
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/foo.xml"/>
<map:transform src="style/xsl/get_xml.xsl"/>
<map:transform type="session"/>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
----------------------------------
Note: foo.xml ist of no use, the template doesn't process it.
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>
----------------------------------
Note: There hast to be a pipeline for this xsl, of course. This pipeline is
another one than the getxml-one aboth.
> -----Urspr�ngliche Nachricht-----
> Von: Nils K�ster [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 1. April 2004 15:35
> An: [EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]