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

nesting non-nested nodes

Subject: nesting non-nested nodes
From: Andrew Borsz <andrew@xxxxxxxxxxxxxxx>
Date: Tue, 7 Jun 2005 10:48:49 -0400
andrew borsz
Hello all,
I searched the archives for an answer to this, but I'm not sure how best to describe what I'm looking for. Sorry if this question has been asked previously. I'm trying to take non-nested nodes and get them nested. I'm using XSL version 1.0 and my processor is Libxslt.


SOURCE:

<head head-level="1">
head title
</head>
<p>
paragraph(s)
</p>
<head head-level="2">
sub-head title
</head>
<p>
paragraph(s)
</p>
<head head-level="2">
sub-head title
</head>
<p>
paragraph(s)
</p>
<head head-level="3">
sub-sub-head title
</head>
<p>
paragraph(s)
</p>
<head head-level="1">
head title
</head>
<p>
For simplicity, I've reduced any amount of content in between head's to a single p.
</p>



DESIRED RESULT:


<level>
<title>
head title
</title>
<p>
paragraph(s)
</p>
<level>
<title>
sub-head title
</title>
<p>
paragraph(s)
</p>
</level>
<level>
<title>
sub-head title
</title>
<p>
paragraph(s)
</p>
<level>
<title>
sub-sub-head title
</title>
<p>
paragraph(s)
</p>
</level>
</level>
</level>
<level>
<title>
head title
</title>
<p>
For simplicity, I've reduced any amount of content in between head's to a single p.
</p>
</level>



Thank you all. This list is such a valuable resource.


-Andrew

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.