[xsl] Help: convert without parent element: throughout XSLT-2.0

Subject: [xsl] Help: convert without parent element: throughout XSLT-2.0
From: Selva Ganesh <selvaganesh1985@xxxxxxxxx>
Date: Wed, 6 May 2009 21:33:23 +0530
How to convert without parent element, all the elements had in same
level but I want the output is multi level elements, how is possible

Input file:
<h2 class="LegP1GroupTitle">Determination that a </h2>
<p class="LegP1ParaText"><span class="LegP1No">3.</span>&#8212;(1)
This regulation</p>
<p class="LegP2ParaText">(2) Subject to paragraph (3)</p>
<p class="LegP3Container"><span class="LegP3No">(a)</span><span
class="LegP3Text">during an interview </span></p>
<p class="LegP3Container"><span class="LegP3No">(b)</span><span
class="LegP3Text">the confession is in </span></p>
<p class="LegP3Container"><span class="LegP3No">(c)</span><span
class="LegP3Text">the confession inclu</span></p>
<p class="LegP4Container"><span class="LegP4No">(i)</span><span
class="LegP4Text">the period during </span></p>
<p class="LegP5Container"><span class="LegP5No">(aa)</span><span
class="LegP5Text">the period during </span></p>

Output file:
<ti>Determination that a </ti>
<s1><no>(1)</no><pt>This regulation </pt></s1>
<s1><no>(2)</no><pt>Subject to paragraph (3)</pt>
<s2><no>(a)</no><pt>during an interview </pt></s2>
<s2><no>(b)</no><pt>the confession is in</pt></s2>
<s2><no>(c)</no><pt>the confession includes</pt>
<s3><no>(i)</no><pt>the period during </pt>
<s4><no>(aa)</no><pt>the period during </pt>

Current Thread