From aec169ab805cdde6b3cd6f4f34a37c343fa61f1d Mon Sep 17 00:00:00 2001 From: miker Date: Tue, 12 Aug 2008 15:09:48 +0000 Subject: [PATCH] support /really/ bare zebra installations that do not like elementSetName git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2_3@10343 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/opensrf.xml.example | 2 +- .../src/perlmods/OpenILS/Application/Search/Z3950.pm | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Open-ILS/examples/opensrf.xml.example b/Open-ILS/examples/opensrf.xml.example index bbd7477fc1..53381264ee 100644 --- a/Open-ILS/examples/opensrf.xml.example +++ b/Open-ILS/examples/opensrf.xml.example @@ -94,7 +94,7 @@ Example opensrf config file for OpenILS 7090 Voyager - + FI diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm index 10f12a3a5b..86d495ad95 100755 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm @@ -215,9 +215,11 @@ sub process_results { my $service = shift; my $tformat = $services{$service}->{transmission_format} || $output; - my $rformat = $services{$service}->{record_format} || 'FI'; - $results->option(elementSetName => $rformat); - $logger->info("z3950: using record format '$rformat'"); + my $rformat = $services{$service}->{record_format}; + + $results->option(elementSetName => $rformat); + $results->option(preferredRecordSyntax => $tformat); + $logger->info("z3950: using record format '$rformat' and transmission format '$tformat'"); my @records; my $res = {}; @@ -243,10 +245,10 @@ sub process_results { my $rec = $results->record($_); - if ($tformat eq 'usmarc') { - $marc = MARC::Record->new_from_usmarc($rec->raw()); - } elsif ($tformat eq 'xml') { - $marc = MARC::Record->new_from_xml($rec->raw()); + if (lc($tformat) eq 'usmarc') { + $marc = MARC::Record->new_from_usmarc($rec->raw()); + } elsif (lc($tformat) eq 'xml') { + $marc = MARC::Record->new_from_xml($rec->raw()); } else { die "Unsupported record transmission format $tformat" } -- 2.11.0