keeps/commons-ip

CSIPSTR15: Schema folder detection

Closed this issue · 3 comments

The attached package:
CSIPSTR15_1.zip
has no schemas folder but no warning for CSIPSTR15 is generated. Again the results for validating the zip version of the package differ from validation of the unpacked folder:
CSIPSTR15_1.zip_validation-report_2021-10-26_1.txt
CSIPSTR15_1_validation-report_2021-10-26_1.txt

The implemented logic tries to check if there is no schemas folder AND there are other files in the root besides METS.xml THEN the structure requirements fails because there schema files may be on the wrong place. This was because the requirement did not enforce schemas to exist but only that if schema files existed then they should be placed under schemas folder.

But, as your interpretation seems to be more simply to check if schemas folder exist and if not send warning, we will simplify our approach.

Still, there is an issue with ZIP and Directory packages having the same result.

  • Simplify check by only checking if schemas folder exist
  • ZIP and directory check must agree

@carlwilson specification states that there should be a schemas folder in root folder and/or the representation folder.

So, should we:

  1. Produce a warning for each root folder without schemas AND representation folders without schemas
  2. Produce one warning if the root folder does not have a schemas AND representation folder does not have schemas
  3. Produce one warning if NOT (the root folder has a schema OR ALL representation folders have a schemas)