Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema does not enforce constraints from section 5.7.2 #26

Open
mbeckerle opened this issue Aug 2, 2022 · 2 comments
Open

Schema does not enforce constraints from section 5.7.2 #26

mbeckerle opened this issue Aug 2, 2022 · 2 comments

Comments

@mbeckerle
Copy link
Member

The schema should enforce a internal constraints on message type.

A 2045 message header can have an array of message_handling_groups

Each message_handling_group has a UMF indicating if the data is Link16, Binary File, VMF, NITF, etc.

For some of those there is a more granular message_standard_version which tells us which specific version of that standard.

Following that there is an optional vmf_message_identification_group, which obviously applies only to VMF, but this is not enforced. This contains the K-series message ID information (K01.02.03 type identification), which is not held in a VMF-message proper so must come from this header.

Following that there is an optional file_name which is NOT applicable to VMF, but to binary files, and possibly other types.
(E.g., if NITF data is carried it is not clear if there is an associated file name, or just a collection of bytes for an anonymous NITF data block.)

Right now, the message type can indicate VMF, but the data can still contain a file-name as if it was for a binary file.

@mbeckerle mbeckerle changed the title schema does not enforce some obvious constraints schema does not enforce constraints from 5.7.2 (D1 spec) Aug 2, 2022
@mbeckerle
Copy link
Member Author

mbeckerle commented Aug 2, 2022

Section 5.7.2 (same section in both C and D1 specs) is a substantial section of constraint rules. The schema should be enforcing these, and create always-invalid elements when they are not adhered to.

That is, we consider the data well-formed, but just not valid if these constraints are not maintained.

@mbeckerle mbeckerle changed the title schema does not enforce constraints from 5.7.2 (D1 spec) Schema does not enforce constraints from section 5.7.2 Aug 2, 2022
@mbeckerle
Copy link
Member Author

Note that there is some test data that will become invalid once these constraints are enforced. Specifically the "all fields" tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant