XSL: format-number does not add leading zero

Hi
Format-number does not add leading zeros for numbers 0<n<1

<xsl:value-of select="format-number(someNode, '#####.##')"/>


someNode       Output
123.1230001     123.12
0.900                 .9


That last example should be "0.9"    


Please advise


Thanks
Daniel

jaswwAsked:
Who is Participating?
 
brunomsilvaConnect With a Mentor Commented:
<xsl:value-of select="format-number(someNode, '####0.##')"/>
0
 
jaswwAuthor Commented:
Will that screw up other numbers?

Such as 123.123, will it output "1230.12" by mistake?


Thanks
Daniel
0
 
brunomsilvaCommented:
no, but i'm not really sure. i haven't touched xsl for a while, but give it a try
0
All Courses

From novice to tech pro — start learning today.