Subject: Re: [xsl] !!!counters in XSL!!! From: tcn@xxxxxxxxxxxxx (Trevor Nash) Date: Thu, 05 Apr 2001 10:16:14 GMT |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] !!!counters in XSL!!!, Ignacio J. Ortega | Thread | Re: [xsl] !!!counters in XSL!!!, Alexey Gokhberg |
RE: [xsl] XSL vs. JSP, Nick Vincent | Date | Re: [xsl] Handling  , Lee Goddard |
Month |