|
Lines 63-91
if($importid) {
Link Here
|
| 63 |
$xmlrecord = $record->as_xml(); |
63 |
$xmlrecord = $record->as_xml(); |
| 64 |
} |
64 |
} |
| 65 |
} |
65 |
} |
| 66 |
|
66 |
|
| 67 |
if($view eq 'card') { |
67 |
if($view eq 'card') { |
| 68 |
$xmlrecord = GetXmlBiblio($biblionumber) unless $xmlrecord; |
68 |
my $themelang = '/' . C4::Context->preference("opacthemes") . '/' . C4::Templates::_current_language(); |
| 69 |
|
69 |
|
| 70 |
my $xslfile = C4::Context->config('intrahtdocs')."/prog/en/xslt/compact.xsl"; |
70 |
$xmlrecord = GetXmlBiblio($biblionumber) unless $xmlrecord; |
| 71 |
my $parser = XML::LibXML->new(); |
|
|
| 72 |
my $xslt = XML::LibXSLT->new(); |
| 73 |
my $source = $parser->parse_string($xmlrecord); |
| 74 |
my $style_doc = $parser->parse_file($xslfile); |
| 75 |
my $stylesheet = $xslt->parse_stylesheet($style_doc); |
| 76 |
my $results = $stylesheet->transform($source); |
| 77 |
my $newxmlrecord = $stylesheet->output_string($results); |
| 78 |
#warn $newxmlrecord; |
| 79 |
print "Content-type: text/html\n\n"; |
| 80 |
utf8::encode($newxmlrecord); |
| 81 |
print $newxmlrecord; |
| 82 |
|
71 |
|
|
|
72 |
my $xslfile = C4::Context->config('intrahtdocs').$themelang."/xslt/compact.xsl"; |
| 73 |
my $parser = XML::LibXML->new(); |
| 74 |
my $xslt = XML::LibXSLT->new(); |
| 75 |
my $source = $parser->parse_string($xmlrecord); |
| 76 |
my $style_doc = $parser->parse_file($xslfile); |
| 77 |
my $stylesheet = $xslt->parse_stylesheet($style_doc); |
| 78 |
my $results = $stylesheet->transform($source); |
| 79 |
my $newxmlrecord = $stylesheet->output_string($results); |
| 80 |
#warn $newxmlrecord; |
| 81 |
print "Content-type: text/html\n\n"; |
| 82 |
utf8::encode($newxmlrecord); |
| 83 |
print $newxmlrecord; |
| 83 |
} else { |
84 |
} else { |
|
|
85 |
$record =GetMarcBiblio($biblionumber) unless $record; |
| 84 |
|
86 |
|
| 85 |
$record =GetMarcBiblio($biblionumber) unless $record; |
87 |
my $formatted = $record->as_formatted; |
| 86 |
|
88 |
$template->param( MARC_FORMATTED => $formatted ); |
| 87 |
my $formatted = $record->as_formatted; |
|
|
| 88 |
$template->param( MARC_FORMATTED => $formatted ); |
| 89 |
|
89 |
|
| 90 |
output_html_with_http_headers $input, $cookie, $template->output; |
90 |
output_html_with_http_headers $input, $cookie, $template->output; |
| 91 |
} |
91 |
} |