You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Mike Beckerle (Jira)" <ji...@apache.org> on 2023/03/04 19:00:00 UTC

[jira] [Assigned] (DAFFODIL-2158) textNumberPattern not being used for xs:int ?

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

Mike Beckerle reassigned DAFFODIL-2158:
---------------------------------------

    Assignee:     (was: Mike Beckerle)

> 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
>            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)