This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Increment/decrement a variable in XSL


> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Petr Cimprich
> Sent: Thursday, April 04, 2002 10:05 AM
> To: xsl-list@lists.mulberrytech.com
> Subject: Re: [xsl] Increment/decrement a variable in XSL
>
>
> 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.

Following this line of argument it may be better not to use XSLT at all.

You *are* aware that using extension functions to change variable values not
only ties you to a specific extension, but also to a particular
implementation/version (execution order, variable evaluation order...)?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]