Sign In/My Account | View Cart  
advertisement

Article:
 Sorting in XSLT
Subject: xsl:sort
Date: 2002-08-13 06:03:14
From: charles asafo
Response to: xsl:sort

How do I eliminate duplicates after sorting?
The following :
boy
boy
girl
man
man
woman
should become
boy
girl
man
woman

No Previous Message Previous Message Move up to Parent Message Up Next Message No Next Message


Titles Only Titles Only Newest First
  • xsl:sort
    2010-05-24 10:45:23 Alan F

    You could try using something like this:


    <xsl:if test="not(current()/@attributed_to = preceding::quote/@attributed_to)">


    inside an <xsl:sort> element to weed out duplicates. I haven't tried it myself, but I saw it in my notes from a class.


Sponsored By: