gizzmo_gadget
11-30-2005, 08:51 PM
Heya
BAsically I have an asp page which generates XML based on my SQL query.
I have applied a stylsheet and everything is working fine.
I want the user to be able to sort the output in alphabetical order by clicking in the header of each column. Eg. by manufacturer or year
Also, I want to disaplay a thumbnail image next to each record.
For example where modelno=Manitou22 display manitou22.jpg. next to it.
and where modelno=Manitou23 disaply manitou23.jpg etc.
So basically displaythe corresponding picture depending in the modelno. The pictures are all stored in the same folder as the xml & xsl.
Any help is greatly appreciated. Many THanks in advance.
---------------------------------------------------------------
My XSL code:
<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/">
<html>
<body>
<table border="1">
<tr>
<th align="left">ModelNo</th>
<th align="left">Year</th>
<th align="left">Manufacturer</th>
<th align="left">Supplier</th>
</tr>
<xsl:for-each select="Machines/Stock">
<tr>
<td><xsl:value-of select="modelno"/></td>
<td><xsl:value-of select="year"/></td>
<td><xsl:value-of select="manufacturer"/></td>
<td><xsl:value-of select="supplier"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template></xsl:stylesheet>
BAsically I have an asp page which generates XML based on my SQL query.
I have applied a stylsheet and everything is working fine.
I want the user to be able to sort the output in alphabetical order by clicking in the header of each column. Eg. by manufacturer or year
Also, I want to disaplay a thumbnail image next to each record.
For example where modelno=Manitou22 display manitou22.jpg. next to it.
and where modelno=Manitou23 disaply manitou23.jpg etc.
So basically displaythe corresponding picture depending in the modelno. The pictures are all stored in the same folder as the xml & xsl.
Any help is greatly appreciated. Many THanks in advance.
---------------------------------------------------------------
My XSL code:
<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/">
<html>
<body>
<table border="1">
<tr>
<th align="left">ModelNo</th>
<th align="left">Year</th>
<th align="left">Manufacturer</th>
<th align="left">Supplier</th>
</tr>
<xsl:for-each select="Machines/Stock">
<tr>
<td><xsl:value-of select="modelno"/></td>
<td><xsl:value-of select="year"/></td>
<td><xsl:value-of select="manufacturer"/></td>
<td><xsl:value-of select="supplier"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template></xsl:stylesheet>