Link to home
Start Free TrialLog in
Avatar of jasww
jasww

asked on

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

ASKER CERTIFIED SOLUTION
Avatar of brunomsilva
brunomsilva

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jasww
jasww

ASKER

Will that screw up other numbers?

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


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