Attemping to transform XML with XSLT 2.0.
Flat Source XML:
<body>
<R1/>
<R1/>
<R2/>
<R2/>
<R2/>
<R3/>
<R3/>
<R3/>
<R1/>
<R1/>
<R2/>
<R2/>
<R1/>
</body>
Desired Output:
<body>
<R1/>
<R1>
<R2/>
<R2/>
<R2>
<R3/>
<R3/>
<R3/>
</R2>
</R1>
<R1/>
<R1>
<R2/>
<R2/>
</R1>
<R1/>
</body>
Basically these R1 - R3 elements signify sect-1, sect-2, sect-3 type elements. R2's are nested within their previous sibling R1 and R3's are nested within their previous sibling R2. Elements that are the same are on the same level.
No comments:
Post a Comment