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

Re: Q on <xsl:sort>

Subject: Re: Q on <xsl:sort>
From: Francis Norton <francis@xxxxxxxxxxx>
Date: Wed, 02 May 2001 09:20:00 +0100
xsl sort reverse

Walter Torres wrote:
> 
> It looks like it is displaying in reverse xml order not reverse timestamp
> order.
> 
> any ideas?
> 
Yes ... you're sorting with:

> 
>    <xsl:apply-templates>
>       <xsl:sort select='./interaction/timestamp'
>                 order='descending'
>                 data-type='number' />
>    </xsl:apply-templates>
> 

but your data looks like this

>             <timestamp unix='987413416000'>2001-04-16T04:30:32</timestamp>


you have a mismatch here - either do a numeric sort on 

	select='./interaction/timestamp/@unix' 

since the unix attribute *is* numeric, or use your existing select with 

	data-type='text'

since timestamp's content is (given that XPath doesn't have any date /
time datatypes) alphanumeric.

Francis.

 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.