My stylesheet reads two input XML files. I need to have an opening (eg: <ABC>) and matching ending tag (eg: </ABC>), but I do not want to have the end tag to be written after the first file is transformed, I want to write the end tags after the second file has been read in.
<xsl:template match="XXX">
These are from XXXX.xml file:
<ABI><xsl:value-of select="ABIValue"/></ABI>
<xsl:text>
</xsl:text>
<DDBI><xsl:value-of select="DDBIValue"/></DDBI>
<xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="YYY">
These are from YYYY.xml file:
<ETSI><xsl:value-of select="ETSIVallue"/></ETSI>
<xsl:text>
</xsl:text>
<TDFD><xsl:value-of select="TDFDValue"/></TDFD>
<xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>
I want the output be like this:
<ABC>
<ABI> .... </ABI> -- From XXXX.xml --
<DDBI> ....</DDBI> -- From XXXX.xml --
<ABI> ....</ABI> -- From YYYY.xml --
<DDBI> ....</DDBI> -- From YYYY.xml --
</ABC>
But no matter where I put the ABC tags, I get an error. Because it wants to see the open and the end tags within the same template.
Thanks for you help.
- Maryam