There can be any number of element-a's, each followed by any number of element-b's, each followed by any number of element-c's. The c's always follow the b's and the b's always follow the a's.
The format I am trying to transform it into something looks like this:
<root>
<element-a>
<element-b />
</element-a>
<element-a />
<element-a>
<element-b>
<element-c />
</element-b>
<element-b />
<element-a />
</root>
In the new format, the c's are children of the b's and the b's are children of the a's. It is in the same order, just now the parent-child relationships are enforced.
What is the easiest way to accomplish this. I am having trouble tackling this functionally. Any help would be greatly appreciated. Thanks in advance!
Subject:difficult problem for an xslt newbie Author:Tony Lavinio Date:21 Sep 2006 10:34 AM
This is the classic XSLT grouping problem.
Type "XSLT grouping" into Google, or go
direct to a very clear explanation (with examples!)
at http://www.jenitennison.com/xslt/grouping/