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

Re: Building a tree from path-like strings

Subject: Re: Building a tree from path-like strings
From: Richard Lewis <richard.lewis@xxxxxxxxxx>
Date: Tue, 6 Jan 2009 10:28:54 +0000
Re:  Building a tree from path-like strings
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 |
+-------------------------------------------------------+

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-2011 All Rights Reserved.