Michael Beckerle created DAFFODIL-2158:
------------------------------------------

             Summary: textNumberPattern not being used for xs:int ?
                 Key: DAFFODIL-2158
                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2158
             Project: Daffodil
          Issue Type: Bug
          Components: Back End
    Affects Versions: 2.4.0
            Reporter: Michael Beckerle
             Fix For: 2.4.0


Look at the DFDLSchemas/MagVar project.

In that schema, which is siimple fixed-length data, there are columns of 
integers (xs:int) and of floats.

The textNumberPattern *was* "###0.0###;-###0.0###".

When I tested this for portability with IBM DFDL, it errored because the xs:int 
elements were unparsing as 0.0, 1.0, not just 0, or 1.  One of the integer 
columns is only 2 characters wide, so even 0.0 doesn't fit and was giving a 
runtime error.

So I had to introduce a separate named DFDL format so that the integer elements 
and the float elements could have different textNumberPattern values, because 
the integers need "###0.###;-###0.###", the floats need the pattern above to 
work right.

So now it works portably.

But.... why didn't Daffodil unparse the integers as 0.0, 1.0, and so forth the 
way IBM DFDL did? It seems Daffodil is somehow not using the textNumberPattern 
for these integers.

And that seems like a bug to me.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to