I have a xml that has so many elements and most of that contain attributes.. for some of the attributes values are same so I need to group them and generate diff xml.
I/p Ex:
<TestNode>
<ABC1 value="10.7" format="$" />
<ABC2 value="10.5" format="$" />
<ABC3 value="20" format="Rs" />
<ABC4 value="50" format="Rs" />
<ABC5 value="10.5" format="$" />
</TestNode>
I need to group the rows by format. Note: Format is not fixed… it may grow …
O/P Ex:
is it possible to get ? Thanks in advance…
In XSLT 2.0 you should be able to do it with
<xsl:for-each-group>,current-grouping-key()andcurrent-group()Example:
See: http://www.w3.org/TR/xslt20/#grouping