Subject: Re: [xsl] Building a tree from path-like strings From: Richard Lewis <richard.lewis@xxxxxxxxxx> Date: Tue, 6 Jan 2009 10:28:54 +0000 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Building a tree from path, G. Ken Holman | Thread | Re: [xsl] Building a tree from path, Dimitre Novatchev |
RE: [xsl] CDATA Handling, Michael Kay | Date | Re: [xsl] CDATA Handling, Andrew Welch |
Month |