Subject: Re: [xsl] Re: How to remove duplicate record from XML From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 28 Sep 2016 18:42:22 -0000 |
I had tried with new xsl code insted of that for '*How XSL will work If we have more then one same record in XML, ignore them and extract only rest data. my xsl code handling only duplicate value, i need only that record which is not duplicate or more then one*'. Below is my new XSL:
<xsl:stylesheet version="1.0" xmlns:xsl="w3.org/1999/XSL/Transform <http://w3.org/1999/XSL/Transform>">; <xsl:output omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements=""/> <xsl:key name="ccid" match="creations" use="id"/> <xsl:template match="node() | @"> <xsl:copy> <xsl:apply-templates select="node() | @*"/> </xsl:copy> </xsl:template> <xsl:template match="creation[not(generate-id() = generate-id(key('ccid', creations)[1]))]"/> </xsl:stylesheet>
<xsl:key name="ccid" match="creation" use="id"/> <xsl:template match="node() | @*"> <xsl:copy> <xsl:apply-templates select="node() | @*"/> </xsl:copy> </xsl:template> <xsl:template match="creation[key('ccid', id)[2]]"/> </xsl:stylesheet>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: How to remove duplicate r, Rahul Singh rahulsin | Thread | [xsl] Re: How to remove duplicate r, Rahul Singh rahulsin |
[xsl] Re: How to remove duplicate r, Rahul Singh rahulsin | Date | [xsl] Re: How to remove duplicate r, Rahul Singh rahulsin |
Month |