By using an XSL document I'm able to put the XML data output in to a table, fine there.
Now I need to group the training dates according to company.
here's my XML dump
<companycourses>
<course courseid ="1">
<title>MS Windows</title>
<vendor>Microsoft</vendor>
<status>fully booked</status>
<fromdate>01/03/2005</fromdate>
<todate>05/03/2005</todate>
</course>
<course courseid ="2">
<title>MS Excel</title>
<vendor>Microsoft</vendor>
<status>available</status>
<fromdate>15/03/2005</fromdate>
<todate>17/03/2005</todate>
</course>
<course courseid ="3">
<title>Dreamweaver</title>
<vendor>Macromedia</vendor>
<status>fully booked</status>
<fromdate>01/03/2005</fromdate>
<todate>05/03/2005</todate>
</course>
</companycourses>
here's the XSL doc
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xslutput method="html"/>
<xsl:template match="/">
<html>
<head><title>Training Courses</title></head>
<body bgcolor="white">
<h1>Training courses</h1>
<TABLE BORDER="1" CELLSPACING="0" CELLPADDING="5">
<TR>
<TD ROWSPAN="2">Vendor</TD>
<TD ROWSPAN="2">Course Title </TD>
<TD COLSPAN="2">Date</TD>
<TD ROWSPAN="2">Status</TD>
</TR>
<TR>
<TD>From</TD>
<TD>To</TD>
</TR>
<xsl:apply-templates/>
</TABLE>
</body>
</html>
</xsl:template>
<xsl:template match="course">
<TR>
<TD><xsl:value-of select="vendor"/></TD>
<TD><xsl:value-of select="title"/></TD>
<TD><xsl:value-of select="fromdate"/></TD>
<TD><xsl:value-of select="todate"/></TD>
<TD><xsl:value-of select="status"/></TD>
</TR>
</xsl:template>
</xsl:stylesheet>
At the moment all the courses get outputted but I need them to be grouped according to Vendor, so all the Microsoft courses will output to one table and Macromedia courses to another. Any clues?

