This is my xml document.I want to convert this to another xml format using xslt2.0.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:v="urn:schemas-microsoft-com:vml">
<w:body>
<w:tbl/>
<w:tbl/>
</w:body>
</w:document>
This is my xslt 2.0 code snippt.
<xsl:for-each select="following::node()[1]">
<xsl:choose>
<xsl:when test="self::w:tbl and (parent::w:body)">
<xsl:apply-templates select="self::w:tbl"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
<xsl:template match="w:tbl">
<table>
table data
</table>
</xsl:template>
My generated output is :
<table>
table data
<table>
table data
</table>
</table>
But My required output is :
<table>
table data
</table>
<table>
table data
</table>