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

Re: Re: Unbounded element grouping/concatenation

Subject: Re: Re: Unbounded element grouping/concatenation
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Thu, 11 Dec 2003 06:53:22 +0100
ramaan
> Dimitre, could you help me with a DVC algorithm for what I'm trying
> to do? I'm not sure how to apply it to this problem.
>
> Cheers,
> Ramaan

Ramaan,

I don't have a good idea of what exactly recursive algorithm you have to
solve this problem.

It seems to me that such a recursive algorithm would process the immediate
following while it is of type="continuation".

If this is not the case, please, let me know what exact algorithm you are
using and then it would be possible to consider re-writing it in the DVC
style.

If this is the case, I think DVC cannot be used here, as the length of the
list is not known in advance.

To put it in other words, this is not a recursion that processes the
elements of a *known* list, but one that scans a list to find a specific
element (in this case record with type="normal").

Often something like binary search can be used to speed up such linear
recursion, but I don't know if this can be used in this specific case.

So, it seems that on non-trivial (very short) inputs recursion will not be
faster than the non-recursive method you used. The recursive algorithm could
be fast if it used tail recursion and this was optimized by the XSLT
processor you're using. From another thread in this list it appears that
only Saxon and JD provide some (undefined) form of tail-recursion
optimization.



=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.