I am very much new to XSLT and have a weird requirement for which I have not found any solution. Server side we have XSLT of version 2.0.
Input number can be from Zero (0) to any value up to 8-digit number. I need to convert this into its English Word-Meaning following specific format.
If number is of 5 digit (Example - 28651) then First three set will be of 5-Astric (*****) followed by 2-space, so total 7.
If English word of any digit contains less than 5 letter (example 6 SIX then it must be followed by 2+2=4 spaces to make it equivalent to 5 letter English WORD)
For the Last digit of the number must also followed by 2 spaces as above.
INPUT OUTPUT (Without Enclosing Double-Quote)
9375 = "***** ***** ***** ***** NINE THREE SEVEN FIVE "
8623 = "***** ***** ***** ***** EIGHT SIX TWO THREE "
0 = "***** ***** ***** ***** ***** ***** ***** ZERO "
28651 = "***** ***** ***** TWO EIGHT SIX FIVE ONE "
40378623 = "FOUR ZERO THREE SEVEN EIGHT SIX TWO THREE "
I am not able to perform any below operation which is quite easy with Java.
1.) Assign any value to existing variable back. 2.) Taking the reverse of the number (345 to 543) 3.) Fetch out each digit separately in any array or something.
This is what I was thinking for its approach.