kitodo / kitodo-ugh

Kitodo.UGH Library
2 stars 10 forks source link

Export fields of meta-data groups to MODS XML attributes #54

Closed matthias-ronge closed 7 years ago

matthias-ronge commented 7 years ago

Part of https://github.com/kitodo/kitodo-production/issues/619

Example usage:

<Preferences>

<!-- ... -->

<MetadataType>
    <Name>ctrIdentifierURI</Name>
    <language name="en">Identifier (GND)</language>
</MetadataType>

<!-- ... -->

<Group>
  <Name>Contributor</Name>
  <language name="en">Contributor</language>
  <!-- ... -->
  <metadata>ctrIdentifierURI</metadata>
  <!-- ... -->
</Group>

<Formats>
  <METS>
    <!-- ... -->
    <Group>
      <InternalName>Contributor</InternalName>
      <WriteXPath>./mods:mods/#mods:name[@type='personal']</WriteXPath>
      <!-- ... -->
      <Metadata>
        <InternalName>ctrIdentifierURI</InternalName>
        <WriteXPath>./@valueURI</WriteXPath>            <!-- *** HERE *** -->
      </Metadata>
      <!-- ... -->