[xsl] Eliminating leading zeros

Subject: [xsl] Eliminating leading zeros
From: "Mark Wilson" <drmark@xxxxxxxxxxxxxxx>
Date: Mon, 21 Aug 2006 07:45:00 -0400
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

... ... ...

I would like it to be rendered as

... ... ...

I asume this is a common problem but have not a clue where to look in the archives.Can someone give me a hint?

Current Thread