Subject: Re: [xsl] sort and if From: "Joerg Heinicke" <joerg.heinicke@xxxxxx> Date: Wed, 6 Feb 2002 00:40:52 +0100 |
Just use a grouping technique like Muenchian Method, which was discussed on this list today in about 20 messages. The problem with your method is the following: <xsl:for-each select="item"> <xsl:sort select="date"/> <xsl:if test="preceding-sibling::item[1][date= current()/date]"> <xsl:value-of select="date"/> </xsl:if> </xsl:for-each> The test on preceding <item> elements sounds very good, but it's using the document order and not the sorted order. Regards, Joerg ----- Original Message ----- From: "Ilyasov Jienbay" <jienbay@xxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, February 05, 2002 1:00 PM Subject: [xsl] sort and if > hello, > > please help with this... > it drives me crazy! > > <items> > <item> > <date>011022<date> > </item> > <item> > <date>011021<date> > </item> > <item> > <date>011021<date> > </item> > </items> > > i want to *sort* and then put "same as above" or *nothing* if the previouse > $date is equal to the current $cur_date, something like: > > date > ----- > 011021 > same as above(or nothing) > 011022 > > thank you in advance > > jian XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] dynamically select an ele, yan bai | Thread | [xsl] few question regarding the us, 林 子芯 |
RE: [xsl] Xselerator, Trace Wilson | Date | Re: [xsl] few question regarding th, Joerg Heinicke |
Month |