Click here to Skip to main content
15,880,725 members
Articles / Programming Languages / XSLT

Number To Word Conversion Program using XSLT

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
6 Mar 20021 min read 70.3K   633   15  
Number to word conversion program using XSLT
Number To Word Conversion Program using XSLT
--------------------------------------------
This is an attempt to write an XSLT generic code to convert a given number to words.  This program uses a substantial number of
XSLT tags and also XSLT functions showing the power of XSLT programming.  Any parser that supports XSLT 1.0 or higher can execute
this program.  The whole program has not been optimized and is only of an experimental value and cannot be used for any commercial
applications.  

Some main features of the program are:

1. Usage of multiple namespaces.
2. Self referencing using XSLT function - document().
3. Embedded XML Data which behaves like static arrays in conventional programming languages.
4. Reusable template programming.

How to execute this program:

1. If you have "msxsl.exe" (can be found on www.microsoft.com), at the MS-DOS command prompt, type:
          msxsl <xmlfile> NumToWord.xsl Number=100355.67

                where <xmlfile> is any well-formed XML
                      Number is the parameter name

2. If you have "saxon.exe", at the MS-DOS command prompt, type:
          saxon <xmlfile> NumToWord.xsl Number=10055.67

                where <xmlfile> is any well-formed XML
                      Number is the parameter name


By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


Written By
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions