Subject: RE: [xsl] Is xsl:for-each "syntactic sugar"? From: "Markus Karg" <karg@xxxxxxxxx> Date: Fri, 7 May 2010 08:27:18 +0200 |
> 1. Everything that can be done using xsl:for-each can be done using a > recursive function. (True or False) This is not true since in reality the stack size limiting the number of recursions is much more limited than the width of your CPU limiting the number of iterations. So you can do much more loops than iterations. Also, xsl:for-each is much easier to understand than a potentially complex recursive function (you SEE that it is a loop, while you have NOTICE that it is recursive). Also, xsl:for-each can (in theory) be implemented using parallel execution (multiple cores) while recursion necessarily must be a single core as it is up to the coder where / when in his particular algorithm the recursive call takes place. > 3. xsl:for-each is syntactic sugar. (True or False) False, see above. > 4. Favor recursive functions over xsl:for-each. (True or False) Totally wrong, as it is much more complex to read and understand as a simple loop. Regards Markus
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] stack usage in for-each a, Dimitre Novatchev | Thread | Re: [xsl] Is xsl:for-each "syntacti, David Carlisle |
Re: [xsl] Need help with function t, Dan Haley | Date | Re: [xsl] Is xsl:for-each "syntacti, David Carlisle |
Month |