Defining XSLT Variables dynamically using xsl:choose
问题 Within my XSLT spreadsheet, I need to define an xsl:variable with one value or another depending on the value of an xml node. The code just below shows what I'm trying to do. I would like to define multiple variables this way. A major issue is that in order to choose a variable value based on the node value of each item, the choosing must be done within xsl:foreach, and whenever I try to define a variable within xsl:foreach it shows an error. <xsl:for-each select="WORKS/item"> <xsl:variable