Loop through variable value

antonioba15

New Member
I have an XSLT that looks like this atm:\[code\]<xsl:template match="Root"> <xsl:for-each select="Worksheettype[@name='DubieuzeDebiteurenApp']"> <xsl:for-each select="Types/Sub/*"> <xsl:for-each select="./*"> <xsl:value-of select="ancestor::Worksheettype/@TypeId"/> ; <xsl:value-of select="local-name(parent::*)"/> ; <xsl:value-of select="local-name()"/> <xsl:text>
</xsl:text> </xsl:for-each> </xsl:for-each></xsl:for-each><xsl:for-each select="Worksheettype[@name='VoorzieningenApp']"> <xsl:for-each select="Types/Sub/*"> <xsl:for-each select="./*"> <xsl:value-of select="ancestor::Worksheettype/@TypeId"/> ; <xsl:value-of select="local-name(parent::*)"/> ; <xsl:value-of select="local-name()"/> <xsl:text>
</xsl:text> </xsl:for-each> </xsl:for-each></xsl:for-each><xsl:for-each select="Worksheettype[@name='RisicoKapitaalApp']"> <xsl:for-each select="Types/Sub/*"> <xsl:for-each select="./*"> <xsl:value-of select="ancestor::Worksheettype/@TypeId"/> ; <xsl:value-of select="local-name(parent::*)"/> ; <xsl:value-of select="local-name()"/> <xsl:text>
</xsl:text> </xsl:for-each> </xsl:for-each></xsl:for-each></xsl:template>\[/code\]It works OK but as you can see I have 3 identical blocks of code but each with a different select parameter on the for-each statement.I would like to create a variable where i could store the 3 select parameters and simple iterate through them so i could reduce my code to only 1 block.I have tried creating a variable but it always fails...Any help is much appreciated :)Thanks!
 
Back
Top