Answer the question
In order to leave comments, you need to log in
How to split a list using XSLT?
There is an XML with a complex structure, one of the elements of which is a list, the size of which is not known in advance.
Is it possible to split this list into several parts while keeping the rest of the structure intact? Well, almost untouched.
Example:
<L4>
<AAA>a</AAA>
<BBB>b</BBB>
<CCC>
<DDD>a:b:C:123.400.01</DDD>
<DDD>a:b:C:123.400.02</DDD>
<DDD>a:b:C:123.400.03</DDD>
<DDD>a:b:D:123.401.01</DDD>
<DDD>a:b:D:123.401.02</DDD>
<DDD>a:b:E:123.402.01</DDD>
</CCC>
<DDD>d</DDD>
...
<ZZZ>z</ZZZ>
</L4>
<L4>
<AAA>a</AAA>
<BBB>b</BBB>
<CCC>
<DDD>a:b:C:123.400.01</DDD>
<DDD>a:b:C:123.400.02</DDD>
<DDD>a:b:C:123.400.03</DDD>
</CCC>
<DDD>d</DDD>
...
<ZZZ>z</ZZZ>
</L4>
<L4>
<AAA>a</AAA>
<BBB>b</BBB>
<CCC>
<DDD>a:b:D:123.401.01</DDD>
<DDD>a:b:D:123.401.02</DDD>
</CCC>
<DDD>d</DDD>
...
<ZZZ>z</ZZZ>
</L4>
<L4>
<AAA>a</AAA>
<BBB>b</BBB>
<CCC>
<DDD>a:b:E:123.402.01</DDD>
</CCC>
<DDD>d</DDD>
...
<ZZZ>z</ZZZ>
</L4>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question