Link to home
Start Free TrialLog in
Avatar of tesmc
tesmcFlag for United States of America

asked on

How to reset a variable value and use if-block in xsl syntax

I have  a variable that is set to value of an attribute within a node. now i need to do a check within an if-else block and reset the value of this variable. how do i do this in xsl syntax?

this is the varName
<xsl:variable name="SubZone" select="$varSubZone/@code"/>

i now need to test if this variable contains ("BL", 'AC", 'GR") and if so then set SubZone= "112"
otherwise leave as is.

all of this is inside a <when> bracket
please advise.


ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tesmc

ASKER

hi Gertone:
i actually resolved this by using a choose when statement and defining my new node as a string inside the statement instead of a variable to define it for the same reason u stated
thanks.