Subject: [xsl] Re: Re: Unbounded element grouping/concatenation From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> Date: Thu, 11 Dec 2003 06:53:22 +0100 |
> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] how to estimate speed of , David Tolpin | Thread | [xsl] Xpath expression with conditi, Peter Mabley |
[xsl] group elements, Peter_Ivan | Date | Re: [xsl] traversing node by node i, ARULRAJ |
Month |