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

RE: last(): selecting the last one?

Subject: RE: last(): selecting the last one?
From: Jarno.Elovirta@xxxxxxxxx
Date: Mon, 22 Apr 2002 15:51:39 +0300
RE:  last(): selecting the last one?
Heppa,

> Hmmm.... No. Since the order of the result should be like 
> above and then
> find the latest concerning both date and time+ select it's 
> topic element 
> value. 

Yes, but *where* do you want to do that? Inside the template selection that generates that list, or outside? If it's the latter, then 

variable name="latest"
  for-each select="message"
    sort select="the xpath to sort the data"
    sort select="the xpath to sort the time"
    if test="position() = last()"
       value-of select="topic"

will set the $latest variable to the value of the topic element of the latest message.

Cheers,

Santtu

 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-2011 All Rights Reserved.