Subject: Re: [xsl] Functional Programming: How do I convert an xsl:for-each loop into a functional style? From: Andrew Welch <andrew.j.welch@xxxxxxxxx> Date: Thu, 21 Jan 2010 13:03:38 +0000 |
> <xsl:for-each select="Number"> > <xsl:value-of select="sum((., preceding-sibling::Number))" /> > </xsl:for-each> > > Can this code be executed in any order? Yes, for example: <Number>1</Number> <Number>2</Number> <Number>3</Number> Imagine the processor uses 1 thread per item to be processed, so three threads in this example. Each thread goes off, does its thing independently of the other threads, and stores the result. The processor then takes the result of each thread, and adds it to the result tree in document order. -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Functional Programming: H, David Carlisle | Thread | Re: [xsl] Functional Programming: H, Dimitre Novatchev |
Re: [xsl] Functional Programming: H, David Carlisle | Date | Re: [xsl] Functional Programming: H, Dimitre Novatchev |
Month |