|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Convert sequence of elements to nested structure
Hi,
This is no doubt an elementary question but I need to convert a sequence
of elements of the same name like this:
<a>content1</a>
<note>content2</note>
<note>content3</note>
<note>content4</note>
<b>content5</b>
into a nested structure like this:
<a>content1</a>
<note>content2
<cont>content3</cont>
<cont>content4</cont>
</note>
<b>content5</b>
In other words, if there are consecutive <note> elements, they should be
combined into one <note> element with the 2nd, 3rd and subsequent lines
expressed as <cont> (continuation line) elements within the <note> element.
I can't quite see how to do this by recursion.
Thanks for your help
Rowan
|
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








