Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: newbie reducing table columns newbie reducing table columnsTo: NULL Date: 4/9/2007 9:15:00 AM
Hello, I'm an xsl newbie, and I have this xsl code that is displaying a
table.
<?xml version="1.0" encoding="iso-8859-1" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- Create the table -->
<xsl:template match="/">
<html>
<body>
<table id="ResultTable" border="0" width="100%" cellspacing="0"
cellpadding="1" height="79">
<xsl:apply-templates/>
</table>
</body>
</html>
</xsl:template>
<!-- Create a header row -->
<xsl:template match="ADORecordset/Schema">
<tr bgcolor="#808080">
<xsl:apply-templates/>
</tr>
</xsl:template>
<!-- Add the header columns -->
<xsl:template match="ADORecordset/Schema/Field">
<td STYLE="font:normal normal normal 10pt Arial;color:#FFFFFF">
<b>
<xsl:value-of select="./@Name"></xsl:value-of>
</b>
</td>
<xsl:apply-templates/>
</xsl:template>
I want to reduce the number of columns by specifying only a subset of
columns. Is there a way to do something like this:
(this is pseudo-code)
if columnHeader == "Phone Number"
include this column
if columnHeader == "Address"
including this column
...
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
