|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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 | +-------------------------------------------------------+
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






