[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Q on <xsl:sort>
> My problem is that this sort is not sorting on what I thought > it would. > > <xsl:template match='callEvent/response/interaction_list'> > > <xsl:apply-templates> > <xsl:sort select='./interaction/timestamp' > order='descending' > data-type='number' /> > </xsl:apply-templates> > > <interaction id='19766'> > <timestamp > unix='987413416000'>2001-04-16T04:30:32</timestamp> By saying data-type="number", you are asking for the value to be converted to a number, and the result of converting 2001-04-16T04:30:32 to a number is NaN. So all records have the same sort key. A sort with the default data type of "text" should work as you expect. Mike Kay Software AG 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
|