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(_at_)jabber(_dot_)earth(_dot_)li
http://www.richard-lewis.me.uk/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+-------------------------------------------------------+
|Please avoid sending me Word or PowerPoint attachments.|
|http://www.gnu.org/philosophy/no-word-attachments.html |
+-------------------------------------------------------+
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--