[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Eliminating leading zeros
In order to sort item numbers with <xsl:sort> properly and prevent the
sorted ouptput order of 1, 10, 100, 2, 3 and so on, I left pad the numbers
with leading zeros: 001,002, 003, 010, 100 ....
so that I get 001, 002, 003, 010, 100 ... when I run a ascii sort [other elements are also sorted, so I cannot drop the ascii sort]. I have been trying to figure out how to kill the leading zero after the sort and before printing the output to either an xml or xhtml document. That is, after the sort, when I output the sorted <item>001</item> ... ... ... <item>100</item> I would like it to be rendered as <sortedItem>1</sortedItem> ... ... ... <sortedItem>100</sortedItem> I asume this is a common problem but have not a clue where to look in the archives.Can someone give me a hint? Thanks, Mark
|
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
|