I have a xml file like this
<Root>
...
<x></x>
<node>
...
<x></x>
<y></y>
</node>
</Root>
My xslt is
<xsl:template match="/">
<!-- proceed the treatment of the statement before x-->
<tr>
<xsl:apply-templates match="Root/x"/>
</tr>
<tr>
<xsl:apply-templates match="Root"/>
</tr>
</xsl:template>
<xsl:template match="x">
...
</xsl:template match="x">
<xsl:template match="Root">
<!--Proceed the treatment of the statement before x-->
<tr>
<xsl:apply-templates match="x"/>
</tr>
<!--Deal with y-->
The template which matches "/" will create a table and fill it with all the nodes in the xml file. x can appear in every element like "node" and maybe different each time. "node" can also appear several times with different content.
But when I use this xslt, after dealing with x, it creates a new table for the elements after x, So node will be in a new table and also for y.
Does anyone know how to do? Thank u