|
Subject: [xsl] xslt sort remove duplicates From: Vaduvoiu Tiberiu <vaduvoiutibi@xxxxxxxxx> Date: Fri, 18 May 2007 03:36:11 -0700 (PDT) |
I have an xml file that has a lot of entries which have a name, category and date. I need to display the most recent name of each categoryI To be more precise:..
I did this so far:
<xsl:for-each select="exsl:node-set($mobile)/rootb/level1">
<xsl:sort order="descending" select="categ"/>
<xsl:sort order="descending" select="date"/>
<xsl:value-of select="titlu"/> -<xsl:value-of select="categ"/> - <xsl:value-of select="date"/>
</xsl:for-each>
right now my list looks like this: it's sorted after categoory, then it's sorted after date.
name1- category1 - most recent date *
name2 - category1 - date
name3 - category1 - date
name4 - category1 - date
name5 - category1 - date
name6 - category2 - most recent date *
name7 - category2 - date
name8 - category2 - date
name9 - category2 - date
nameX - category2 - date
name6 - category3 - most recent date *
name7 - category3 - date
name8 - category3 - date
name9 - category3 - date
nameX - category3 - date
........
I need to dsiplay only the one with the star. So I should only display:
name1- category1 - most recent date *
name6 - category2 - most recent date *
I tried using an if not ((preceding:...but it doesn't work. I think I'm not writing the sintax correctly. Can anyone give some pointers ? 10x
name6 - category3 - most recent date *
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Inserting a separator onl, Abel Braaksma | Thread | Re: [xsl] xslt sort remove duplicat, Florent Georges |
| RE: [xsl] Inserting a separator onl, Michael Kay | Date | Re: [xsl] Retrieve images from a RS, M. David Peterson |
| Month |