[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

Subject: Re: Help needed in recursively converting the flat xml to a heirarchical XML
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 26 Mar 2004 18:20:45 -0500
boiling down the problem
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
======================================================================

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