This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[newbie]use of xsl:if {RE: XSL to handle display mutiple pages}


Hi,

  I started working on XSL to handle display mutiple pages in HTML.  The
idea I tried was simple, count number of records until max records per page
reaches.  At that time, I close of the current page/table, add a page break
and start the next page/table.  But such logic seems does not seems to be
allowed in xsl blocks such as xsl:if.  What can be done to get around this
problem?
  Following is the XSL code I currently have problem with:

<xsl:for-each select="//item">  
<tr><!--Display item record here--></tr>
<xsl:param name="ItemCount" select="$ItemCount+1"/>
<xsl:if test="$ItemCount=$maxItemsPage">
	<!-- end this table and page -->
	</tbody>
	</table>
	<!-- add page break at end of page -->
	<div style='page-break-before: always'> </div>
	<!-- start the next page with new table -->
	<table width="100%" border="1" cellspacing="0">
	<xsl:apply-templates select="tableheader"/>
	<tbody>
</xsl:if>
</xsl:for-each>

Any pointer would be very much appreciated :)

Xiaocun Xu


-----Original Message-----
From: Xu, Xiaocun
To: 'XSL-List@mulberrytech.com'
Sent: 11/1/00 5:15 PM
Subject: XSL to handle display mutiple pages

Hi,

	I have a XML document that could have over 1,000 database
records,
and I would like to split them up to multiple pages for display
purposes,
with Prev and Next button to advance between the pages.  Are there
example
XSL that has this type of functionality?  If there are none, could
someone
give me some pointer how to achieve this?

Much thanks,

Xiaocun Xu
xxu@commercialware.com





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




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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]