Add rulset metadata attribute for structure tree node label
Fixes #5882
This pull request allows to declare what metadata keys are used as node labels in the structure tree (use="structureTreeTitle").
- A user may choose between the options
Type,TitleandType - Titlein the metadata editor - A warning is shown in case the
ruleset.xmldoes not contain at least one metadata key withuse="structureTreeTitle" - The old configuration option
metsEditor.titleMetadatawas removed fromkitodo_config.properties
Example declaration in rulset.xml:
<ruleset xmlns="http://names.kitodo.org/ruleset/v2" lang="en">
<declaration>
...
<key id="TitleDocMain" use="structureTreeTitle">
<label>main title</label>
<label lang="de">Haupttitel</label>
</key>
...
</declaration>
</ruleset>
Demo
https://github.com/user-attachments/assets/cac83ae2-7dfd-4d24-bfdb-165015248ae0
@thomaslow : can use please extend the ruleset.xsd file for this new entry? Without this it is not possible anymore to validate the rulesets which use this new attribute value.
// edit: maybe the existing rule set files in the repository should be changed too so users have an impression how to use this attribute in the future as the configuration is used from the global configuration file to every used rule set file.
@henning-gerhardt Yes, of course. I will adapt the ruleset.xsd and add unit/integration tests later. This pull request is still work-in-progress. I stopped halfway through the implementation, because I felt that the current solution is not ideal. My concerns and questions are mentioned in #5882.
@henning-gerhardt I updated both ruleset.xsd, added the new option to the simple-book.xml example ruleset, and added or updated unit/integration/selenium tests.
@thomaslow also please rebase against current master to resolve code conflicts that were introduced by merging #6255
@BartChris I added this text to the Ruleset wiki page:
use="structureTreeTitle" Das Feld wird im Strukturbaum des Metadateneditor als Anzeigetext für die Strukturelemente verwendet, falls vom Nutzer die Anzeigeoption "Titel" ausgewählt wurde.
See wiki section.