Hello DFDL community,
I believe that lengthKind="prefixed" is used when the input data is prefixed by
an integer which indicates the length of the data. For example, below the data
is the string ABC and it is prefixed by the integer 3
3ABC
The 3 indicates that the length of the following data is 3 characters.
Do I understand correctly the purpose of lengthKind="prefixed"?
Assuming I understand its purpose correctly, why is this DFDL schema failing:
<xs:element name="D" type="xs:string"
dfdl:lengthKind="prefixed"
dfdl:prefixLengthType="D-type"
dfdl:prefixIncludesPrefixLength="no"/>
<xs:simpleType name="D-type"
dfdl:lengthKind="explicit"
dfdl:length="1">
<xs:restriction base="xs:integer" />
</xs:simpleType>
Here is the error message that I get:
[error] Parse Error: Convert to Unlimited Size Integer (for xs:integer): Unable
to parse 'B' (using up all characters).
What am I doing wrong, please?
/Roger