[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Making nested elements from elements with level attri

Subject: Making nested elements from elements with level attributes
From: Russell Urquhart <russurquhart1@xxxxxxxxxxx>
Date: Tue, 21 Sep 2010 23:56:56 -0500
 Making nested elements from elements with level  attri
Hi,

I have section elements that level attributes like the following:

<section level=1>
<paragraph>Test line</paragraph>
</section>
<section level=2>
<paragraph>Test line</paragraph>
</section>
<section level=2>
<paragraph>Test line</paragraph>
</section>
<section level=3>
<paragraph>Test line</paragraph>
</section>
<section level=4>
<paragraph>Test line</paragraph>
</section>
<section level=5>
<paragraph>Test line</paragraph>
</section>
<section level=3>
<paragraph>Test line</paragraph>
</section>


I would like to transfrom that to something like:

<section>
<paragraph>Test Line</paragraph>
<section>
<paragraph>...</paragraph>
</section>
<section>
<paragraph/>
<section>
<paragraph/>
<section>
<paragraph/>
<section>
<paragraph/>
</section>
</section>
<section>
<paragraph/>
</section>

Is there an elegant algorithim to do this, or am i looking at a recursive routine with a named template?

Thanks,


Russ
</section>

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.