Skip to content

Problem: Improve feature setup and default behaviour of importing and validating XML metadata #1811

Description

@jens-st

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:

  • All pull requests related to this issue are properly linked
  • All pull requests related to this issue have been merged
  • A testing plan for this issue has been implemented and passed (testing plan information should be included in the issue body or comments)
  • Documentation regarding this issue has been written and merged
  • Details about this issue have been added to the release notes

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions