Skip to content

Commit

Permalink
Read MODS production places to allow linking valueURI
Browse files Browse the repository at this point in the history
  • Loading branch information
Kajetan Dvoracek committed Jul 1, 2022
1 parent 23ff2a0 commit c7cc542
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Classes/Format/Mods.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ public function extractMetadata(\SimpleXMLElement $xml, array &$metadata)
}
}
}
$prodPlaces = $xml->xpath('./mods:relatedItem[@type="original"]/mods:originInfo[@eventType="production"]/mods:place/mods:placeTerm');
foreach ($prodPlaces as $prodPlace) {
$prodPlaceMd = (string) $prodPlace;

if (isset($prodPlace['valueURI'])) {
$prodPlaceMd .= chr(31) . (string) $prodPlace['valueURI'];
}

$metadata['production_place'][] = $prodPlaceMd;
}
// Get "year_sorting".
if (($years_sorting = $xml->xpath('./mods:originInfo[not(./mods:edition="[Electronic ed.]")]/mods:dateOther[@type="order" and @encoding="w3cdtf"]'))) {
foreach ($years_sorting as $year_sorting) {
Expand Down

0 comments on commit c7cc542

Please sign in to comment.