In the case of a very simple pattern like #### yes, they're redundant pretty much. The strict/lax matters when the pattern contains digit-grouping separators e.g, #,###,###, where strict means the commas must be there in the data to parse, and lax means they can be present or not.
Note that you have described a signed int, with a pattern that does not specify a form for negative values. I believe you want pattern "####;-###" for leading-sign since the absolute length of the field is 4. Alternatively you should use xs:unsignedInt type. ________________________________ From: Costello, Roger L. <[email protected]> Sent: Monday, June 24, 2019 9:13:28 AM To: [email protected] Subject: dfdl:textNumberPattern="####" is redundant when there is type="xs:int" and dfdl:length="4", right? Hello DFDL community, My input contains 4 digits, representing a year. The below DFDL schema seems to do the job. However, it occurs to me that there is a redundancy. If I specify type="xs:int" and dfdl:length="4", then that means the input must contain exactly 4 digits, right? And therefore dfdl:textNumberCheckPolicy="strict" and dfdl:textNumberPattern="####" are redundant, right? /Roger <xs:element name="Year" type="xs:int" dfdl:length="4" dfdl:lengthKind="explicit" dfdl:textNumberCheckPolicy="strict" dfdl:textNumberPattern="####" />
