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

Re: !!!counters in XSL!!!

Subject: Re: !!!counters in XSL!!!
From: tcn@xxxxxxxxxxxxx (Trevor Nash)
Date: Thu, 05 Apr 2001 10:16:14 GMT
counters in xslt
On Thu, 5 Apr 2001 11:36:25 +0200, you wrote:

>> can anyone please tell me whether you can have counters in 
>> XSL? I mean I
>> want to increment a variable each time I go into a certain 
>> for-each loop.
>> 
>
>Hola a todos, Rosa:
>
>Some time ago i've developed a way to do simple interations with no
>recursivity, only valid for short numbers of iterations  useful for  i.e
>months..
>
>...

Please, spend the time to learn XSLT properly.  Many of these problems
can be easily solved with a correct understanding of things like
position() and xsl:number.  Where those do not work, a recursive
solution is often best.  You may have learned from other languages
that recursion is bad: this is NOT true for XSL.  The language is
carefully designed so that the XSLT processor can convert what you
write as recursion into a loop.

Follow the links on the web site you see quoted on all messages on
this list, or look at Mike Kays book XSLT programmers reference.
There you will find many examples of how to do these things in a way
that is both efficient and easy to understand.

I wonder if there is a market for a transformation engine that lets
you write the spec in Fortran ;-)

Best Regards,
Trevor Nash

 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.