I would agree.
The same lesson applies to date/time information with calendarPattern (which is not called textCalendarPattern because of use with packed decimal numbers of various kinds). Length gives the length of the "box" within which the representation will be found. The patterns and other properties give the interpretation of the data found there. There is an unparser perspective to these also. The patterns tell you how to represent the logical value in the physical data stream. The length bounds the size of this. ________________________________ From: Costello, Roger L. <[email protected]> Sent: Monday, June 24, 2019 10:18:13 AM To: [email protected] Subject: Re: dfdl:textNumberPattern="####" is redundant when there is type="xs:int" and dfdl:length="4", right? Thank you Steve and Mike. Truly excellent information you’ve given me. I think there is a key lesson learned, which I have tried to capture below. Do you agree with the lesson learned? Is there anything you would add to it? /Roger * type="xs:int" dfdl:length="4" does not mean this: The input must contain precisely 4 digits representing an integer. * Rather, it means this: The input must contain 4 characters representing an integer. If the 4 characters are not all digits, then you must inform Daffodil how to interpret those 4 characters. That is the purpose of dfdl:textNumberPattern.
