NASA-PDS / validate

Validates PDS4 product labels, data and PDS3 Volumes
https://nasa-pds.github.io/validate/
Apache License 2.0
16 stars 11 forks source link

validate incorrectly disallows Encoded_Native/encoding_standard_id = 'SEED 2.4' #1028

Closed rchenatjpl closed 3 weeks ago

rchenatjpl commented 1 month ago

Checked for duplicates

No - I haven't checked

šŸ› Describe the bug

I hope this isn't an artifact of using a preliminary version of 1N00. The attached .xml file is Product_Native. It should pass validation, but instead gives an ERROR about "...encoding parameter 'SEED 2.4' is not known to this version of validate"

šŸ•µļø Expected behavior

Complete PASS of the input file

šŸ“œ To Reproduce

% validate -x PDS4_PDS_1N00.xsd -S PDS4_PDS_1N00.sch -t xa.s16..shz.1976.070.0.xml
PDS Validate Tool Report
Configuration:
   Version     3.6.0-SNAPSHOT
   Date        2024-10-11T20:51:03Z
Parameters:
   Targets                        [file:/Users/rchen/Desktop/val/xa.s16..shz.1976.070.0.xml]
   User Specified Schemas         [file:/Users/rchen/Desktop/val/PDS4_PDS_1N00.xsd]
   User Specified Schematrons     [file:/Users/rchen/Desktop/val/PDS4_PDS_1N00.sch]
   Severity Level                 WARNING
   Recurse Directories            true
   File Filters Used              [*.xml, *.XML]
   Data Content Validation        on
   Product Level Validation       on
   Max Errors                     100000
   Registered Contexts File       /Users/rchen/PDS4tools/validate/resources/registered_context_products.json
Product Level Validation Results
  FAIL: file:/Users/rchen/Desktop/val/xa.s16..shz.1976.070.0.xml
      ERROR  [error.validation.internal_error]   Could not process the encoding type: encoding parameter 'SEED 2.4' is not known to this version of validate.
        1 product validation(s) completed
Summary:
  1 product(s)
  1 error(s)
  0 warning(s)
  Product Validation Summary:
    0          product(s) passed
    1          product(s) failed
    0          product(s) skipped
    1          product(s) total
  Referential Integrity Check Summary:
    0          check(s) passed
    0          check(s) failed
    0          check(s) skipped
    0          check(s) total
  Message Types:
    1            error.validation.internal_error
End of Report
Completed execution in 1676 ms

āš™ļø Engineering Details

Follow-on task: https://github.com/NASA-PDS/pds4-information-model/issues/825

šŸŽ‰ Integration & Test

No response

al-niessner commented 1 month ago

@rchenatjpl

Nothing is attached. Please attach test data.

rchenatjpl commented 1 month ago

@al-niessner I swear I attached this. I wouldn't bet on it though github1028.tgz

al-niessner commented 1 month ago

@jordanpadams @rchenatjpl

Okay, I understand the problem now. The encoding is being used by validate to look at the data file content. We have not build SEED 2.4 into validate so it is passing it off to the generic file checker which then bombs. Not too big of a surprise all in all.

So, do we:

  1. fix generic so that it does not fail
  2. add SEED 2.4 to validate as one of the many encoding it can handle

Note: I did a 10 second google for java and seed 2.4 encoding only to come up empty. Make you choice wisely.

jordanpadams commented 1 month ago

@al-niessner whichever is easiest. we do not need to actually validate the underlying content right now