• Post Reply 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

number to text conversion in xsl

 
Ranch Hand
Posts: 2379
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Pals,
Can anyone provide me a URL or code regarding number to text conversion? Like in my sales bill I found total amount of sales is 21,35,520.50 USD. I want an xsl function that will write down it as twenty one million thirty five thousands five hundred twenty dollar and fifty cents.
Waiting for your reply. :roll:
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ashik, hopefully somebody will point you to the solution, but if not, you have at least two alternatives:
1) write your own XSLT function. In this case, please, submit it to some of XSLT code repositories like http://aspn.activestate.com/ASPN/Cookbook/XSLT/ for public benefit
2) You may have better chances to find this function written in Java and call it from your XSLT. The downside of calling Java function is that the mechanism for it isn't standardized, so it will decrease portability of your stylesheet. All major XSLT processors support extension functions, they only use slightly different syntax for it. If 100% portability isn't a strong requirement, java function may be a way to go.
 
Ashik Uzzaman
Ranch Hand
Posts: 2379
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx Map, for nice alternatives and a good link. I'll post the solution here as soon as I get it and if I write one I'll post it on that link site.
BTW, are you providing the sugestion as a software or as a programmer?
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mapraputa Is:

http://aspn.activestate.com/ASPN/Cookbook/XSLT/


Hi Map!..
Thanks for the link.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic