daffodil icon indicating copy to clipboard operation
daffodil copied to clipboard

Fix check for explicit length within length facet range

Open stevedlawrence opened this issue 1 year ago • 0 comments

When we check if an explicit dfdl:length is within range of the minLength/maxLength/length facets, we do not take into account units or character encoding, which can lead to incorrect and confusing warnings.

This modifies the check to use the existing LengthInBitsEv to calculate the length in bits of an element (which uses lengthUnits), and uses CharsetEv for string types to correctly convert the explicit bit length to infoset length, where possible

DAFFODIL-2888

stevedlawrence avatar Sep 06 '24 19:09 stevedlawrence