Thanks much for clarifying. I got it now. Life is strange...you never get a function that does the right thing. phew!
Anyways, I have a few thoughts, see if this solves the problem.
get the decimal part.count the number of digits, should be a max of 5. (right?)input that count as the third argument for the format-number function. <!-- assume your input number is stored in the variable myNum -->
xsl:variable name="decimalPart" select="substring-after($myNum, '.')"/>
<!-- count the number of digits in the decimalPart -->
format-number($myNum, 'your-thousand-seperator-format', $count)
Your homework, figure out how to count the digits and let us know. I would like to learn that - drawing a blank right now. Thanks.
Hope this helps.
- m