troubleshooting Question

xslt 1.0 - Formatting string (Removing leading zeros)

Avatar of Darius
DariusFlag for Lithuania asked on
XML* XSLT* XSL
4 Comments1 Solution1603 ViewsLast Modified:
Hi guys,

I am facing an issue with string formatting to remove leading zeros.

when
input = '000111100' or 111100
result is: 111100  - all ok!

when
input = '01111111111111111111101110'
result is: "1111111111111111100000000"
expected result is: 1111111111111111111101110

Function
<xsl:variable name="test1" select="string(number($input))" />
It looks like does not work for large numbers.
Please share if you have an explanation or logic function to remove leading zeros only on any size of value.

Thank You,
Darius
ASKER CERTIFIED SOLUTION
Gertone (Geert Bormans)
Information Architect
Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros