This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Global Variable


James,
Hello Aruniima,

You will have to update your XSL knowledge, <xsl:param/> and <xsl:variable/>
when set, never change....
But isnt it possible to set the variable value based on some condition ??
like
<xsl:variable name = "myVar">
<xsl:choose>
<xsl:when test = "some-condition"> some value</xsl:when>
<xsl:otherwise>some-other-value</xsl:otherwise>
</xsl:choose>
</xsl:variable>

If the objective is to set a variable based on condition.. as arunima put it..
"Is it possible to have a Global variable kind of concept which can
be set to different values in the program based on conditions & used???"

If thaz what is required?
Vasu

From: "James Fuller" <james.fuller@o-idev.com>
Reply-To: xsl-list@lists.mulberrytech.com
To: <xsl-list@lists.mulberrytech.com>
Subject: RE: [xsl] Global Variable
Date: Wed, 14 Aug 2002 10:15:33 +0100




> aruniima.chakrabarti@iflexsolutions.com
> Sent: 14 August 2002 10:10

> Hi,
> Is it possible to have a Global variable kind of concept which can
> be set to different values in the program based on conditions & used???


Hello Aruniima,

You will have to update your XSL knowledge, <xsl:param/> and <xsl:variable/>
when set, never change....

this may be an odd concept to you, possibly coming from a world where we use
variables quite extensively this way.....

think of the days when we used GOTO statements...remember that with line
numbers ..... people back then couldnt believe that you didn't have to do
this... the analogy is similar to using variables.

check out the xslt FAQ at www.dpawson.co.uk for more information.

though it is possible that you are just asking on how to use <xsl:variable/>
or <xsl:param/>

once again, check the FAQ, and if u still have a problem then post your
sample XSLT and XML and we will try to solve the problem.

cheers, jim fuller


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]