Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Building a tree from path-like strings

From: Richard Lewis <richard.lewis@---------->
To:
Date: 1/6/2009 10:29:00 AM
On Saturday 03 January 2009 19:11:15 G. Ken Holman wrote:
> At 2009-01-03 18:38 +0000, Richard Lewis wrote:
> >Hi there,
> >
> >I'm trying to make a tree-hierarchic document from a flat
> >list of elements which have id-like values which define
> >the hierarchy I need.
> >
>
> A complete solution to your supplied data is below whose output
> matches what you specified, modulo some indentation controlled by
> the XSLT processor.
>
> Note my use of recursion, rather than re-application.  I felt
> that dealing with axes when applying templates would be more
> cumbersome than dealing with progressively smaller subsets of
> records.  Each subset is an ordered list.  The result is quite
> compact, and when dealing with recursion I often find the more
> compact the result the more robust it usually is ... once you
> start dealing with exceptions, problems can creep in
> unexpectedly.
>
> I hope this helps.
>
Thanks very much. That seems to do the trick, and worked when I 
integrating it into my actual application.

Richard
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard Lewis
ISMS, Computing
Goldsmiths, University of London
Tel: +44 (0)20 7078 5134
Skype: richardjlewis
JID: ironchicken@xxxxxxxxxxxxxxx
http://www.richard-lewis.me.uk/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+-------------------------------------------------------+
|Please avoid sending me Word or PowerPoint attachments.|
|http://www.gnu.org/philosophy/no-word-attachments.html |
+-------------------------------------------------------+


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent