IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Profile: jshein
About
User Name: jshein
Forum Rank: Newbie
Real Name:
Location Atlanta
Occupation:
Interests:
Gender: None Specified
Statistics
Joined: Tuesday, September 17, 2019
Last Visit: Friday, October 18, 2019 5:30:10 PM
Number of Posts: 2
[0.01% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: Numeric Conversion
Posted: Tuesday, September 17, 2019 1:02:42 PM
I'm doing a simple mapping from one field defined as a nonNegativeInteger to a destination field defined as a nonNegativeInteger.

If the source field is more than 6 digits, I end up with a exponent value i.e. 2.900115272898E12 instead of 2900115272898. If I store the result field as a string, I don't see the issue. Unfortunately, I can't modify the datatypes in the destination schema.

The generated XSLT is:
<xsl:value-of select="number(*[local-name()='FOO' and namespace-uri()=''])"/>

the source field is
<FOO>2900115272898</FOO>
defined as:
<xs:element name="FOO" type="xs:nonNegativeInteger"/>

the result is:
<FOO1>2.900115272898E12</FOO1>
defined as:
<xs:element name="FOO1">
<xs:simpleType>
<xs:restriction base="xs:nonNegativeInteger">
<xs:maxInclusive value="999999999999999999999999"/>
</xs:restriction>
</xs:simpleType>
</xs:element>

I'm looking for
<FOO1>2900115272898</FOO1>

Any suggestions on how I can force the conversion?

thanks!
Jeff

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.