Rank: Newbie
Joined: 9/17/2019 Posts: 2 Location: Atlanta
|
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
|
Rank: Advanced Member
Joined: 2/27/2009 Posts: 565
|
Make sure you work with any code target language other than XSLT 1.0 (so, XSLT 2.0, XQuery, Java, C#, C++, or BUILTIN).
|