Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 7th, 2006, 09:52 AM
Registered User
Join Date: Jun 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sort by a value that's a comma seperated list

Ok here's my problem.

I am using xsl to style a result set. Some values are text, some are numbers and one is a comma seperated list. Some values might have numerous list items "8,6,4,2" others may be just one list item "2". The list is always the highest values first. What I want to do is sort (numeric) this list by the first (or only) value in the list.

The item that contains the list is called "validSplit"

If I use: <xsl:sort select="substring-before(validSplit,',')" order="descending" data-type="number"/>
It works providing the list has more than 1 item. However when the list has only 1 item, there is obviously no comma, therefore the value is blank.

If anyone could steer me in the right direction, please let me know.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is a comma allowed in a List Box? williamlove Access 5 June 6th, 2008 06:28 AM
comma separated list MunishBhatia SQL Server 2000 11 March 21st, 2007 03:56 PM
selecting elements from comma separated list rjonk XSLT 4 September 29th, 2006 08:46 AM
comma separated list of attributes rjonk XSLT 3 September 27th, 2006 11:52 AM
need comma seperated values in select atulmar SQL Server 2000 2 April 12th, 2005 07:01 PM

All times are GMT -4. The time now is 04:04 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.