I need to work with a nested for-each loop in XSLT. Below is the code. Please note that I am using grouping here.
<xsl:key name="list" match="video_card" use="id"/>
<xsl:for-each select="(//video_card)[generate-id(.)=generate-id(key('list', id))]/id">
<div class="show_config_list">
<xsl:for-each select="key('list', .)">
<xsl:sort select="config_name"/>
<input type="checkbox" class="config_list" value="{config_id}" name="cfg[][id]" [B]id="cfg_{position()}"[/B] checked="checked" />
</xsl:for-each>
</div>
If you notice, the ID keeps repeating for different groups of video cards. In other words, for every group of video cards, the ID would start at cfg_1 followed by cfg_2, cfg_3...
This is undesirable. I need it to be cfg_1 to cfg_n where n='no. of configs'.
Is there a way of doing this?