Re: XML XSLT Table display
- From: "Marc Gravell" <marc.gravell@xxxxxxxxx>
- Date: Mon, 7 Jan 2008 08:45:10 -0000
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***>
.
- References:
- XML XSLT Table display
- From: Pradeep
- XML XSLT Table display
- Prev by Date: XML XSLT Table display
- Next by Date: Re: openxml question
- Previous by thread: XML XSLT Table display
- Next by thread: Re: XML XSLT Table display
- Index(es):
Loading