Subject: Re: variable incrementing in XSLT -- XSLT spec
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Fri, 27 Jun 2003 20:45:42 +0200
|
"Mukul" <mukulw3@xxxxxxxxx> wrote in message
news:20030627161043.23348.qmail@xxxxxxxxxxxxxxxxxxxxxxxxxx
> Hello ,
> We all know that XSLT does not allow incrementing a
> variable after declaring it.
More precisely, this is not possible by definition.
> Myself and many of us
> fell that it a major handicap in writing programs
> easily in XSLT. To simulate the variables
Do not try to "simulate" updatable variables in XSLT -- you have to change
your way of thinking.
> we have to
> use recursion and many sophisticated techniques. If
> there is a feature of full scale variables in XSLT, it
> would make programming really easy.
If what you understand by "programming" is not easy in XSLT, then just do
not use XSLT or change your understanding on what "programming" is.
> I am curious why
> this restriction is imposed in XSLT specification.
Read any book on functional programming.
=====
Cheers,
Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|