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

RE: sort, count, number, group

Subject: RE: sort, count, number, group
From: "Volkmann, Mark" <Mark.Volkmann@xxxxxxxxxxxxx>
Date: Mon, 13 Mar 2000 10:36:11 -0600
sort count
Title: RE: sort, count, number, group

Thank you very much!  That worked perfectly!

    -----Original Message-----
    From:   Steve Tinney [SMTP:stinney@xxxxxxxxxxxxx]
    Sent:   Sunday, March 12, 2000 9:05 PM
    To:     xsl-list@xxxxxxxxxxxxxxxx
    Subject:        Re: sort, count, number, group

    > <artist>
    >   <recording year="1991">
    >     <name>Solace</name>
    >   </recording>
    >   <recording year="1999">
    >     <name>Mirrorball</name>
    >   </recording>
    > </artist>
    >
    > How can I find the name of the most recent recording using XSLT?

    <xsl:template match="artist">
      <xsl:for-each select="recording">
        <xsl:sort data-type="number" order="descending" select="@year"/>
        <xsl:if test="position()=1">
          <xsl:value-of select="name"/>
        </xsl:if>
      </xsl:for-each>
    </xsl:template>

     Steve


     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.