I cannot wrap <panel> tags to second level individual items as shown in Expected result bellow. But with the xslt i have written, all 1.x get into single node. Please help me.
Source xml
<root>
<step id="1">
<content>
<text>
1.0 Sample first level step text
</text>
</content>
<content/>
<step>
<content>
<text>
1.1 Sample second level step text
</text>
</content>
</step>
<step>
<content>
<text>
1.2 Sample second level step text
</text>
</content>
</step>
<step>
<content>
<text>
1.3 Sample second level step text
</text>
</content>
</step>
</step>
</root>
Expected output
<panel>
<panel>
1.0 Sample first level step text
</panel>
<panel>
1.1 Sample second level step text
</panel>
<panel>
1.2 Sample second level step text
</panel>
<panel>
1.3 Sample second level step text
</panel>
</panel>
My XSLT
<xsl:template match="/">
<panel>
<xsl:apply-templates/>
</panel>
</xsl:template>
<xsl:template match="root/step" >
<panel>
<panel>
<xsl:apply-templates select ="content/text/node()"></xsl:apply-templates>
</panel>
<panel>
<xsl:apply-templates select ="step/content/text/node()"></xsl:apply-templates>
</panel>
</panel>
</xsl:template>