<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Make code to generate the page object
Includes the page header and footer
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template name="MAKE_PAGE">
// this is the customized page object for this report
class PHPRepoPage_ extends PHPRepoPage {
// prints customized header for this page object
function printHeader( $oValue ) {
$header = $oValue; // nice way to refer to header data ;-)
<xsl:text>print "<table </xsl:text>
<xsl:apply-templates select="/REPORT/PAGE"/>
<xsl:text>>"; </xsl:text>
<xsl:call-template name="MAKE_PAGE_HEADER"/>
<xsl:text>			} </xsl:text>
// prints customized footer for this page object
function printFooter( $oValue, $bJump=true ) {
<xsl:call-template name="MAKE_PAGE_FOOTER"/>
<xsl:text> 			} 		} </xsl:text>
</xsl:template>
<!--
Page header
-->
<xsl:template name="MAKE_PAGE_HEADER">
<xsl:for-each select="/REPORT/PAGE/HEADER/ROW">
<xsl:text>				print "<tr>"; </xsl:text>
<xsl:for-each select="COL">
<xsl:call-template name="MAKE_COL"/>
</xsl:for-each>
<xsl:text> 				print "</tr>"; </xsl:text>
</xsl:for-each>
</xsl:template>
<!--
Page footer
-->
<xsl:template name="MAKE_PAGE_FOOTER">
<xsl:for-each select="/REPORT/PAGE/FOOTER/ROW">
<xsl:if test="position()>1">
<xsl:text>				</xsl:text>
</xsl:if>
<xsl:text>print "<tr>"; </xsl:text>
<xsl:for-each select="COL">
<xsl:call-template name="MAKE_COL"/>
</xsl:for-each>
<xsl:text> 				print "</tr>"; </xsl:text>
</xsl:for-each>
<xsl:text>				print "</table>"; </xsl:text>
<!-- test if there is a document footer - if so, dont break lines -->
<xsl:if test="count(/REPORT/DOCUMENT/FOOTER)<=0">
<xsl:text>				print "<br clear='all'/><br/>"; </xsl:text>
</xsl:if>
<xsl:text>				if($bJump) </xsl:text>
<xsl:text>					print "<p class='breakhere'></p>"; </xsl:text>
</xsl:template>
</xsl:stylesheet>
|