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

Parse error on date fields containing dashes #12

Open
lblatchford opened this issue Jun 24, 2021 · 0 comments
Open

Parse error on date fields containing dashes #12

lblatchford opened this issue Jun 24, 2021 · 0 comments

Comments

@lblatchford
Copy link

Per MIL-STD-2500C CN2 section 5.1.7d (see https://gwg.nga.mil/ntb/baseline/docs/2500c/2500C.pdf) indicates that any portion of date and time fields that is not known may be populated with dashes. Currently such fields cause a parse error. Some examples:

Failed to convert: Parse Error: Failed to populate ImageSegment[1]. Cause: Parse Error: Unable to parse xs:dateTime from text: 201707--------
Schema context: ImageDateAndTime Location line 373 column 22 in file:/root/DFDL_schemas/nitf.dfdl.xsd
Data location was preceding byte 430 limit(bytes) 1009
Schema context: sequence[1] Location line 154 column 8 in file:/root/DFDL_schemas/nitf.dfdl.xsd
Data location was preceding byte 430Parse Error: Unable to parse xs:dateTime from text: 201707--------
Schema context: ImageDateAndTime Location line 373 column 22 in file:/root/DFDL_schemas/nitf.dfdl.xsd
Data location was preceding byte 430 limit(bytes) 1009

Failed to convert: Parse Error: Failed to populate ImageSegment[1]. Cause: Parse Error: Unable to parse xs:dateTime from text: --------------
Schema context: ImageDateAndTime Location line 373 column 22 in file:/root/DFDL_schemas/nitf.dfdl.xsd
Data location was preceding byte 430 limit(bytes) 1009
Schema context: sequence[1] Location line 154 column 8 in file:/root/DFDL_schemas/nitf.dfdl.xsd
Data location was preceding byte 430Parse Error: Unable to parse xs:dateTime from text: --------------
Schema context: ImageDateAndTime Location line 373 column 22 in file:/root/DFDL_schemas/nitf.dfdl.xsd
Data location was preceding byte 430 limit(bytes) 1009

Test files are attached
nitf_2_1_date_field_dashes.zip

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

No branches or pull requests

1 participant