[Koha] Customized XSLT stylesheets for more than one language
King, Fred
Fred.King at Medstar.net
Sat Nov 17 02:20:42 NZDT 2018
I've modified my xsl files extensively for the MedStar Authors Catalog. Two thoughts:
First, xslt files are very easy to break. One little > out of place can make the entire display higgledy piggledy. Go back and check every modification looking for stray characters.
Second, both the Detail.xsl and Results.xsl files have to know where the Utils.xsl file is. Check to see if the path is correct. If you modify the xsl files, I'd recommend putting them somewhere else--that way when you update Koha, they won't get overwritten. So far I haven't run into an update that broke my old stylesheets. For mysterious reasons having to do with my organization's firewall, I put all of my xsl files on a different server, so my authcatDetail.xsl and authcatResults.xsl files have the line
<xsl:import href="http://dokument.space/scratchmonkey/authcatUtils.xsl"/>
in them. A bit clumsy, but it works.
Good luck!
Fred King
Medical Librarian, MedStar Washington Hospital Center
fred.king at medstar.net
202-877-6670
ORCID 0000-0001-5266-0279
MedStar Authors Catalog: http://medstarauthors.org
Somehow it seems I managed to get old. I really have no idea how that happened.
--Brian Baker
-----Original Message-----
From: Koha [mailto:koha-bounces at lists.katipo.co.nz] On Behalf Of Michael Kuhn
Sent: Thursday, November 15, 2018 4:55 PM
To: Koha : access
Subject: [Koha] Customized XSLT stylesheets for more than one language
** ATTENTION: This email originated from outside the MedStar network. ** DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.
Hi
Our library has two Koha instances. For one of them we need to customize
the XSLT stylesheets used for the detail page - for this instance we
need to have our own detail page in English (en) and our own detail page
in German (de-DE).
According to
https://urldefense.proofpoint.com/v2/url?u=https-3A__koha-2Dcommunity.org_manual_18.05_en_html_02-5Fadministration.html-23opacxsltdetailsdisplay&d=DwIGaQ&c=RvBXVp2Kc-itN3g6r3sN0QK_zL4whPpndVxj8-bJ04M&r=vKh6XwOmjyC51IkP1OfsdjQZoWT2vpi6VZl8El8EPRI&m=k3ccE0qx0BrZ1JahhteabqKE3iaaR_CTKT0_IWkgpNU&s=tRQ6NTiKywKuurQ8cZg4LBNHrArda5MM2f1LB2c9-rM&e=
I tried to do the following under Koha 18.05 in my own demo installation:
* I created the files
"/usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/en/MARC21slim2OPACDetail-CUSTOM.xsl"
and
"/usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/de-DE/MARC21slim2OPACDetail-CUSTOM.xsl"
using the original stylesheets but just making some slight changes for a
start (for example writing "XXXEdition: " instead of "Edition: " which
works without problems when changing the standard file) ...I also tried
using other paths but to no avail...
* In Koha system preference "OPACXSLTDetailsDisplay" I entered
"/usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/{langcode}/MARC21slim2OPACDetail-CUSTOM.xsl"
* I restarted Koha using "service koha-common restart"
* I also restarted the Apache HTTP Server using "service apache2 restart"
However, when searching the OPAC in the normal view the actual details
won't show up at all anymore, just the tags, the stars and the holdings
table of the respective record; MARC view and ISBD view show the data is
there. There seems to be something wrong when using paths, even when not
using {langcode}... And it also doesn't work when using an external URL
like https://urldefense.proofpoint.com/v2/url?u=http-3A__adminkuhn.ch_download_MARC21slim2OPACDetail.xsl&d=DwIGaQ&c=RvBXVp2Kc-itN3g6r3sN0QK_zL4whPpndVxj8-bJ04M&r=vKh6XwOmjyC51IkP1OfsdjQZoWT2vpi6VZl8El8EPRI&m=k3ccE0qx0BrZ1JahhteabqKE3iaaR_CTKT0_IWkgpNU&s=cJ2L8jrQ7DnC-CxCUX6NZA03sU-TNIUtDQKwS2M1jqw&e=
Has anyone done this before, how can this actually be achieved? What am
I missing?
Best wishes: Michael
--
Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
T 0041 (0)61 261 55 61 · E mik at adminkuhn.ch · W https://urldefense.proofpoint.com/v2/url?u=http-3A__www.adminkuhn.ch&d=DwIGaQ&c=RvBXVp2Kc-itN3g6r3sN0QK_zL4whPpndVxj8-bJ04M&r=vKh6XwOmjyC51IkP1OfsdjQZoWT2vpi6VZl8El8EPRI&m=k3ccE0qx0BrZ1JahhteabqKE3iaaR_CTKT0_IWkgpNU&s=UAIp6-mgGg6JWh2ncoJjh8ua-Z0zg4dN0lVvHGiVfqE&e=
_______________________________________________
Koha mailing list https://urldefense.proofpoint.com/v2/url?u=http-3A__koha-2Dcommunity.org&d=DwIGaQ&c=RvBXVp2Kc-itN3g6r3sN0QK_zL4whPpndVxj8-bJ04M&r=vKh6XwOmjyC51IkP1OfsdjQZoWT2vpi6VZl8El8EPRI&m=k3ccE0qx0BrZ1JahhteabqKE3iaaR_CTKT0_IWkgpNU&s=gtuRdTjHMAJ5V0-hRLFTHW91HyaoT092RmWYgjujqeE&e=
Koha at lists.katipo.co.nz
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.katipo.co.nz_mailman_listinfo_koha&d=DwIGaQ&c=RvBXVp2Kc-itN3g6r3sN0QK_zL4whPpndVxj8-bJ04M&r=vKh6XwOmjyC51IkP1OfsdjQZoWT2vpi6VZl8El8EPRI&m=k3ccE0qx0BrZ1JahhteabqKE3iaaR_CTKT0_IWkgpNU&s=sDpBIO5QDCsdHyD6pwLquYQ5VdSk_ESSzcjQlye6pD0&e=
More information about the Koha
mailing list