Hello DFDL community,
My input consists of a string containing one to five characters. Each character
must be a digit character. Here is a sample input:
99999
My DFDL schema uses the xs:unsignedInt datatype to constrain the string to
digits. It uses dfdl:length=5 to constrain the length of the string.
I am trying to be very precise in my wording. Is the above wording correct?
Here is my DFDL schema:
<xs:element name="input">
<xs:complexType>
<xs:sequence>
<xs:element name="value"
type="xs:unsignedInt"
dfdl:lengthKind="explicit"
dfdl:length="5"
dfdl:lengthUnits="characters" />
</xs:sequence>
</xs:complexType>
</xs:element>
Parsing the input 99999 produces this XML:
<input>
<value>99999</value>
</input>
Unparsing produces this error message:
[error] Unparse Error: Data too long by 8 bits. Unable to truncate.
Here is the output of unparsing:
99,999
Why does unparsing produce that error message? Is it a bug in Daffodil?
/Roger