[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: Re: Re: Increment/decrement a variable in XSL

Subject: Re: Re: Re: Re: Increment/decrement a variable in XSL
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Thu, 4 Apr 2002 06:05:36 -0800 (PST)
xsl variable increment
Petr Cimprich <petr at gingerall dot cz> wrote:

> Dimitre Novatchev wrote:
> 
> >While I'm not a fan of EXSL, I feel offended for them -- they never
> >intended to propose extension functions for incrementing an
> >xsl:variable -- or am I wrong Jeny?
> >
> 
> Frankly, I'm not sure about intentions of EXSLTers, but since both WD

> 1.1 and 2.0 introduce an additional type of external object to be 
> used with extensions, the idea of mutable variable isn't so 
> surprising to me. 
> xsl:variable can either be bound to an external object with one or 
> more mutable properties or you don't need xsl:variable at all. Nobody

> speaks of incrementing an xsl:variable.

Then why the subject says exactly this?

And even in case the xsl:variable points to an external mutable object,
the xsl:variable itself is not mutable -- this is by definition.

> >Incrementing a variable is not a non-XSLT problem due to two
reasons:
> >
> >1. It is not "non-XSLT" XSLT -- programmers write nice programs
while
> >still being able to have the right values in the right xsl:variables
> >
> 
> Speaking of intentions, is it what XSLT has been intended for?

The "lack" of mutable variables in XSLT is not a lack of a feature, but
it is a feature -- in fact ***the feature*** that makes XSLT such an
elegant language.

> I'm not advocating extensions or mutable variables/properties. My 
> point is that there may be situations, where the extension approach 
> can be more convenient than recursive calls of templates or other 
> solutions, such as data preprocessing. Depends on what are
priorities.

Extensions can be handy when there's something, that cannot be done in
pure XSLT. Using extensions in XSLT is not a matter of convenience but
one of necessity. 

In case extensions are purely a matter of convenience for someone, then
they definitely should not use XSLT at all, but pure Javascript or
whatever else.

Even when extensions are necessary, they should be used with caution,
because (as Julian already pointed) they bring side effects into a
language that is supposed to be side effects free.


Cheers,
Dimitre Novatchev.

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

 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.