[xsl] Re: Retaining value of a Global variable

Subject: [xsl] Re: Retaining value of a Global variable
From: Angeshwar Deepak <angeshwar@xxxxxxxxx>
Date: Sat, 17 Jul 2004 00:59:59 -0700 (PDT)
Hi vivek,

For making a variable global u have to use some
scripting languafe like javascript or jscript and then
use getter, setter method. You pass the variable value
to a javascript function which has a global variable.

Then u call the getter funtion somwhere in the
stylesheet where the global variable of javascript is

It looks something like this...

<xalan:script lang="javascript">

//Function to set Package name
var sendpname;
function sendpackagename(finpackagename)
return sendpname;

//Function to get Package name
function returnpackagename(getpackagename)
return sendpname;


In the xsl part...
<!--inside a Loop-->
<xsl:variable name="sendpackagename"
<!--Loop ends-->
<!--outside loop or anywhere in the code-->
<xsl:variable name="getpackagename"

Now you can use the variable getpackagename which has
the value 'retained'. But this is cumbersome, i.e. you
have to use many number of such getter, setter
functions to kkep on retaining the old values and
using them through out the code.....

hope it helps.

with regards,

Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!

Current Thread