|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSLT for unflattening a tree?
Hi all,
I've been working with a series of XML documents that effectively represent
"flattened" trees. Instead of using nested elements for each level of the tree,
they use empty header elements that indicate the tree level:
<h1/>
<h2/>
<content .../>
<h3/>
<content .../>
<h3/>
<content .../>
<h2/>
...
<h1/>
...
My question is what would be involved in using XSLT to convert that
structure to a nested element structure:
<h1>
<h2>
<content .../>
<h3>
<content .../>
</h3>
<h3>
...
</h3>
...
</h2>
</h1>
In one sense I'd like to maintain a stack of levels, but that's not necessarily
the XSLT "way". Am I barking up the wrong tree to do this kind of thing
in XSLT?
Cheers,
Stu
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








