thanks, thats is working On Thu, Sep 29, 2016 at 12:25 AM, Evan Lenz <[email protected]> wrote:
> You could output it only if the current group has one item. Inside > <xsl:for-each-group>: > > <xsl:if test="count(current-group()) eq 1"> > <xsl:sequence select="."/> > </xsl:if> > > Evan > > Evan Lenz > President, Lenz Consulting Group, Inc. > http://lenzconsulting.com > > On Wed, Sep 28, 2016 at 11:42 AM, Nalini Shrma <[email protected]> > wrote: > >> Hi, >> >> I have one problem where i am writing XSL insted of XQUERY to 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 XSL: >> >> <xsl:template match="/*"><xsl:for-each-group select="creation" >> group-by="id"><xsl:sequence select="."/></xsl:for-each-group></xsl:template> >> >> Input: >> >> <?xml version="1.0" >> encoding="UTF-8"?><creations><creation><id>074</id></creation><creation><id>074</id></creation><creation><id>001</id></creation><creation><id>074</id></creation></creations> >> >> Expected output: >> >> <creation> >> <id>001</id> >> </creation> >> >> >> _______________________________________________ >> General mailing list >> [email protected] >> Manage your subscription at: >> http://developer.marklogic.com/mailman/listinfo/general >> >> > > _______________________________________________ > General mailing list > [email protected] > Manage your subscription at: > http://developer.marklogic.com/mailman/listinfo/general > >
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
