<port>7090</port>
<db>Voyager</db>
- <!-- fetch the full record with no holdings. FI is the default -->
+ <!-- fetch the full record with no holdings. FI is the most common setting -->
<record_format>FI</record_format>
<!-- Record transmission format from the server. Supported -->
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 = {};
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"
}