Hi All,
I have a XML document which contains duplicate data in the elements.
What i want in xslt just to retreive unique date for displaying.
For example: In XML there are two record with the same data i just want to retireive one records from XML in XSLT.
or is there any way to restrict duplicate record using XML Schema.
Below is my XML :
Code:
<?xml version="1.0" encoding="UTF-8"?>
<Users>
<User>
<firstname>john</firstname>
<lastname>walker</lastname>
</User>
<User>
<firstname>john</firstname>
<lastname>walker</lastname>
</User>
</Users>
Below is the XSLT in that i am retrieving data :
Code:
<xsl:template match="user">
<xsl:call-template name="user">
<xsl:with-param name="firstname">
<xsl:apply-templates select="./firstname"/>
</xsl:with-param>
<xsl:with-param name="lastname">
<xsl:apply-templates select="./lastname"/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="user">
<xsl:param name="firstname"/>
<xsl:param name="lastname"/>
<!-- Rest of the code goes here -->
</xsl:template>
How to retrive one record if records are duplicate?
Thanks
Nelly