Hi,
How to do group by in XSLT ?
I tried on the following codes:
<files>
<file name="swablr.ep s" size="4313" project="mars"/>
<file name="batboy.wk s" size="424" project="neptun e"/>
<file name="potrzebie .dbf" size="1102" project="jupite r"/>
<file name="kwatz.xom " size="43" project="jupite r"/>
<file name="paisley.d oc" size="988" project="neptun e"/>
<file name="ummagumma .zip" size="2441" project="mars"/>
<file name="schtroump f.txt" size="389" project="mars"/>
<file name="mondegree n.doc" size="1993" project="neptun e"/>
<file name="gadabout. pas" size="685" project="jupite r"/>
</files>
<xsl:template match="files">
<xsl:for-each-group select="file" group-by="@project">
<!-some code-->
</xsl:for-each-group>
</xsl:template>
but it gives a sentax error
'xsl:for-each-group ' can not be a child of 'files' element.
Can any one help me out ?
Thanks in advance.
Sandy.
Please reply on the same group.
How to do group by in XSLT ?
I tried on the following codes:
<files>
<file name="swablr.ep s" size="4313" project="mars"/>
<file name="batboy.wk s" size="424" project="neptun e"/>
<file name="potrzebie .dbf" size="1102" project="jupite r"/>
<file name="kwatz.xom " size="43" project="jupite r"/>
<file name="paisley.d oc" size="988" project="neptun e"/>
<file name="ummagumma .zip" size="2441" project="mars"/>
<file name="schtroump f.txt" size="389" project="mars"/>
<file name="mondegree n.doc" size="1993" project="neptun e"/>
<file name="gadabout. pas" size="685" project="jupite r"/>
</files>
<xsl:template match="files">
<xsl:for-each-group select="file" group-by="@project">
<!-some code-->
</xsl:for-each-group>
</xsl:template>
but it gives a sentax error
'xsl:for-each-group ' can not be a child of 'files' element.
Can any one help me out ?
Thanks in advance.
Sandy.
Please reply on the same group.
Comment