my $stylesheet;
sub XSLTParse4Display {
- my ( $biblionumber, $orig_record, $xsl_suffix, $interface ) = @_;
+ my ( $biblionumber, $orig_record, $xsl_suffix, $interface, $fixamps ) = @_;
$interface = 'opac' unless $interface;
# grab the XML, run it through our stylesheet, push it out to the browser
my $record = transformMARCXML4XSLT($biblionumber, $orig_record);
foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow
DisplayOPACiconsXSLT URLLinkText viewISBD
OPACBaseURL TraceCompleteSubfields
- UseAuthoritiesForTracings / )
+ UseAuthoritiesForTracings TraceSubjectSubdivisions / )
{
my $sp = C4::Context->preference( $syspref );
next unless defined($sp);
}
$sysxml .= "</sysprefs>\n";
$xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml\<\/record\>/;
+ if ($fixamps) { # We need to correct the ampersand entities that Zebra outputs
+ $xmlrecord =~ s/\&amp;/\&/g;
+ }
$xmlrecord =~ s/\& /\&\; /;
- $xmlrecord=~ s/\&\;amp\; /\&\; /;
+ $xmlrecord =~ s/\&\;amp\; /\&\; /;
my $parser = XML::LibXML->new();
# don't die when you find &, >, etc