Recently we discovered a bug in daffodil. (
https://issues.apache.org/jira/browse/DAFFODIL-2147)

The property dfdl:textStandardZeroRep has value "0" in the pre-defined
schema DFDLGeneralFormat.dfdl.xsd that most people include and extend.

This value is incorrect. The value should be textStandardZeroRep="" (empty
string), so that there is no special text zero representation unless your
format needs one.

We will fix this, but this will be a non-backward-compatible change. It's
possible a DFDL schema will break or change behavior due to this
correction. So I'm getting the word out as soon as possible.

The conditions that would cause this change to matter to your schemas are:

   - representation="text"
   - textNumberRep="standard"
   - textNumberPattern having a value that requires zero to be represented
   as more than 1 digit. E.g., dfdl:textNumberPattern="##0.00##" where zero
   is represented as 0.00, not just the single 0 digit.
   - Your schema has `<include
   schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>`
   - You have no definition for textStandardZeroRep (so that it is
   inherited from DFDLGeneralFormat.dfdl.xsd)

I suggest that people add

    textStandardZeroRep=""

to any DFDL schemas that have the above described characteristics. Then
re-test.


Mike Beckerle
Apache Daffodil PMC | daffodil.apache.org
OGF DFDL Workgroup Co-Chair | www.ogf.org/ogf/doku.php/standards/dfdl/dfdl
Owl Cyber Defense | www.owlcyberdefense.com

Reply via email to