Lines 240-246
sub XSLTParse4Display {
Link Here
|
240 |
$variables->{OpenURLResolverURL} = $biblio->get_openurl; |
240 |
$variables->{OpenURLResolverURL} = $biblio->get_openurl; |
241 |
} |
241 |
} |
242 |
} |
242 |
} |
243 |
my $extracontentxml = ''; |
243 |
my $extracontent = ''; |
244 |
|
244 |
|
245 |
# Check if we should add extra content based on system preference |
245 |
# Check if we should add extra content based on system preference |
246 |
if ( C4::Context->preference('ExtraContentForXSLTDisplay') ) { |
246 |
if ( C4::Context->preference('ExtraContentForXSLTDisplay') ) { |
Lines 248-255
sub XSLTParse4Display {
Link Here
|
248 |
my $scrubber = C4::Scrubber->new('staff'); |
248 |
my $scrubber = C4::Scrubber->new('staff'); |
249 |
my $extracontentvalue = C4::Context->preference('ExtraContentForXSLTDisplay'); |
249 |
my $extracontentvalue = C4::Context->preference('ExtraContentForXSLTDisplay'); |
250 |
my $extracontentproccessed = process_tt( $extracontentvalue, { record => $record } ); |
250 |
my $extracontentproccessed = process_tt( $extracontentvalue, { record => $record } ); |
251 |
my $cleanxml = $scrubber->scrub($extracontentproccessed); |
251 |
$extracontent = $scrubber->scrub($extracontentproccessed); |
252 |
$extracontentxml = qq{<extracontent><content>$cleanxml</content></extracontent>}; |
|
|
253 |
} |
252 |
} |
254 |
|
253 |
|
255 |
# embed variables |
254 |
# embed variables |
Lines 261-267
sub XSLTParse4Display {
Link Here
|
261 |
$varxml .= "</variables>\n"; |
260 |
$varxml .= "</variables>\n"; |
262 |
|
261 |
|
263 |
my $sysxml = get_xslt_sysprefs(); |
262 |
my $sysxml = get_xslt_sysprefs(); |
264 |
$xmlrecord =~ s/\<\/record\>/$itemsxml$extracontentxml$sysxml$varxml\<\/record\>/; |
263 |
$xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml$varxml\<\/record\>/; |
265 |
if ($fixamps) { # We need to correct the ampersand entities that Zebra outputs |
264 |
if ($fixamps) { # We need to correct the ampersand entities that Zebra outputs |
266 |
$xmlrecord =~ s/\&amp;/\&/g; |
265 |
$xmlrecord =~ s/\&amp;/\&/g; |
267 |
$xmlrecord =~ s/\&\;lt\;/\<\;/g; |
266 |
$xmlrecord =~ s/\&\;lt\;/\<\;/g; |
Lines 273-279
sub XSLTParse4Display {
Link Here
|
273 |
#If the xslt should fail, we will return undef (old behavior was |
272 |
#If the xslt should fail, we will return undef (old behavior was |
274 |
#raw MARC) |
273 |
#raw MARC) |
275 |
#Note that we did set do_not_return_source at object construction |
274 |
#Note that we did set do_not_return_source at object construction |
276 |
return $engine->transform( $xmlrecord, $xslfilename ); #file or URL |
275 |
my $transformed_xml = $engine->transform( $xmlrecord, $xslfilename ); |
|
|
276 |
|
277 |
my $concatenated_content = $transformed_xml . $extracontent; |
278 |
return $concatenated_content; |
277 |
} |
279 |
} |
278 |
|
280 |
|
279 |
=head2 buildKohaItemsNamespace |
281 |
=head2 buildKohaItemsNamespace |