Hi Friends,
I m new to this group and also to XML and aspire for the certification. I m unable to understand the outcome of this.The xml file is as under.
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="template1.xsl"?>
<source>
<source1>
<element1>element1</element1>
<element3>element3</element3>
<element2>element2</element2>
</source1>
</source>
The XSL is as under:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="source/source1/element1">
<i>
<xsl:value-of select="."/>
</i>
</xsl:template>
<xsl:template match="element3">
<i>
<xsl:value-of select="."/>
</i>
</xsl:template>
</xsl:stylesheet>
However the output is:
element1element3element2
with element1element3 in italics.
I fail to understand why "element2" appears in the output.
Thanx in advance