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

Re: Recursive Template ??

Subject: Re: Recursive Template ??
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Sun, 5 Jun 2005 07:41:44 +1000
recursive template definition
On 6/3/05, Bovy, Stephen J <STEPHEN.Bovy@xxxxxx> wrote:
> Thanks every-one !!
>
> Does it incur a heavy performance penalty ???

Compared to what?

For some problems it may be very difficult (if at all possible) to
have a non-recursive solution.

Also, often the non-recursive solution (if such exists) is much more
complex than the recursive one, more difficult to maintain and its
correctness more difficult to prove.

Why is this so? The answer is that the object on which an XSLT
transformation operates is the tree. A tree is a recursive structure,
having a recursive definition. Not surprisingly, recursion happens to
be a natural technique for processing recursive structures.

There are ways of writing recursive templates and functions that do
not incur *heavy* performance penalty (if any at all), such as:

    DVC (divide and conquer) and

    Tail Recursion.


Cheers,
Dimitre Novatchev

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.