You are correct. The dfdl:binaryNumberCheckPolicy property does not
enable restriction validation. The DFDL specification describes the
property in section 13.7:
> Indicates how lenient to be when parsing binary numbers.
>
> If 'lax' then the parser tolerates all valid alternatives where such
> alternatives exist. Specifically, for dfdl:binaryNumberRep 'packed'
> the sign nibble for positive, negative, unsigned and zero is allowed
> to be any of the valid respective values.
So this property only has an affect when dfdl:binaryNumberRep is
"packed", and then it just says which sign nibbles are allowed. Assuming
dfdl:binaryNumberRep is not packed ("binary" is much more common), the
property will just be ignored.
- Steve
On 4/29/19 10:14 AM, Costello, Roger L. wrote:
> Hello DFDL community,
>
> I am reviewing a DFDL schema that someone created. See the below simpleType.
> Notice that it contains dfdl:binaryNumberCheckPolicy="strict". I am guessing
> that the author of the DFDL schema believes that that property will instruct
> Daffodil to validate the binary value against the minInclusive an
> maxInclusive facets. But I say that is not true. What do you say? /Roger
>
> <xsd:simpleType dfdl:alignmentUnits="bytes"
> dfdl:binaryNumberCheckPolicy="strict"
> dfdl:length="1"
> dfdl:lengthKind="explicit"
> dfdl:lengthUnits="bytes"
> dfdl:representation="binary"
> name="MessageType">
> <xsd:restriction base="xsd:byte">
> <xsd:minInclusive value="1"/>
> <xsd:maxInclusive value="4"/>
> </xsd:restriction>
> </xsd:simpleType>
>