Home RSS 2.0 ATOM 1.0  CDF  
 
CodeSegment - Carlos Segura Sanz (blog)
 

This is a small xml stylesheet to render a generic table with the data collected from csegRollUp, and it's ideal for debug purposes.

<?xml version="1.0" encoding="utf-8"?>
 
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
  <xsl:template match="Rows">
    <xsl:call-template name="Tabla"/>
  </xsl:template>
 
  <!-- Tabla -->
  <xsl:template name="Tabla">
    <table width="100%" cellpading="1">
      <tbody>
      <xsl:call-template name="Cabeceras" />
      <xsl:for-each select='Row'>
        <tr>
          <xsl:for-each select=".//*">
            <td class="ms-vb2">
              <xsl:value-of select="."/>
            </td>
          </xsl:for-each>
        </tr>
      </xsl:for-each>
      </tbody>
    </table>
  </xsl:template>
  
  <!-- Cabeceras de la tabla -->
  <xsl:template name="Cabeceras">
    <tr>
      <xsl:for-each select="Row[1]/*">
        <th nowrap=""  class="ms-vh2">
          <xsl:value-of select="name()"/>
        </th>
      </xsl:for-each >
    </tr>
  </xsl:template>
  
</xsl:stylesheet> 

Now I'm finishing the new version 3.5. There is a beta in the forums.

 

Comments are closed.

Copyright © 2008 Carlos Segura. All rights reserved.