I have an XML file I\'m processing with XSL to build a PDF. I\'m running into an issue when I try to use an XSL variable. I\'m not sure if I\'m using it in the wrong scope,
If someone could please point out what I'm doing wrong
The main problem with your approach is scope. When you define a variable like this:
it exists only until you close the xsl:when
element. Similarly, the other variable exists only within the xsl:otherwise
tags. (If it weren't so, the two would collide, having the same name.)
and/or how to resolve it
It's hard to advise without seeing the wider picture, but couldn't you do simply:
Old
New