Thanks for your reply. However, then why do in the following case we also get the following in the output
"
<p style="color:red">I am </p>
<p>
<i>fine.</i>
</p>"
Example Ref:
http://zvon.org/xxl/XSLTutorial/Output/example6_ch2.html XML source
<source>
<bold>Hello, world.</bold>
<red>I am </red>
<italic>fine.</italic>
</source>
XSLT stylesheet
<xsl:stylesheet version = '1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:template match="bold">
<p>
<b>
<xsl:value-of select="."/>
</b>
</p>
</xsl:template>
<xsl:template match="red">
<p style="color:red">
<xsl:value-of select="."/>
</p>
</xsl:template>
<xsl:template match="italic">
<p>
<i>
<xsl:value-of select="."/>
</i>
</p>
</xsl:template>
</xsl:stylesheet>
Output
<p>
<b>Hello, world.</b>
</p>
<p style="color:red">I am </p>
<p>
<i>fine.</i>
</p>