xsl-list
[Top] [All Lists]

Re: Increment a variable

2005-08-18 01:43:50

      How can I achieve following c++ code in XSLT.

use an extension function that allows you to call out to an external
program writen in C++.

XSL variables, like variables in other declarative languages, and in
mathematics, denote values not memory locations, so you can't
"increment" a variable, as that really means "change the value stored
in the memory location denoted by the variable".

Typically you do for(int i=0;i<1000;i++) in C to iterate over the 1000
elements of some array. In XSL you don't need to go to such contortions:
If you want to iterate over all the nodes in a node set, you just say
that explictly, xsl:for-each select="...

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--~------------------------------------------------------------------
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>
--~--



<Prev in Thread] Current Thread [Next in Thread>