I cannot figure out how to put a recursive inside an XSL for a simple XML to HTML (UL+LI) transformation to build a HTML tree.
I have the following valid XML:
<Operations>
<Operation ID="C9EFC137-8FC7-4396-8D77-EB6AD67FC8C9" Name="A" >
<Operation ID="189C76A8-28FC-4B49-A4DA-A75253D8702C" Name="B" />
<Operation ID="189C76A8-28FC-4B49-A4DA-A75253D8702C" Name="C">
<Operation ID="6B458E8F-09BE-4033-B1BF-948DD7B96AAA" Name="D" />
<Operation ID="189C76A8-28FC-4B49-A4DA-A75253D8702C" Name="E" />
<Operation ID="189C76A8-28FC-4B49-A4DA-A75253D8702C" Name="F">
<Operation ID="6B458E8F-09BE-4033-B1BF-948DD7B96AAA" Name="G" />
</Operation>
</Operation>
</Operation>
</Operation>
The structure is a multi-level with infinite depth.
I need to transform it so it looks like this:
<UL>
<LI>A
<UL>
<LI>B</LI>
<LI>C
<UL>
<LI>D
<UL>
<LI>E</LI>
<LI>F
<UL>
<LI>G</LI>
</UL>
</LI>
</UL>
</UL>
</LI>
</UL>
</LI>
I would apreciate your help.
Thank U All.
This should do the trick (the whitespace is a bit different however the structure is the same and it shows the principle)