From cb32a43fd9df154f3adc4dabfcb0bda79258827e Mon Sep 17 00:00:00 2001 From: Andreas Romeyke <andreas.romeyke@slub-dresden.de> Date: Mon, 16 Sep 2024 13:47:00 +0200 Subject: [PATCH] - add support for notes in purged or deleted AIPs --- perl/exit_strategy.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/perl/exit_strategy.pl b/perl/exit_strategy.pl index 5f691b9..dc6409e 100644 --- a/perl/exit_strategy.pl +++ b/perl/exit_strategy.pl @@ -561,6 +561,16 @@ XPATH return \@dates; } +sub get_purged_notes($xp, $amd) { + my @entries_str = map {$_->nodeValue} $xp->findnodes($compiled_xpath_purged_event_reason, $amd); + my @results; + foreach my $e ( @entries_str) { + my @entries = split(/;/, $e); + push @results, List::Util::first{ s/note=//; } @entries + } + return \@results; +} + sub get_purged_reasons($xp, $amd) { my @entries_str = map {$_->nodeValue} $xp->findnodes($compiled_xpath_purged_event_reason, $amd); my @results; -- GitLab