|
[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
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








