I want to create a XSD structure from an Excel output using XSLT. But my XSLT does not generate the hierarchical structure, correctly. It has some additional nodes in an element
Here is a suggestion using a recursive function:
You will have to test yourself with more levels or provide some input samples with deeper nesting to allow us to test.