Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


newbie reducing table columns

From: sean nakasone <seannakasone@-----.--->
To: 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
...




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent