hi,
here ouput is the clear. Please verify in ur xml and xsl coding.
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="group.xsl"?>
<group>
<categorylist>
<category>car</category>
<description>bently</description>
</categorylist>
<categorylist>
<category>car</category>
<description>bmw</description>
</categorylist>
<categorylist>
<category>computer</category>
<description>dell</description>
</categorylist>
</group>
Simply copy and paste this coding for out put
------------------------------------------------------
group.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="ISO-8859-1" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"/>
<xsl:variable name="group" select="//categorylist"/>
<!-- Define keys used to group elements -->
<xsl:key name="keyCategory" match="categorylist" use="category"/>
<xsl:key name="keyDescription" match="categorylist" use="description"/>
<xsl:template match="/">
<html>
<head>
<title>Cengage Production Report</title>
</head>
<body>
<center>**************************************** </center>
<center>
<font size="6" color="brown">PreMedia Global P. Ltd.</font>
</center>
<center>**************************************** </center>
<center>
<font size="4" color="blue">Cengage Production Report</font>
</center>
<br/>
<table width="100%" frame="box" border="2" align="center">
<tbody>
<xsl:apply-templates/>
</tbody>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="group" name="ShowproductionsInTeam">
<xsl:for-each select="$group">
<xsl:variable name="category" select="category"/>
<xsl:variable name="description" select="description"/>
<xsl:if test="generate-id(.)=generate-id($group[category=$category])">
<tr>
<th><xsl:value-of select="category"/></th>
</tr>
</xsl:if>
<tr>
<td><xsl:value-of select="description"/></td>
</tr>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Reply me if ouput clear
Regards
vinoth K
Thank you very much for your response. For some reason, its not working for me. I am not sure why. Any idea? I checked several times to make sure I don't have any typo or anything but still no luck.