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

Re: sort and if

Subject: Re: sort and if
From: "Joerg Heinicke" <joerg.heinicke@xxxxxx>
Date: Wed, 6 Feb 2002 00:40:52 +0100
preceding item sort
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:  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
  • sort and if
    • Ilyasov Jienbay - Tue, 5 Feb 2002 06:58:08 -0500 (EST)
      • yan bai - Tue, 5 Feb 2002 09:37:04 -0500 (EST)
        • Andrew Welch - Tue, 5 Feb 2002 10:36:00 -0500 (EST)
          • yan bai - Tue, 5 Feb 2002 14:11:31 -0500 (EST)
      • Joerg Heinicke - Tue, 5 Feb 2002 18:37:56 -0500 (EST) <=

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.