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

Re: Is xsl:for-each "syntactic sugar"?

Subject: Re: Is xsl:for-each "syntactic sugar"?
From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx>
Date: Sat, 8 May 2010 07:50:10 +0530
Re:  Is xsl:for-each "syntactic sugar"?
thinking again about Roger's original question:

"for-each vs recursive functions"

I think, other than efficeincy reasons for selecting between these two
constructs, designer's select a construct because it's easier for them
to design a specific algorithm (and to realize the design, people
sometimes might go to extents like adding more memory or a faster
CPU).

Moreover, IMHO a code should be written, keeping in view that it will
be seen, and possibly maintained by other people. A recursive
implementation, for a recursive problem, is easily understood by
others!

IMHO, another point.. I generally wouldn't like to write a iterative
implementation (for efficiency benefits), if the computing resources I
have, could easily serve a recursive implementation for a recursive
problem.

To summarize the above thoughts,
efficiency concerns (space & time) and algorithm design, are 'traded
of' for different use-cases.

On Fri, May 7, 2010 at 4:32 AM, Costello, Roger L. <costello@xxxxxxxxx> wrote:
> Hi Folks,
>
> 1. Everything that can be done using xsl:for-each can be done using a recursive function. (True or False)
>
> 2. There are things that can be done using a recursive function that cannot be done using xsl:for-each. (True or False)
>
> 3. xsl:for-each is syntactic sugar. (True or False)
>
> 4. Favor recursive functions over xsl:for-each. (True or False)
>
> /Roger



-- 
Regards,
Mukul Gandhi

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.