Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

XSL: format-number does not add leading zero

Posted on 2004-10-21
5
Medium Priority
?
2,769 Views
Last Modified: 2008-01-09
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

0
Comment
Question by:jasww
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
brunomsilva earned 1000 total points
ID: 12372062
<xsl:value-of select="format-number(someNode, '####0.##')"/>
0
 

Author Comment

by:jasww
ID: 12372106
Will that screw up other numbers?

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


Thanks
Daniel
0
 
LVL 4

Expert Comment

by:brunomsilva
ID: 12372486
no, but i'm not really sure. i haven't touched xsl for a while, but give it a try
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question