PHP Classes

File: PHPReportDoc.xsl

Recommend this page to a friend!
  Classes of Eustaquio Rangel de Oliveira Jr.   phpreports   PHPReportDoc.xsl   Download  
File: PHPReportDoc.xsl
Role: Auxiliary data
Content type: text/plain
Description: Document layer transformation
Class: phpreports
Report Generator
Author: By
Last change:
Date: 21 years ago
Size: 2,721 bytes
 

Contents

Class file image Download
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- Make code to generate the document object Also included HEADER and FOOTER on this file --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template name="MAKE_DOCUMENT"> // this is the customized document object for this report class PHPRepoDoc_ extends PHPRepoDoc { // don't print nothing here function getFormattedRow() { } // prints customized header for this document object function printHeader( $oValue ) { $header = $oValue; // nice way to refer to header data ;-) <xsl:if test="count(/REPORT/DOCUMENT/HEADER)>0"> <xsl:text>print &quot;&lt;table </xsl:text> <xsl:apply-templates select="/REPORT/DOCUMENT/HEADER"/> <xsl:text>&gt;&quot;;&#10;</xsl:text> <xsl:call-template name="MAKE_DOC_HEADER"/> <xsl:text>&#9;&#9;&#9;&#9;print &quot;&lt;/table&gt;&quot;;&#10;</xsl:text> <xsl:text>&#9;&#9;&#9;&#9;print &quot;&lt;br clear='all'/&gt;&lt;br/&gt;&quot;;&#10;</xsl:text> <!-- <xsl:text>&#9;&#9;&#9;&#9;print &quot;&lt;p class='breakhere'&gt;&lt;/p&gt;&quot;;</xsl:text> //--> </xsl:if> <xsl:text>&#10;&#9;&#9;&#9;}&#10;</xsl:text> // prints customized footer for this document object function printFooter( $oValue ) { <xsl:if test="count(/REPORT/DOCUMENT/FOOTER)>0"> <xsl:text>print &quot;&lt;table </xsl:text> <xsl:apply-templates select="/REPORT/DOCUMENT/FOOTER"/> <xsl:text>&gt;&quot;;&#10;</xsl:text> <xsl:call-template name="MAKE_DOC_FOOTER"/> <xsl:text>&#9;&#9;&#9;&#9;print &quot;&lt;/table&gt;&quot;;&#10;</xsl:text> <xsl:text>&#9;&#9;&#9;&#9;print &quot;&lt;br clear='all'/&gt;&lt;br/&gt;&quot;;&#10;</xsl:text> <!-- <xsl:text>&#9;&#9;&#9;&#9;print &quot;&lt;p class='breakhere'&gt;&lt;/p&gt;&quot;;</xsl:text> //--> </xsl:if> <xsl:text>&#10;&#9;&#9;&#9;}&#10;&#9;&#9;}&#10;</xsl:text> </xsl:template> <!-- Document header --> <xsl:template name="MAKE_DOC_HEADER"> <xsl:for-each select="/REPORT/DOCUMENT/HEADER/ROW"> <xsl:text>&#9;&#9;&#9;&#9;print &quot;&lt;tr&gt;&quot;;&#10;</xsl:text> <xsl:for-each select="COL"> <xsl:call-template name="MAKE_COL"/> </xsl:for-each> <xsl:text>&#9;print &quot;&lt;/tr&gt;&quot;;&#10;</xsl:text> </xsl:for-each> </xsl:template> <!-- Document footer --> <xsl:template name="MAKE_DOC_FOOTER"> <xsl:for-each select="/REPORT/DOCUMENT/FOOTER/ROW"> <xsl:text>&#9;&#9;&#9;&#9;print &quot;&lt;tr&gt;&quot;;&#10;</xsl:text> <xsl:for-each select="COL"> <xsl:call-template name="MAKE_COL"/> </xsl:for-each> <xsl:text>&#9;print &quot;&lt;/tr&gt;&quot;;&#10;</xsl:text> </xsl:for-each> </xsl:template> </xsl:stylesheet>