Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XSLT format number

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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