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

Solution for issue #6024 results in schema invalid ruleset file #6193

Open
henning-gerhardt opened this issue Aug 27, 2024 · 0 comments
Open
Labels
bug ruleset ruleset functions and configuration

Comments

@henning-gerhardt
Copy link
Collaborator

Describe the bug
While discussion the issue #6024 a solution / work around was presented in comment. Using this workaround to prevent the issue #6024 will result in a schema invalid ruleset file:

$ xmllint --noout --schema rulesets/ruleset.xsd  rulesets/slub.xml
rulesets/slub.xml:2441: element restriction: Schemas validity error : Element '{http://names.kitodo.org/ruleset/v2}restriction', attribute 'division': '' is not a valid value of the atomic type 'xs:NMTOKEN'

The file slub.xml has the content in the mentioned line

    <correlation>
        <restriction division="" unspecified="forbidden">
            <!-- This is necessary to avoid the creation of a second dmdSec https://github.com/kitodo/kitodo-production/issues/6024 -->
            <permit division="page"/>
        </restriction>

The error message above will appear with the ruleset.xsd file from release 3.6.x, 3.7.x and current master.

To Reproduce
Steps to reproduce the behavior:

  1. Add the restriction entry like descripted in metadata "processTitle" creates an an additional <mets:dmdSec> for some document types #6024
  2. Run a validation with the ruleset.xsd against the changed ruleset file.

Expected behavior
Even a workaround should not result in a schema invalid ruleset file. If a workaround even needs changes in the ruleset.xsd file then this file must be changed too.

Screenshots

Release

  • 3.6.x
  • 3.7.x
  • current master (2024-08-27)
@solth solth added the ruleset ruleset functions and configuration label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ruleset ruleset functions and configuration
Projects
None yet
Development

No branches or pull requests

2 participants