At 08:13 PM 7/15/2005, you wrote:
On 7/15/05, Dariusz Borowski <d(_dot_)borowski(_at_)web(_dot_)de> wrote:
>
> Hey there!
>
> Is it possible to build an increment in xsl like in Java?
XPath is a language designed to be imbedded into
functional/declarative languages.
In functional/declarative languages variables can only be initialised
and their value cannot be changed (re-assigned).
Therefore, it is by design that XPath does not support re-assigning
value to a variable and thus the Java-like (imperative language)
increment style that you most probably were after.
Welcome to a better world! :o)
To gloss Dimitre -- what he says is correct. The effect of having a
variable with an updateable value can generally be "simulated", however;
and this is not always a bad thing to do. Such cases are exceptions,
however, to the rule that in XSLT not only *may* you not, but also you
*should* not, have to work this way.
It's a better world because the alternative techniques one learns turn out
to be both easier to manage, and more powerful, than the imperative
approach one learns to forsake.
Cheers,
Wendell
======================================================================
Wendell Piez
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--