[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Removing duplicates - grouping problem

Subject: Re: Removing duplicates - grouping problem
From: "Raffaele Sena" <raff@xxxxxxxxxxxx>
Date: Wed, 18 Oct 2000 11:33:32 -0700
xsl duplicates position
>  I have tried variations of the Stylesheet with no luck.  The present
>  stylesheet gives me grouped and sorted.  Help get rid of the duplicates.
>  Hopefully this is a easy one for the pros on this mailing-list.
>  Why does the 'not condition' in my select not take care of the duplicates.
>
    Hmmm, I changed the <for-each> statement a little, with an <if> to check
    for duplicates. Still doesn't work, but maybe it will help to figure out
    what is going on (I would have thought the for-each would return a
node-list
    of <sab> elements, but according to the messages that get printed out, the
    elements do not seem to be at consecutive positions ):

xsl:template match="term">
    <xsl:text> Synonym: </xsl:text>
    <xsl:value-of select="tn"/><br/>
    Source: <br/>
    <xsl:for-each select="termVariant/strSource/sab">
      <xsl:sort select="."/>
        <xsl:variable name="prev" select="position()-1"/>
prev:<xsl:value-of select="$prev"/> <xsl:value-of
select="../sab[position()=$pre
v]"/>
curr:<xsl:value-of select="position()"/> <xsl:value-of select="."/>
        <xsl:if test=".=../sab[position()=$prev]">
                ' SAME '
        </xsl:if>
        <xsl:value-of select="."/><br/>
    </xsl:for-each>
</xsl:template>

    Anyway, hope this help!

-- Raffaele

-----------------------------------------------------
raff@xxxxxxxxxxxx (::) http://www.aromatic.org/~raff/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.