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

Import result is not correct for metadata according to the ruleset part <correlation><restriction devision ...> #4953

Open
subhhwendt opened this issue Feb 2, 2022 · 3 comments
Labels
feature import Import mappings and configurations question

Comments

@subhhwendt
Copy link
Collaborator

The specific metadata configuration for a document type in the chapter <restriction division ... unspecified="forbidden"> is considered as expected in the metadata editor. But as we checked the result of an import, we found out, that every metedata element configured in import.xsl and declared in general as a known key in in the ruleset will appear in meta.xml regardless specific ruleset configuration for the document type in <restriction division ... unspecified="forbidden">.
We expect that the configuration in a restriction part is applied to the import as declared in the statement - a behaviour we know from Kitodo 2 btw...

@matthias-ronge
Copy link
Collaborator

This has changed in version 3. The ruleset is only responsible for processing the metadata, not for importing or exporting.

That means everything that the import creates ends up in the meta.xml file. The restrictions from the ruleset only take effect during editing, and during validation. Metadata entries that are not defined in the ruleset but occur in the metadata are marked. In contrast to version 2, the editor no longer crashes.

There is still a small restriction in this regard: If a metadata group comes from the import that is not known in the ruleset, the editor currently cannot handle it (cf. #3762). But since metadata groups are more complicated, they shouldn't come about "accidentally", so there's less chance of encountering this problem.

@solth
Copy link
Member

solth commented Mar 6, 2022

I think there might be a small misunderstanding. If I understand correctly, @subhhwendt does not want to change the way metadata is imported currently, but only wants to slightly adapt how unknown or unspecified metadata is handled: instead of marking the metadata, it should be discarded.

@matthias-ronge is correct that in Kitodo 3 only the import XSLT mapping files are responsible for creating the internal meta.xml file, but that does not mean it cannot be changed if that would make more sense.

I would propose to add a small switch to the import page, label "Discard unknown metadata". If it is switched on (should probably be default), metadata that has been classified as "unknown" or "undefined" will be discarded and not added to the metadata file. When switched off, the import would behave the same way it does now, by displaying, marking and importing unknown metadata entries.

Would that make both sides happy?

@solth solth added the feature label Mar 6, 2022
@matthias-ronge
Copy link
Collaborator

I don't know exactly how the import works, I didn't help develop it. But it should be the case that the ruleset has no effect here. The idea was that the rule set only controls the editing of the metadata in the application.

I'm wondering if it needs a switch on the import, or if it doesn't need to be a setting in the opac.xml?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature import Import mappings and configurations question
Projects
None yet
Development

No branches or pull requests

3 participants