Subject: Variable value change based on condition
From: sudheshna iyer <sudheshnaiyer@xxxxxxxxx>
Date: Tue, 5 Oct 2010 02:39:13 -0700 (PDT)
|
I need a variable whose value can be changed based on the if conditions.
Eg:
I have 3 input variables (inputVar1, inputVar2, inputVar3) and 3 output variables (outputTempVar1, outputVar1, outputVar2)
I need to copy these input variables to output variables based on some condition.
Conditions:
If all the 3 input variables are present, map inputVar1 -> outputTempVar1, map inputVar2 -> outputVar1 and map inputVar3 -> outputVar2.
If there are only two input variables present (inputVar1, inputVar2), map inputVar1 -> outputVar1 and map inputVar2 -> outputVar1.
If there is only one input variable is present (inputVar1), map inputVar1 -> outputVar1.
So output variables get their values based on input variable's presence (not empty).
So can I change the value of the output variable? How can I achieve the above in xslt 1.0.
|