Hello Elvira,

please start such questions on the users list as it is not related to development of Cocoon itself. Thanks.

Find the answer below.

On 11.05.2004 11:04, Elvira Nieto Carretero wrote:

Hello again all!!

I create a session with

<session:setxml context="lastSearch" path="/search">
<session:getxml context="request" path="/querystring" /> </session:setxml>


Once i created it i want to save in a param or variable so i can use anywhere.

If i put in my code directly

<session:getxml context="lastSearch" path="/search" />

, the value of my session print in my page but if i do

In which way exactly? A string or elements or ...?


<xsl:variable name="mySearch">
  <session:getxml context="lastSearch" path="/search" />
</xsl:variable>

You create a result tree fragment here: http://www.w3.org/TR/xslt#section-Result-Tree-Fragments. It is a mixture of an XML structure and a string: though the xml nodes are in it, only string functions can be executed on it.


<xsl:value-of select="$mySearch"/>

Here you retrieve the string value of this result tree fragment which is the concatenation of all text nodes in it. If the above session:getxml results in a element-only XML structure you will see no output, you have to use copy-of instead then.


Joerg

Reply via email to