Hello DFDL community,
I want to confirm my understanding of the following DFDL:
<xs:element name="DataEntry"
type="xs:int"
dfdl:lengthKind="explicit"
dfdl:length="2"
dfdl:lengthUnits="characters" />
That says the input is an integer that has exactly 2 digits.
Right?
It seems kind of strange to say the length units are characters. It would be
less strange if I could say the length units are "digits" but that, of course,
not legal. Any explanation of why length units of characters makes sense?
I reckon the above DFDL is kind of equivalent to the following XML Schema,
right?
<xs:element name="DataEntry">
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:length value="2" />
</xs:restriction>
</xs:simpleType>
</xs:element>