This is just an addition to the previous version of this XSLT transformation. It is in Hindi, so perhaps some of the international developers not familiar with Hindi language may find it difficult to understand the result.
People unfamiliar with India’s traditional numbering system may find this challenging. The system used in India, Pakistan, and Bangladesh is based on a unique grouping of two decimal places, rather than three decimal places common in the West. During business dealings in India, people are likely to come across the numerical terms Arab, Crore, and Lakh (see table below), although the higher numbers listed are rarely used. These more common words are often used in combination, e.g., one Lakh Crore, which is 1012, or one trillion. The terms Padma and Kharab are sometimes used in Hindi.
No of zeros
Western system (short-scale)
100000 (100 thousand)
10,000,000 (Ten million)
1,000,000,000 (One billion)
100,000,000,000 (100 billion)
10,000,000,000,000 (10 trillion)
1,000,000,000,000,000 (One quadrillion)
100,000,000,000,000,000 (100 quadrillion)
10,000,000,000,000,000,000 (10 quintillion)
Make your XML document as in the specified format given below. Put a stylesheet reference to your XML and open the XML in a web browser (in this XML, # represents a digit):
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="TransformNumber.xslt" ?>
The XSLT file in this project can help you understand calling recursive templates, and also gives an idea about how to use in-built functions. We can use this as a base and can design our own XSLT for the English number system translation.
This is a follow up for a previous version of the article.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
General News Suggestion Question Bug Answer Joke Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.