I am new to XSLT, please help.
We have an XML which we want to convert it into Ruby ActiveResource format XML. Please help me with the XSLT code. Thank you.
XML INPUT
<PARM>
<PC>0</PC>
<PMT NM="THEME" DN="THEME" IR="0" T="0">
<PV V="fast" L="" H="" C="4"/>
</PMT>
<PMT NM="INGREDIENTS" DN="INGREDIENTS" IR="0" T="0">
<PV V="chicken" L="" H="" C="5"/>
<PV V="tomato" L="" H="" C="12"/>
</PMT>
</PARM>
REQUIRED XML OUTPUT
<facet-groups type="array">
<facet-group>
<name>THEME</name>
<facets type="array">
<facet>
<name>fast</name>
<count>4</count>
</facet>
</facets>
</facet-group>
<facet-group>
<name>INGREDIENTS</name>
<facets type="array">
<facet>
<name>chicken</name>
<count>5</count>
</facet>
<facet>
<name>tomato</name>
<count>12</count>
</facet>
</facets>
</facet-group>
</facet-groups>
Please help. Thank you.
This is the @LarsH in other words: