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

RE: xsl:variable {RE: XSL to handle display mutiple pages}

Subject: RE: xsl:variable {RE: XSL to handle display mutiple pages}
From: "Xu, Xiaocun" <XXu@xxxxxxxxxxxxxxxxxx>
Date: Thu, 9 Nov 2000 12:23:06 -0500
xsl variable display
Hi,

	Thanks for Jeni and Mike's suggestions on different variable values.
Yeah, the code I had (based on Jeni's code) generating the pages all at
once, so it was not straight-forward to apply multiple variables.  I
eventually used Mike's suggestion of parameter passing to templates to
resolve the problem I had.

Thank you both for the suggestions :)

Xiaocun Xu
xxu@xxxxxxxxxxxxxxxxxx



> -----Original Message-----
> From: Jeni Tennison [mailto:mail@xxxxxxxxxxxxxxxx]
> Sent: Wednesday, November 08, 2000 5:49 AM
> To: Xu, Xiaocun
> Cc: 'xsl-list@xxxxxxxxxxxxxxxx '
> Subject: Re[2]: xsl:variable {RE: XSL to handle display mutiple pages}
> 
> 
> Xiaocun,
> 
> > This is related to the pagination problem I had earlier.  
> Since my first
> > page has header, it can only contain 50 lines, while the 
> latter page can
> > contain 60 lines.  So I want to set $maxItemsPage to be 50 
> for the first
> > page, and 60 for the following pages.
> >
> > What is the easier way to achieve this?
> 
> Have two parameters:
> 
> <xsl:param name="maxItemsFirstPage" select="50" />
> <xsl:param name="maxItemsOtherPages" select="60" />
> 
> and choose which of those values to use according to which page you're
> generating. I forget whether you're generating the pages all at once
> or different ones with each process, but if the latter you could use a
> global variable, for example:
> 
> <xsl:param name="current-page" select="3" />
> 
> <xsl:variable name="maxItemsPage">
>   <xsl:choose>
>     <xsl:when test="$current-page = 1">
>       <xsl:value-of select="$maxItemsFirstPage" />
>     </xsl:when>
>     <xsl:otherwise>
>       <xsl:value-of select="$maxItemsOtherPages" />
>     </xsl:otherwise>
>   </xsl:choose>
> </xsl:variable>
> 
> I hope that helps,
> 
> Jeni
> 
> ---
> Jeni Tennison
> http://www.jenitennison.com/
> 
> 


 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.