Re: [Koha] Use and possible removal of Keyword to MARC mapping config

2018-11-16 Thread Renvoize, Martin
+1 from here too, it would be a nice cleanup.

On Fri, 9 Nov 2018, 1:26 pm Owen Leonard  > What I've done so far builds on the idea that we could get rid of
> > "Keyword to MARC mapping" (fieldmapping table) and rely solely on the
> > framework and stored fields like is done for all the other fields
>
> A quick test of the bug worked very well. I think this could be a
> great improvement.
>
> For what it's worth, this is what our Keyword to MARC mapping looks
> like (MARC21):
>
> subtitle 245 b
> subtitle 245 n
> subtitle 245 p
> subtitle 245 h
>
>   -- Owen
>
> --
> Web Developer
> Athens County Public Libraries
> https://www.myacpl.org
> ___
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha
>
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Customized XSLT stylesheets for more than one language

2018-11-16 Thread Michael Kuhn

Hi Andreas and Fred

Thanks for your answers and suggestions!

I'm baffled... after the daily resetting of my demo installation the 
thing that didn't work yesterday does work today... So for example in 
system preference "OPACXSLTDetailsDisplay" the path 
"/usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/{langcode}/xslt/MARC21slim2OPACDetail-CUSTOM.xsl" 
will use the respective file in directory "en" or "de-DE" when changing 
the language.


So I can positively say using {langcode} works as described... although 
it seems definitely necessary to restart koha-common / apache2 after 
making some change in the XSLT files. Otherwise you will probably 
experience confusing behavior of the view in the webbrowser (probably 
depending on browser caching and/or Plack).


Best wishes & happy weekend: 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 m...@adminkuhn.ch · W www.adminkuhn.ch
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Customized XSLT stylesheets for more than one language

2018-11-16 Thread King, Fred
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 
   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.k...@medstar.net
202-877-6670
ORCID -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-boun...@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=DwIGaQ=RvBXVp2Kc-itN3g6r3sN0QK_zL4whPpndVxj8-bJ04M=vKh6XwOmjyC51IkP1OfsdjQZoWT2vpi6VZl8El8EPRI=k3ccE0qx0BrZ1JahhteabqKE3iaaR_CTKT0_IWkgpNU=tRQ6NTiKywKuurQ8cZg4LBNHrArda5MM2f1LB2c9-rM=
 
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=DwIGaQ=RvBXVp2Kc-itN3g6r3sN0QK_zL4whPpndVxj8-bJ04M=vKh6XwOmjyC51IkP1OfsdjQZoWT2vpi6VZl8El8EPRI=k3ccE0qx0BrZ1JahhteabqKE3iaaR_CTKT0_IWkgpNU=cJ2L8jrQ7DnC-CxCUX6NZA03sU-TNIUtDQKwS2M1jqw=

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 m...@adminkuhn.ch · W 
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.adminkuhn.ch=DwIGaQ=RvBXVp2Kc-itN3g6r3sN0QK_zL4whPpndVxj8-bJ04M=vKh6XwOmjyC51IkP1OfsdjQZoWT2vpi6VZl8El8EPRI=k3ccE0qx0BrZ1JahhteabqKE3iaaR_CTKT0_IWkgpNU=UAIp6-mgGg6JWh2ncoJjh8ua-Z0zg4dN0lVvHGiVfqE=
___
Koha mailing list  
https://urldefense.proofpoint.com/v2/url?u=http-3A__koha-2Dcommunity.org=DwIGaQ=RvBXVp2Kc-itN3g6r3sN0QK_zL4whPpndVxj8-bJ04M=vKh6XwOmjyC51IkP1OfsdjQZoWT2vpi6VZl8El8EPRI=k3ccE0qx0BrZ1JahhteabqKE3iaaR_CTKT0_IWkgpNU=gtuRdTjHMAJ5V0-hRLFTHW91HyaoT092RmWYgjujqeE=
Koha@lists.katipo.co.nz
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.katipo.co.nz_mailman_listinfo_koha=DwIGaQ=RvBXVp2Kc-itN3g6r3sN0QK_zL4whPpndVxj8-bJ04M=vKh6XwOmjyC51IkP1OfsdjQZoWT2vpi6VZl8El8EPRI=k3ccE0qx0BrZ1JahhteabqKE3iaaR_CTKT0_IWkgpNU=sDpBIO5QDCsdHyD6pwLquYQ5VdSk_ESSzcjQlye6pD0=
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz

Re: [Koha] Customized XSLT stylesheets for more than one language

2018-11-16 Thread Andreas Roussos
Hi Michael,

There _may_ be a syntax error in your customised stylesheet.

What I tend to do whenever I make changes to our .xsl files is to test the
validity of the output by running the following in a terminal:

xsltproc  

... and then I inspect the output. You can create a file with sample
MARCXML data with an SQL query like this:

SELECT metadata FROM biblio_metadata WHERE biblionumber = 1786 INTO OUTFILE
'/tmp/biblio1786.marcxml' FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY ''
ESCAPED BY '' LINES TERMINATED BY '' ;

I hope this helps.

Kind regards,
Andreas

On Thu, 15 Nov 2018 at 23:56, Michael Kuhn  wrote:

> 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://koha-community.org/manual/18.05/en/html/02_administration.html#opacxsltdetailsdisplay
> 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 http://adminkuhn.ch/download/MARC21slim2OPACDetail.xsl
>
> 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 m...@adminkuhn.ch · W www.adminkuhn.ch
> ___
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha
>
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha