Subject: RE: [xsl] Q on <xsl:sort> From: "Michael Kay" <mhkay@xxxxxxxxxxxx> Date: Wed, 2 May 2001 09:26:40 +0100 |
> 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Q on <xsl:sort>, Francis Norton | Thread | RE: [xsl] Q on <xsl:sort>, Walter Torres |
RE: [xsl] using different xsl based, Robert Seber | Date | RE: [xsl] ordering and iteration pr, Michael Kay |
Month |