I have this problem for xslt:
This is the input file:
<root>
<header/>
<item/>
… other n-1 <item/>
<header/>
<item/>
… other m-1 <item/>
</root>
so header and item are at the same level (/root).
it must be converted in something like:
<root2>
<header2>
<item2/>
…<item2/> // the first n-items up
</header2>
<header2>
<item2/>
…<item2/> // the last m-items up
</header2>
</root2>
so basically the first n-item must be moved in the first header while the second group of items must be moved in the second header. Any idea how to get this?
Thanks
Randomize
Sample XML:
XSLT using grouping:
Or simple particular XSLT:
Both produce the same output: