I have a XML like below.
<minimums type="table">
<minLine>
<minId>S-4LS16L</minId>
<catA>5550</catA>
<catA>1800</catA>
<catB>5550</catB>
<catB>1800</catB>
<catC>5550</catC>
<catC>1800</catC>
</minLine>
<minLine>
<minId>S-LOC16L</minId>
<catA>5660</catA>
<catA>2400</catA>
<catB>5660</catB>
<catB>2400</catB>
<catC>2400</catC>
<catC>310</catC>
</minLine>
</minimums>
Now i want to group catA, catB, catC etc repeated elements using XSL.
Below is the part of my XSLT.
<xsl:key name ="groupElement" match ="*" use="name(.)"/>
<xsl:template match ="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="minLine">
<xsl:for-each select="*[generate-id()= generate-id(key('groupElement', name(.)))]">
<xsl:comment> This is Not get Printed during second match of minLine element</xsl:comment>
</xsl:for-each>
</xsl:template>
is working fine during the first match of . The issue is that the during the match of second element , is not get printed. I must be doing some silly mistake.
Where am i doing wrong ?