[xsl] breaking display data into tables

Subject: [xsl] breaking display data into tables
From: Devan Govender <Devan.Govender@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Jul 2001 12:03:36 +0200
<xsl:template match="BILLING">
    <xsl:call-template name="BILLING_TEMP">    
      <xsl:with-param name="counter" select="1"/>  
      <xsl:with-param name="counting" select="10"/>
      <xsl:with-param name="lastpos" select="0"/>        

<xsl:template name="BILLING_TEMP">
  <xsl:param name="counter"/>  
  <xsl:param name="counting"/>  
  <xsl:param name="lastpos"/> 
  <xsl:variable name="thebillingcount">
  <xsl:if test="position(//BILLING_ITEM) &lt;= count(//BILLING_ITEM)">
    <table width="817" BORDER="1" CELLSPACING="0" CELLPADDING="0"
      <xsl:for-each select="BILLING_ITEM[position(//BILLING_ITEM) &lt;=
$counting and position(//BILLING_ITEM) &gt; $lastpos and
position(//BILLING_ITEM) &lt;= count(//BILLING_ITEM)]">
          <td WIDTH="191"> <xsl:value-of
select="count(//BILLING_ITEM)"/> </td>
          <td WIDTH="191"> <xsl:value-of
select="position(//BILLING_ITEM)"/> </td>
          <td WIDTH="191"> <xsl:value-of select="$lastpos"/> </td>
          <td WIDTH="62"><font face="Verdana" size="1">  <xsl:value-of
select="EMPLOYEE_NO"/> </font></td>  
          <td WIDTH="89"><font face="Verdana" size="1"> <xsl:value-of
select="CONTRACT"/> </font></td>
          <td WIDTH="191"><font face="Verdana" size="1" align="CENTER"> 
<xsl:value-of select="MEMBER_NAME"/> </font></td>          
   <xsl:if test="position(//BILLING_ITEM)+1 &lt;=
     <xsl:call-template name="BILLING_TEMP">    
      <xsl:with-param name="counter" select="1"/>  
      <xsl:with-param name="counting" select="$counting + 10"/> 
      <xsl:with-param name="lastpos" select="$counting"/>      

The above code breaks my xml data into tables of 10 items each.
It is however very slow.
Any ideas on how I can improve performance ???
"I count religion but a childish toy, and hold there is no sin but 
ignorance." -Christopher Marlowe, 1592

"HEAVEN does'nt want me & HELL is afraid I'll take over"


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread