Sure sounds like bugs. Can you send the whole schema please?
________________________________
From: Costello, Roger L. <[email protected]>
Sent: Monday, April 13, 2020 11:11 AM
To: [email protected] <[email protected]>
Subject: Two bugs in Daffodil?
Hi Folks,
I have a binary data format. One field is a 1-byte name representing a person's
age. I have it defined like so:
<xs:element name="age" type="xs:nonNegativeInteger"
dfdl:representation="binary"
dfdl:lengthKind="explicit"
dfdl:lengthUnits="bytes"
dfdl:length="1"
dfdl:alignment="1"
dfdl:alignmentUnits="bytes"
dfdl:byteOrder="littleEndian"
dfdl:binaryNumberRep="binary"
/>
Daffodil gives this error message:
[error] Schema Definition Error: Property encoding is not defined.
Huh?
Why do I have to specify a (character) encoding on a binary nonNegativeInteger
field?
Next, I thought, "Okay, that doesn't make sense, but let me put
dfdl:encoding="ASCII" on the element declaration." I did so, and yet I got the
same error message!
Curiously, when I put the encoding in dfdl:format then the error message went
away.
Conclusion: Daffodil has a bug. Daffodil sometimes does not recognize the
encoding property on an element declaration. Do you agree?
There is the exact same problem with initiator. I put dfdl:initiator="" on the
element declaration and Daffodil says there is no initiator. When I put it on
dfdl:format, Daffodil doesn't give an error. I believe this is aother bug. Do
you agree?
/Roger