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

Antw: Sorting results by output of a conversion templa

Subject: Antw: Sorting results by output of a conversion template
From: agnes.kielen@xxxxxxx
Date: Fri, 9 Jan 2004 10:28:36 +0100
Antw:  Sorting results by output of a conversion templa
Hi,
Allen wrote:

> 
> I have some sophisticated sorting to do and only a basic level of
> knowledge.
> 
> Essentially, I have an element coming down called 'assignStartTime' which
> holds a three-digit numeric value e.g. 181, 145, 85, 133 etc etc. Now,
> these figures actually represent a time and once passed through to a
> conversion template (called 'convertApptEndTime'), return a figure like
> 12:00pm or 3:00pm etc etc. The conversion template looks like this:
> 

You could try something like:
<xsl:sort select="substring-before(':', your_result)" data-type="number"/>

In this way the sort is done on the numbers. You still have to make a difference between am and pm, but I think that's an extension of the solution above.

Cheers,
Agnes


 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.