diff --git a/isbn/man-sru.php b/isbn/man-sru.php index b36b0f5..5c56b0d 100644 --- a/isbn/man-sru.php +++ b/isbn/man-sru.php @@ -17,7 +17,8 @@ * ISBN kann ebenfalls eine Komma-separierte Liste von ISBNs sein * man-sru?isbn=ISBN&format=json * man-sru?isbn=ISBN&format=holdings - * + * man-sru?isbn=ISBN&format=holdings&with=collections +* * Sucht übergebene ISBN bzw. PPN in der SRU-Schnittstelle der UB Mannheim * und gibt maximal 10 Ergebnisse als MARCXML, JSON zurück oder eine * formattierte Bestandsangabe (eine kurze Zeile und die Details in einer @@ -118,6 +119,7 @@ $map = STANDARD_MARC_MAP; $map['bestand'] = '//datafield[@tag="AVA"]/subfield[@code="b"]'; +$map['sammlung'] = '//datafield[@tag="AVE"]/subfield[@code="m"]'; if (!isset($_GET['format'])) { header('Content-type: text/xml'); @@ -173,6 +175,7 @@ echo "\n"; echo "
\n"; if ($aveNodes) { + $collections = []; echo "\n"; foreach ($aveNodes as $node) { echo "\n"; @@ -183,6 +186,10 @@ echo " "; } echo "\n\n"; + $collection = $node->xpath('./subfield[@code="m"]'); + if ($collection) { + $collections[] = getValues($collection[0]); + } } echo "
" . $value . "
\n"; echo "
\n"; @@ -195,10 +202,14 @@ } if ($aveNodes) { echo "E"; + if ($_GET['with']) { + echo ' (' . implode(" | ", $collections) . ')'; + } } echo ''; } elseif ($aveNodes and !$avaNodes) { echo "\n"; + $collections = []; foreach ($aveNodes as $node) { echo "\n"; $subfields = $node->xpath('./subfield'); @@ -208,10 +219,18 @@ echo " "; } echo "\n\n"; + $collection = $node->xpath('./subfield[@code="m"]'); + if ($collection) { + $collections[] = getValues($collection[0]); + } } echo "
" . $value . "
\n"; echo "
\n"; - echo '
Bestand der UB Mannheim: E
'; + echo '
Bestand der UB Mannheim: E'; + if ($_GET['with']) { + echo ' (' . implode(" | ", $collections) . ')'; + } + echo '
'; } elseif ($size > 100) { //if the isbn is not found, then the $outputString is a minimal xml document //of size 48, for larger size something might be found... diff --git a/tools/bestandsabgleich.html b/tools/bestandsabgleich.html index 9d7c8f2..a4463e1 100644 --- a/tools/bestandsabgleich.html +++ b/tools/bestandsabgleich.html @@ -11,8 +11,8 @@