[ 
https://issues.apache.org/jira/browse/DAFFODIL-2158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mike Beckerle updated DAFFODIL-2158:
------------------------------------
    Priority: Critical  (was: Major)

> 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: Mike Beckerle
>            Assignee: Mike Beckerle
>            Priority: Critical
>             Fix For: 3.5.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
(v8.20.10#820010)

Reply via email to