Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
    Bookmark Topic Watch Topic
  • New Topic

XSLT format number

 
Sarah Shay
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,

I am trying to format lets say a quantity - In this format number mask I add in any thousand comma sperators that are required. My issue is the numbers after the decimal place. Sometimes I can get 112.8500 returned in the XML. other times I can get 12.54. I can get up to 5 decimal places. So if I pass it through the format-number #,##0.00000 I get trailing zeros added on even if they are not returned in the XML. This is not acceptable. If I try use #,##0.#####, any trailing zeros that are returned in the XML(it does happen), these are knocked off. Any ideas on what sort of a format-number I could use to handle my scenarios?

Any help will be much appreciated,

Sarah
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Report post to moderator
I'm closing this thread. Please continue discussion at the duplicate thread in our XML forum.
 
    Bookmark Topic Watch Topic
  • New Topic