Bugzilla – Attachment 12903 Details for
Bug 3087
Z39.50 server returns usmarc format records for UNIMARC DB
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Signed patch for 3087
patch.txt (text/plain), 16.22 KB, created by
Marcel de Rooy
on 2012-10-18 10:19:02 UTC
(
hide
)
Description:
Signed patch for 3087
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2012-10-18 10:19:02 UTC
Size:
16.22 KB
patch
obsolete
>From 8e85d4926ca9409a337c025d7f32bafbd519b3a1 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Wed, 11 Apr 2012 17:36:40 +0200 >Subject: [PATCH] Bug 3087 Fix Z39.50 server to return the correct record > syntax >Content-Type: text/plain; charset="utf-8" > >Modify Makefile.PL and Zebra configuration files in order to parametrized >biblio record type returned by Zebra Z39.50 server. > >How to test: > >- Test with a MARC21 and a UNIMARC DB >- Do a new installation >- Search from OPAC >- Search from a Z39.50 client like yaz-client: syntax = MARC21/UNIMARC must be > choosed >- It was working for MARC21: it continues to work >- It wasn't working for UNIMARC: it works now, both in OPAC and from a Z39.50 > client > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Works fine for MARC21. Frederic looked at UNIMARC. Magnus looked at NORMARC. >GRS1 works okay for me. I still have issues with DOM, but they are not directly related to changes in this patch. >A followup is still needed for packaging (debian/templates). >--- > C4/Context.pm | 2 + > Makefile.PL | 1 + > etc/koha-conf.xml | 46 +++++++++++++++--------------- > etc/zebradb/etc/usmarc.mar | 4 +- > etc/zebradb/retrieval-info-auth-dom.xml | 4 +- > etc/zebradb/retrieval-info-auth-grs1.xml | 14 ++++---- > etc/zebradb/retrieval-info-bib-dom.xml | 4 +- > etc/zebradb/retrieval-info-bib-grs1.xml | 14 ++++---- > 8 files changed, 46 insertions(+), 43 deletions(-) > >diff --git a/C4/Context.pm b/C4/Context.pm >index a95c6b6..e785002 100644 >--- a/C4/Context.pm >+++ b/C4/Context.pm >@@ -656,6 +656,8 @@ sub Zconn { > $context->{"Zconn"}->{$server}->destroy() if defined($context->{"Zconn"}->{$server}); > > $context->{"Zconn"}->{$server} = &_new_Zconn($server,$async,$auth,$piggyback,$syntax); >+ $context->{ Zconn }->{ $server }->option( >+ preferredRecordSyntax => C4::Context->preference("marcflavour") ); > return $context->{"Zconn"}->{$server}; > } > } >diff --git a/Makefile.PL b/Makefile.PL >index b6ca640..b677f6a 100644 >--- a/Makefile.PL >+++ b/Makefile.PL >@@ -508,6 +508,7 @@ my $pl_files = { > if ($config{'INSTALL_ZEBRA'} eq "yes") { > push @{ $pl_files->{'rewrite-config.PL'} }, ( > 'blib/ZEBRA_CONF_DIR/etc/passwd', >+ 'blib/ZEBRA_CONF_DIR/etc/usmarc.mar', > 'blib/ZEBRA_CONF_DIR/zebra-biblios.cfg', > 'blib/ZEBRA_CONF_DIR/zebra-biblios-dom.cfg', > 'blib/ZEBRA_CONF_DIR/zebra-authorities.cfg', >diff --git a/etc/koha-conf.xml b/etc/koha-conf.xml >index a54c173..53d7ce8 100644 >--- a/etc/koha-conf.xml >+++ b/etc/koha-conf.xml >@@ -44,47 +44,47 @@ __PAZPAR2_TOGGLE_XML_POST__ > xmlns:xi="http://www.w3.org/2001/XInclude"> > <xi:fallback> > <retrievalinfo> >- <retrieval syntax="usmarc" name="F"/> >- <retrieval syntax="usmarc" name="B"/> >+ <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"/> >+ <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="B"/> > <retrieval syntax="xml" name="F"/> > <retrieval syntax="xml" name="B"/> > <retrieval syntax="xml" name="marcxml" > identifier="info:srw/schema/1/marcxml-v1.1"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="dc"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2DC.xsl"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="mods"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2MODS.xsl"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="rdfdc"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2RDFDC.xsl"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="rss2"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2RSS2.xsl"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="utils"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slimUtils.xsl"/> >@@ -124,38 +124,38 @@ __PAZPAR2_TOGGLE_XML_POST__ > xmlns:xi="http://www.w3.org/2001/XInclude"> > <xi:fallback> > <retrievalinfo> >- <retrieval syntax="usmarc" name="F"/> >- <retrieval syntax="usmarc" name="B"/> >+ <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"/> >+ <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="B"/> > <retrieval syntax="xml" name="marcxml" > identifier="info:srw/schema/1/marcxml-v1.1"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="dc"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2DC.xsl"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="mods"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2MODS.xsl"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="rdfdc"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2RDFDC.xsl"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="utils"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slimUtils.xsl"/> >@@ -193,47 +193,47 @@ __PAZPAR2_TOGGLE_XML_POST__ > xmlns:xi="http://www.w3.org/2001/XInclude"> > <xi:fallback> > <retrievalinfo> >- <retrieval syntax="usmarc" name="F"/> >- <retrieval syntax="usmarc" name="B"/> >+ <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"/> >+ <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="B"/> > <retrieval syntax="xml" name="F"/> > <retrieval syntax="xml" name="B"/> > <retrieval syntax="xml" name="marcxml" > identifier="info:srw/schema/1/marcxml-v1.1"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="dc"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2DC.xsl"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="mods"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2MODS.xsl"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="rdfdc"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2RDFDC.xsl"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="rss2"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2RSS2.xsl"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="utils"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slimUtils.xsl"/> >diff --git a/etc/zebradb/etc/usmarc.mar b/etc/zebradb/etc/usmarc.mar >index 99920f9..a977ae5 100644 >--- a/etc/zebradb/etc/usmarc.mar >+++ b/etc/zebradb/etc/usmarc.mar >@@ -1,3 +1,3 @@ > # $Id: usmarc.mar,v 1.1 2002/10/22 12:51:09 adam Exp $ >-name usmarc >-reference USmarc >+name __ZEBRA_MARC_FORMAT__ >+reference __ZEBRA_MARC_FORMAT__ >diff --git a/etc/zebradb/retrieval-info-auth-dom.xml b/etc/zebradb/retrieval-info-auth-dom.xml >index 3093c72..f848012 100644 >--- a/etc/zebradb/retrieval-info-auth-dom.xml >+++ b/etc/zebradb/retrieval-info-auth-dom.xml >@@ -1,13 +1,13 @@ > <?xml version="1.0" encoding="UTF-8"?> > <retrievalinfo xmlns="http://indexdata.com/yaz"> >- <retrieval syntax="usmarc" name="F"> >+ <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <backend syntax="xml" name="marc"> > <marc inputformat="xml" outputformat="marc" > inputcharset="utf-8" > outputcharset="utf-8"/> > </backend> > </retrieval> >- <retrieval syntax="usmarc" name="B"> >+ <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="B"> > <backend syntax="xml" name="marc"> > <marc inputformat="xml" outputformat="marc" > inputcharset="utf-8" >diff --git a/etc/zebradb/retrieval-info-auth-grs1.xml b/etc/zebradb/retrieval-info-auth-grs1.xml >index 58f319d..f1f8898 100644 >--- a/etc/zebradb/retrieval-info-auth-grs1.xml >+++ b/etc/zebradb/retrieval-info-auth-grs1.xml >@@ -1,37 +1,37 @@ > <?xml version="1.0" encoding="UTF-8"?> > <retrievalinfo xmlns="http://indexdata.com/yaz"> >- <retrieval syntax="usmarc" name="F"/> >- <retrieval syntax="usmarc" name="B"/> >+ <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"/> >+ <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="B"/> > <retrieval syntax="xml" name="marcxml" > identifier="info:srw/schema/1/marcxml-v1.1"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="dc"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2DC.xsl"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="mods"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2MODS.xsl"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="rdfdc"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2RDFDC.xsl"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="utils"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slimUtils.xsl"/> >diff --git a/etc/zebradb/retrieval-info-bib-dom.xml b/etc/zebradb/retrieval-info-bib-dom.xml >index 3093c72..f848012 100644 >--- a/etc/zebradb/retrieval-info-bib-dom.xml >+++ b/etc/zebradb/retrieval-info-bib-dom.xml >@@ -1,13 +1,13 @@ > <?xml version="1.0" encoding="UTF-8"?> > <retrievalinfo xmlns="http://indexdata.com/yaz"> >- <retrieval syntax="usmarc" name="F"> >+ <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <backend syntax="xml" name="marc"> > <marc inputformat="xml" outputformat="marc" > inputcharset="utf-8" > outputcharset="utf-8"/> > </backend> > </retrieval> >- <retrieval syntax="usmarc" name="B"> >+ <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="B"> > <backend syntax="xml" name="marc"> > <marc inputformat="xml" outputformat="marc" > inputcharset="utf-8" >diff --git a/etc/zebradb/retrieval-info-bib-grs1.xml b/etc/zebradb/retrieval-info-bib-grs1.xml >index 58f319d..f1f8898 100644 >--- a/etc/zebradb/retrieval-info-bib-grs1.xml >+++ b/etc/zebradb/retrieval-info-bib-grs1.xml >@@ -1,37 +1,37 @@ > <?xml version="1.0" encoding="UTF-8"?> > <retrievalinfo xmlns="http://indexdata.com/yaz"> >- <retrieval syntax="usmarc" name="F"/> >- <retrieval syntax="usmarc" name="B"/> >+ <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"/> >+ <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="B"/> > <retrieval syntax="xml" name="marcxml" > identifier="info:srw/schema/1/marcxml-v1.1"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="dc"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2DC.xsl"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="mods"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2MODS.xsl"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="rdfdc"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2RDFDC.xsl"/> > </backend> > </retrieval> > <retrieval syntax="xml" name="utils"> >- <backend syntax="usmarc" name="F"> >+ <backend syntax="__ZEBRA_MARC_FORMAT__" name="F"> > <marc inputformat="marc" outputformat="marcxml" > inputcharset="utf-8"/> > <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slimUtils.xsl"/> >-- >1.7.7.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 3087
:
9122
|
10579
|
11886
| 12903