[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Help needed in recursively converting the flat xml
Sridhar,
I'm afraid I don't have time to provide a worked-out solution, largely because without boiling down the problem to its essentials, I can't construe the exact nesting logic you require. I can suggest, however, that you don't need recursion. Rather, you can use keys to associate the nodes you need nested with those they need to be nested with. Commonly with this type of problem, this association is done either by nodes' proximity (e.g. all <p> elements with their closest preceding <head> element, to nest them into sections), or by values such as attribute values (which I think you could use). Check out the FAQ page at http://www.dpawson.co.uk/xsl/sect2/flatfile.html, where this technique is demonstrated in several different scenarios. If it isn't readily apparent to you how you can construct keys to induce the required nested structures, please post again, perhaps with a bit of explanation of what the exact grouping (nesting) requirements are for your data, to help us with the analysis. (This is actually a kind of grouping problem, after all.) Good luck, Wendell At 05:46 PM 3/26/2004, you wrote: I am trying to arrange the following flat XML into a heirarchical XML File using recursion. Since I am a beginner in XSL, I need someone to help out in this task. ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
|
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
|