[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Retaining value of a Global variable

Subject: Re: Retaining value of a Global variable
From: Angeshwar Deepak <angeshwar@xxxxxxxxx>
Date: Sat, 17 Jul 2004 00:59:59 -0700 (PDT)
javascript getter
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


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.