xsl-list
[Top] [All Lists]

RE: Unusual Sort

2005-04-13 07:59:24
In XSLT 2.0:

<xsl:sort select="index-of(('Freshman', 'Sophmore', 'Junior'), .)"/>

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: Williamson, Chris [mailto:cwilliamson(_at_)kheaa(_dot_)com] 
Sent: 13 April 2005 15:34
To: 'xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com'
Subject: [xsl] Unusual Sort

I was wondering if there is any way to sort elements other 
than just the
regular alphabetical order.  For example,  If you wanted to sort grade
levels (Freshman, Sophmore, Junior, etc)  so that they are 
displayed in the
correct order and not the alphabetical order (Freshman, 
Graduate, Junior,
Senior, Sophmore). This is an optional piece of my 
application so if It
can't be done fairly easily I will probably not worry about 
creating the
functionality of the sort on page..in other words if it's a 
huge deal don't
worry about going to the trouble of creating the sort.. Just 
let me know. 

Thanks

Chris

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>