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
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,

-----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
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
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
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

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

   - Mike
Mike J. Brown, software engineer at         My XML/XSL resources: in Denver, Colorado, USA 

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread