Selecting new variable from list for each iteration of for-each loop
Posted on 2010-11-22
I'm trying to include in my XSLT file a variable containing multiple elements which I need to use during a for-each loop. The variable could be as below in theory:
During a for-each loop, I need to use the values - a different one for each iteration. Here's an example of how I thought it might work based on a similar solution I found:
<xsl:for-each select="$colorPalette/color[not(@value = preceding::*/@value)]">
What would be the best way to accomplish this? The main for-each loop needs to remain a loop, but the variable process could use templates or some other approach. Thanks in advance!