Lines 130-152
if (not defined $format) {
Link Here
|
130 |
|
130 |
|
131 |
my $content; |
131 |
my $content; |
132 |
|
132 |
|
133 |
my $marcxml = GetXmlBiblio($biblionumber); |
133 |
my $marcxml = GetXmlBiblio($biblionumber); |
134 |
unless (defined $marcxml) { |
134 |
unless (defined $marcxml) { |
135 |
# no bib, so 404 |
135 |
# no bib, so 404 |
136 |
print $cgi->header( -status => '404 record not found'); |
136 |
print $cgi->header( -status => '404 record not found'); |
137 |
exit 0; |
137 |
exit 0; |
138 |
} |
138 |
} |
139 |
|
139 |
|
140 |
my $xslt_file = get_xslt_file( $format, $format_to_stylesheet_map, $format_info ); |
140 |
my $xslt_file = get_xslt_file( $format, $format_to_stylesheet_map, $format_info ); |
141 |
unless( defined $xslt_file ) { |
141 |
unless( defined $xslt_file ) { |
142 |
print $cgi->header( -status => '406 invalid format requested' ); |
142 |
print $cgi->header( -status => '406 invalid format requested' ); |
143 |
exit 0; |
143 |
exit 0; |
144 |
} |
144 |
} |
145 |
my $xslt_engine = Koha::XSLT_Handler->new; |
145 |
my $xslt_engine = Koha::XSLT_Handler->new; |
146 |
$content = $xslt_engine->transform({ |
146 |
$content = $xslt_engine->transform({ |
147 |
xml => $marcxml, |
147 |
xml => $marcxml, |
148 |
file => $xslt_file, |
148 |
file => $xslt_file, |
149 |
}); |
149 |
}); |
150 |
|
150 |
|
151 |
if( !defined $content || $xslt_engine->err ) { |
151 |
if( !defined $content || $xslt_engine->err ) { |
152 |
print $cgi->header( -status => '500 internal error' ); |
152 |
print $cgi->header( -status => '500 internal error' ); |
153 |
- |
|
|