+}
+
+$record_processor->process($record);
+
+if ($view eq 'card' || $view eq 'html') {
+ my $xml = $record->as_xml;
+ my $xsl = $view eq 'card' ? 'compact.xsl' : 'plainMARC.xsl';
+ my $htdocs = C4::Context->config('opachtdocs');
+ my ($theme, $lang) = C4::Templates::themelanguage($htdocs, $xsl, 'opac', $input);
+ $xsl = "$htdocs/$theme/$lang/xslt/$xsl";
+ output_html_with_http_headers $input, undef, Encode::encode_utf8(C4::XSLT::engine->transform($xml, $xsl));
+}
+else { #view eq marc