xsl-list
[Top] [All Lists]

Re: [xsl] Character Report Overflow Pages

2007-06-07 08:48:05
This is the part where someone points out my mistakes ;-)

The only bit I wasn't sure of was your use for the parameter
headerData (i've hardcoded a value)....



<?xml version="1.0" encoding="iso-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
 <xsl:output method="html" />
<xsl:template match="/">
<html>
 <xsl:apply-templates mode="page" select="/" />
 </html>
 </xsl:template>
<xsl:template match="/ROWSET/ROW" mode="page">
 <xsl:param name="headerData" />
 <xsl:param name="start" select="1" />
 <xsl:param name="range" select="5" />
 <xsl:param name="end" select="$start + $range" />
<tr>
 <xsl:apply-templates mode="header" select="HEADERDATA" />
 </tr>
<table border="1">
 <xsl:apply-templates mode="body"
select="HEADERDATA/TRANSACTIONS/RX_TRANSACTIONS[$start <=position()
and position() <$end ]" />
 </table>
<xsl:if test="$end < count(HEADERDATA/TRANSACTIONS/RX_TRANSACTIONS)">
<xsl:apply-templates mode="page" select=".">
 <xsl:with-param name="start" select="$end + 1" />
 </xsl:apply-templates>
 </xsl:if>
 </xsl:template>
<xsl:template mode="header" match="*">
<td>
 <xsl:value-of select="SOC_SEQNO" />
 </td>
<td>
 <xsl:value-of select="ACCOUNT_NO" />
 </td>
<td>
 <xsl:value-of select="SUB_ACCOUNT" />
 </td>
<td>
 <xsl:value-of select="SHORT_NAME" />
 </td>
<td>
 <xsl:value-of select="FORMATTED_ACCOUNT_NO" />
 </td>
 </xsl:template>
<xsl:template mode="body" match="*">
<tr>
<td>
 <xsl:value-of select="DESCRIPTION" />
 </td>
<td>
 <xsl:value-of select="TRANSACTION_DATE" />
 </td>
 </tr>
 </xsl:template>
 </xsl:stylesheet>

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--