[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: Tue, 7 Nov 2000 23:19:43 -0500
xsl variable display
Thanks for the clarafication :)

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?

Much thanks,
Xiaocun

-----Original Message-----
From: Mike Brown
To: xsl-list@xxxxxxxxxxxxxxxx
Sent: 11/7/00 7:08 PM
Subject: Re: xsl:variable {RE: XSL to handle display mutiple pages}

Xu, Xiaocun wrote:
> 	I read in the book that once set, xsl:variable is non-changable.

Correct, for as long as the variable is in scope. When/where the
variable
goes out of scope, you can assign it to something else.

> How do I have a changable variable, xsl:param?

No, xsl:param lets you assign a default value. It is usually used in
conjuction with xsl:with-param to pass a value to a template where the
variable would have otherwise been out of scope.

Understand that a variable is a *name* assigned to an *object* of one of
the basic types: boolean, number, string, node-set, result tree
fragment.
When we talk about a variable's "value" we usually mean the object,
because a variable's "string-value" is the object's string-value, and is
a
distinct concept.

xsl:variable or xsl:param just provide ways to bind a name to an object.
Once such a binding is made, you cannot bind the variable to another
name.

What is it you are trying to do? Chances are, you are trying to do
procedural programming in a functional, declarative language, and
there's
another way to accomplish the same result that doesn't rely on variable
rebinding.

   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at         My XML/XSL resources:
webb.net in Denver, Colorado, USA           http://www.skew.org/xml/


 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.