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 returned It looks something like this... <xalan:script lang="javascript"> <![CDATA[ //Function to set Package name var sendpname; function sendpackagename(finpackagename) { sendpname=finpackagename; return sendpname; } //Function to get Package name function returnpackagename(getpackagename) { return sendpname; } ]]> </xalan:script> </xalan:component> In the xsl part... .... .... <!--inside a Loop--> <xsl:variable name="sendpackagename" select="counter:sendpackagename(string($finpackagename))"/> <!--Loop ends--> .... .... <!--outside loop or anywhere in the code--> .... <xsl:variable name="getpackagename" select="counter:returnpackagename(string(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. bye, with regards, Deepak. __________________________________ Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! http://advision.webevents.yahoo.com/yahoo/votelifeengine/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Retaining value of a Glob, M. David Peterson | Thread | [xsl] Re: Retaining value of a Glob, Joseph Kesselman |
RE: [xsl] Retaining value of a Glob, Vivek Shinde | Date | Re: [xsl] Walking a complex object , Jeni Tennison |
Month |