Re: XML XSLT Table display



This question isn't related to sqlserver; wrong newsgroup...

However, the xslt to do this is trivial (after you've fixed your
malformed xml) - see below.

Marc

<?xml version="1.0" encoding="utf-8"?>
<xsl:style*** version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
exclude-result-prefixes="msxsl">

<xsl:output method="html"/>
<xsl:template match="ITEMLIST">
<table>
<tr>
<th></th>
<th>Price</th>
<th>Location</th>
<th>Quantity</th>
</tr>
<xsl:apply-templates select="ITEM"/>
</table>
</xsl:template>
<xsl:template match="ITEM">
<tr>
<td><xsl:value-of select="NAME"/></td>
<td><xsl:value-of select="PRICE"/></td>
<td><xsl:value-of select="LOCATION"/></td>
<td><xsl:value-of select="QTY"/></td>
</tr>
</xsl:template>
</xsl:style***>


.


Loading