[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: breaking display data into tables

Subject: RE: breaking display data into tables
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Fri, 13 Jul 2001 11:54:28 +0100
displaying data in tables
What processor are you using:

  <xsl:if test="position(//BILLING_ITEM) &lt;= count(//BILLING_ITEM)">

is an error that should be reported. The position() function takes no
arguments.

I don't know what you think this means; but in any event, the first thing
I'd suggest is to put count(//BILLING_ITEM) into a global variable - if the
processor is allowing sloppy syntax through, then it probably isn't doing
anything very clever like spotting common subexpressions.

Mike Kay
Software AG

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Devan
> Govender
> Sent: 13 July 2001 11:04
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  breaking display data into tables
>
>
> <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:call-template>
> </xsl:template>
>
> <xsl:template name="BILLING_TEMP">
>   <xsl:param name="counter"/>
>   <xsl:param name="counting"/>
>   <xsl:param name="lastpos"/>
>   <xsl:variable name="thebillingcount">
>
>   </xsl:variable>
>   <xsl:if test="position(//BILLING_ITEM) &lt;= count(//BILLING_ITEM)">
>     <table width="817" BORDER="1" CELLSPACING="0" CELLPADDING="0"
> bordercolor="#F0C0C0">
>       <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)]">
>         <tr>
>           <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>
>         </tr>
>       </xsl:for-each>
>     </table>
>
>    <xsl:if test="position(//BILLING_ITEM)+1 &lt;=
> count(//BILLING_ITEM)">
>      <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"/>
>      </xsl:call-template>
>    </xsl:if>
>   </xsl:if>
> </xsl:template>
>
>
> 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"
>
> DEVAN GOVENDER
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.