Please describe the problem you'd like to be solved
The feature Importing and validating XML metadata with source-metadata.csv is experimental and disabled by default.
If ARCHIVEMATICA_MCPCLIENT_MCPCLIENT_METADATA_XML_VALIDATION_ENABLED is set but XML_VALIDATION is not - for example when
- no
METADATA_XML_VALIDATION_SETTINGS_FILE variable / file is set up, or
XML_VALIDATION is an empty dictionary { }
...the entire XML metadata processing (and thus the import into the AIP METS itself) is skipped, rather than just the validation step.
Describe the solution you'd like to see implemented
I think it would be beneficial for everyone using this feature to have metadata validation enabled by default simply by setting ARCHIVEMATICA_MCPCLIENT_MCPCLIENT_METADATA_XML_VALIDATION_ENABLED. Currently, I don't see a real downside to this, as XML_VALIDATION_FAIL_ON_ERROR defaults to False.
I suggest the following default behaviour:
Default to
XML_VALIDATION=True and
XML_VALIDATION_FAIL_ON_ERROR=False,
if they are not set or even if METADATA_XML_VALIDATION_SETTINGS_FILE is not set up.
Benefits:
- Enables both the XML metadata import into the AIP METS and a logged validation result that may or may not be acted on.
- Allows the equivalent of passing an empty
XML_VALIDATION dictionary if users want lxml to handle everything (e.g., via schemaLocation hints or an XML catalog).
Describe alternatives you've considered
If this is not something you think should be pursued, I'd love to see an added clarification in the documentation about an empty XML_VALIDATION resulting also in none of the XML metadata being imported into the AIP METS or being addressed in some other way.
Additional context
For Artefactual use:
Before you close this issue, you must check off the following:
Please describe the problem you'd like to be solved
The feature Importing and validating XML metadata with source-metadata.csv is experimental and disabled by default.
If
ARCHIVEMATICA_MCPCLIENT_MCPCLIENT_METADATA_XML_VALIDATION_ENABLEDis set butXML_VALIDATIONis not - for example whenMETADATA_XML_VALIDATION_SETTINGS_FILEvariable / file is set up, orXML_VALIDATIONis an empty dictionary{ }...the entire XML metadata processing (and thus the import into the AIP METS itself) is skipped, rather than just the validation step.
Describe the solution you'd like to see implemented
I think it would be beneficial for everyone using this feature to have metadata validation enabled by default simply by setting
ARCHIVEMATICA_MCPCLIENT_MCPCLIENT_METADATA_XML_VALIDATION_ENABLED. Currently, I don't see a real downside to this, asXML_VALIDATION_FAIL_ON_ERRORdefaults toFalse.I suggest the following default behaviour:
Default to
XML_VALIDATION=TrueandXML_VALIDATION_FAIL_ON_ERROR=False,if they are not set or even if
METADATA_XML_VALIDATION_SETTINGS_FILEis not set up.Benefits:
XML_VALIDATIONdictionary if users wantlxmlto handle everything (e.g., viaschemaLocationhints or an XML catalog).Describe alternatives you've considered
If this is not something you think should be pursued, I'd love to see an added clarification in the documentation about an empty
XML_VALIDATIONresulting also in none of the XML metadata being imported into the AIP METS or being addressed in some other way.Additional context
For Artefactual use:
Before you close this issue, you must check off the following: