I am looking for an XSLT pattern to do the following:
declare a variable that will hold a set of nodes
conditionally set the variable declared above depending on a number of conditions (ie use a 'choose - when - when' structure)
use the conditional variable in a for-each statement once it has been set
I'm not quite sure how to go about this in XSLT. I know I can use the choose/when construct, but how do I declare a variable in global scope, set it to a value, then use it later?
How to conditionally set a variable in XSLT?
Hi
I am looking for an XSLT pattern to do the following:
I'm not quite sure how to go about this in XSLT. I know I can use the choose/when construct, but how do I declare a variable in global scope, set it to a value, then use it later?
thanks
Hi manwood,
Take a look at the solution provided in this Forum post - that's your pattern right there.
/Chriztian
is working on a reply...