Bug 32021: Don't show 'appear in position' for Pages
[srvgit] / opac / unapi
index 9202683..ffc325c 100755 (executable)
@@ -17,8 +17,7 @@
 # You should have received a copy of the GNU General Public License
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
-use strict;
-use warnings;
+use Modern::Perl;
 
 =head1 NAME
 
@@ -39,8 +38,8 @@ an XML format such as OAI DC, RSS2, MARCXML, or MODS.
 
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Biblio;
-use Koha::XSLT_Handler;
+use C4::Biblio qw( GetXmlBiblio );
+use Koha::XSLT::Base;
 
 my $cgi = CGI->new();
 binmode(STDOUT, ":encoding(UTF-8)"); #output as utf8
@@ -74,19 +73,6 @@ my $format_to_stylesheet_map = {
         'rss2-full'    => 'MARC21slim2RSS2.xsl',
         'srw_dc'       => 'MARC21slim2SRWDC.xsl',
     },
-    'NORMARC' => {
-        'marcxml'      => 'identity.xsl',
-        'marcxml-full' => 'identity.xsl',
-        'mods'         => 'MARC21slim2MODS.xsl',
-        'mods-full'    => 'MARC21slim2MODS.xsl',
-        'mods3'        => 'MARC21slim2MODS3-1.xsl',
-        'mods3-full'   => 'MARC21slim2MODS3-1.xsl',
-        'oai_dc'       => 'MARC21slim2OAIDC.xsl',
-        'rdfdc',       => 'MARC21slim2RDFDC.xsl',
-        'rss2'         => 'MARC21slim2RSS2.xsl',
-        'rss2-full'    => 'MARC21slim2RSS2.xsl',
-        'srw_dc'       => 'MARC21slim2SRWDC.xsl',
-    },
     'UNIMARC' => {
         'marcxml'      => 'identity.xsl',
         'marcxml-full' => 'identity.xsl',
@@ -142,7 +128,7 @@ if (not defined $format) {
             print $cgi->header( -status => '406 invalid format requested' );
             exit 0;
         }
-        my $xslt_engine = Koha::XSLT_Handler->new;
+        my $xslt_engine = Koha::XSLT::Base->new;
         $content = $xslt_engine->transform({
             xml => $marcxml,
             file => $xslt_file,