Re: xsl:sort - sorting outline numbered values
I wrote a solution for almost precisely this problem - see http://www.biglist.com/lists/xsl-list/archives/200104/msg01458.html - and wrote a later version at http://redrice.com/xml/sortfunction_0_1.zip. My approach was to develop separate sort and comparison functions, so that you could use a comparison function specific to your data with a general sort function. The approach is good but I ran out of time and the code is still buggy, but you're welcome to use it if you think it might be of help. Dimitre mentioned the possibility of using a pure template approach - I don't know if he implemented it. Francis. Ilya Khandamirov wrote: > > Dear List, > > xsl:sort element, combined with MSXML, sorts the following values absolutely > correctly (as text): > > 1 > 1.1 > 10 > 11.1.1 > 2.1 > > But i would like to get slightly different result: > > 1 > 1.1 > 2.1 > 10 > 11.1.1 > > Does somebody know of XSLT solution for that? > p.s. There can be up to 15 numbering levels in the source XML file. > > Thank you. > > Regards, > Ilya > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list 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