[Koha-devel] XSLT for Unimarc also

Frederic Demians frederic at tamil.fr
Wed Mar 25 13:09:02 CET 2009


> I want to use XSLT display for Unimar also.
> I read the code of Opac and I found two points
> to fix:
>
> opac.detail.pl
> line 63
> my $newxmlrecord =
> XSLTParse4Display($biblionumber,C4::Context->config('opachtdocs')."/prog/en/xslt/MARC21slim2OPACDetail.xsl");
>
> opac-showmarc.pl
> line 68
> my $xslfile =
> C4::Context->config('intranetdir')."/koha-tmpl/intranet-tmpl/prog/en/xslt/compact.xsl";
>
> If I change the lines and the .xsl files, can I use XSLT with Unimarc ?

Yes. Of course two UNIMARC specific XSLT files will be required :

    * UNIMARCslim2OPACDetail.xsl
    * UNIMARCslim2OPACResult.xsl

And you can add this line to select UNIMARC/MARC21 XSLT depending on 
marcflavour syspref :

my $xslt_file = C4::Context->config('intranetdir') .
                "/koha-tmpl/intranet-tmpl/prog/en/xslt/" .
                C4::Context->preference('marcflavour') .
                "UNIMARCslim2OPACDetail.xsl";

Next steps:

   1. Modify Koha translation process in order allow XSLT translation.
   2. Select XSLT depending on marcflavour AND language.


-- 
Frédéric



More information about the Koha-devel mailing list