kitodo / kitodo-production

Kitodo.Production is a workflow management tool for mass digitization and is part of the Kitodo Digital Library Suite.
http://www.kitodo.org/software/kitodoproduction/
GNU General Public License v3.0
63 stars 63 forks source link

Configuration of selection lists in metadata groups #4122

Closed andre-hohmann closed 3 years ago

andre-hohmann commented 3 years ago

Problem

The role codes in the metadata group "ContributorPerson" are shown in an multiselect list, although only one value should be chosen. For other metadata, the following configuration enables the selection of only one value:

  1. maxOccurs="1" minOccurs="1" in the restriction for the division to enable the selection of one value
  2. multiline="false" to show a drop down menu

Question

Is it possible to configure a drop down menu for the metadata in metadata groups? In the section Examples, the current configuration can be found.

Configuration

configuration of the key in <editing>

Click to show the configuration: ```xml ```

configuration of the key in <restriction>

Click to show the configuration: ```xml ```

configuration of the key ContributorPerson

Click to show the configuration: ```xml ```

Example

Multiselect option

selectionlit01

Singleselect option

selectionlit02

matthias-ronge commented 3 years ago

Your restriction is wrong:

<permit key="ContributorPerson">
    <permit id="RoleCode" maxOccurs="1" minOccurs="1"/>
    <!--    ^^ problem here -->
</permit>

Correct: (key= instead of id=)

<permit key="ContributorPerson">
    <permit key="RoleCode" maxOccurs="1" minOccurs="1"/>
</permit>

Your <editing> config is also wrong. This is what you want:

<setting key="ContributorPerson">
    <setting key="RoleCode" multiline="false"/>
</setting>

Side note: In your key configuration, minOccurs and maxOccurs are not evaluated (will be ignored, but you can remove it):

    <label lang="de">Anzeigename</label>
</key>
<key id="RoleCode" maxOccurs="1" minOccurs="1">
    <!--           ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -->
    <label>Relationship designation (code)</label>
andre-hohmann commented 3 years ago

Thanks a lot! It works now.