Hi All,
I want to display part of XML using XSLT but its displaying other part of XML document also. below is my code :
XML
Code:
<?xml version="1.0" encoding="UTF-8"?>
<profile>
<users>
<user>
<firstname>John</firstname>
<lastname>Won</lastname>
</user>
</users>
<departments>
<department>Sales</department>
<department>Finance</department>
<department>Order</department>
<departments>
</profile>
XSLT:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="user">
<html>
<body>
<table>
<tr>
<td>
<font size="5" color="blue"><xsl:value-of select="firstname"></xsl:value-of></font>
<br/><br/>
<xsl:value-of select="lastname"></xsl:value-of>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
I just want to display users information but it is displaying department as well.
How can i just display users information.#
Thanks
Nelly