DFDL will only use scientific notation for types xs:float and xs:double.

Perhaps this will work: If you create an additional element of type xs:decimal, 
that gets its value from the floating-point number using dfdl:inputValueCalc, 
then that decimal number will not show up in the infoset with scientific 
notation.

Like this:

<xs:element name="floatingPointValue" type="xs:double"
      dfdl:outputValueCalc='{ xs:double(../decimalValue) }'/>
<xs:element name="decimalValue" type="xs:decimal"
      dfdl:inputValueCalc='{ xs:decimal(../floatingPointValue) }' />

If that works and you don't want the floating point in the infoset at all, it 
can be tucked away in a DFDL hidden group.







________________________________
From: Marshall Miller <[email protected]>
Sent: Monday, July 19, 2021 1:29 PM
To: [email protected] <[email protected]>
Subject: Scientific notation


Hello,



We recently came across a problem with a library that does not support the use 
of numbers that are represented in scientific notation.  We have several 
options to work around the problem but the easiest solution would be to ensure 
that parsed datasets do not include scientific notation.  Is there a way to 
prevent Daffodil from representing numbers with scientific notation?



Marshall Miller

Reply via email to