Re: [xsl] Increment/decrement a variable in XSL

Subject: Re: [xsl] Increment/decrement a variable in XSL
From: Petr Cimprich <petr@xxxxxxxxxxxx>
Date: Thu, 04 Apr 2002 10:04:53 +0200
Hi Jeny,

Jeni Tennison wrote:


(I hope you weren't suggesting using something like saxon:assign or writing an extension function that updated a variable... ;)


I would use an external variable and a set of functions (increase, decrease, getValue) defined using the script element from the http://www.exslt.org/functions namespace.


I think when you want to increment/decrement a variable, you may be justified to escape to a procedural language and to increment/decrement a variable simply. XSLT is not designed for this task and all other ways are more or less workarounds, IMHO.

I see this is not a "pure XSLT" solution but I think it's appropriate for this non-XSLT task.

Petr

--
Petr Cimprich
Ginger Alliance
www.gingerall.com




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



Current Thread