Need XSLT
Hi All,
I need XSL to translate below input xml into expected output xml.
Req. in brief
I have xml which has item element with attributes itemid and type, i need to segregate those item elements based on its type. Sample input and output is as below.
input
<cat>
<catItem item="1" type="A" />
<catItem item="2" type="A" />
<catItem item="3" type="B" />
<catItem item="4" type="B" />
</cat>
---------------------------------
expected output
<cat>
<Category type="A">
<Item id="1" />
<Item id="2" />
</Category>
<Category type="B">
<Item id="3" />
<Item id="4" />
</Category>
</cat>
Can any one help me to develop XSL for above requirement.
Thanks and Regards,
sbolchetwar
|