From 6257f50f6f9f8562ccae5016ebee587c50f097eb Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Thu, 16 Feb 2012 12:07:35 +0100 Subject: [PATCH] Bug 7537 - Implement TraceCompleteSubfields, TraceSubjectSubdivisions and TracingQuotes for NORMARC XSLT Content-Type: text/plain; charset="UTF-8" IMPORTANT! This patch relies on the patch for Bug 7092, and should be applied on top of that patch! It will not work without it. As the title says, this patch implements TraceCompleteSubfields, TraceSubjectSubdivisions and TracingQuotes for NORMARC XSLT, both for the OPAC and the Intranet. This affects how clickable subject-links are constructed. To make this work the indexing of MARC fields in the 600 range is changed to include "Subject:p" in several new places. To test: Find a record with a "complex" subject, like "Internet -- Law and legislation". MARC21 and NORMARC are very similar in how they handle subjects, so testing on a MARC21 database should be OK. (Changes in indexing reflect changes already made to the MARC21 indexing.) Make sure you have these syspref settings: - marcflavour = NORMARC - XSLTDetailsDisplay = using XSLT stylesheets - OPACXSLTDetailsDisplay = using XSLT stylesheets (Ideally, testing should be done on a real NORMARC setup, but since the changes to indexing only reflect how it's already done in MARC21, I think testing on a MARC21 installation with marcflavour = NORMARC should be OK.) Now try the different combinations of TraceCompleteSubfields, TraceSubjectSubdivisions and TracingQuotes, and check the format of the clickable links, both in the OPAC and staff client. Here's what you should be seeing: 1. TraceCompleteSubfields = Don't force TraceSubjectSubdivisions = Don't include TracingQuotes = quotes opac-search.pl?q=su:"Internet" TracingQuotes = curlybrace opac-search.pl?q=su:{Internet} 2. TraceCompleteSubfields = Force TraceSubjectSubdivisions = Don't include TracingQuotes = quotes opac-search.pl?q=su,complete-subfield:"Internet" TracingQuotes = curlybrace opac-search.pl?q=su,complete-subfield:{Internet} 3. TraceCompleteSubfields = Don't force TraceSubjectSubdivisions = Include TracingQuotes = quotes opac-search.pl?q=(su:"Internet") and (su:"Law and legislation.") TracingQuotes = curlybrace opac-search.pl?q=(su:{Internet}) and (su:{Law and legislation.}) 4. TraceCompleteSubfields = Force TraceSubjectSubdivisions = Include TracingQuotes = quotes opac-search.pl?q=(su,complete-subfield:"Internet") and (su,complete-subfield:"Law and legislation.") TracingQuotes = curlybrace opac-search.pl?q=(su,complete-subfield:{Internet}) and (su,complete-subfield:{Law and legislation.}) Signed-off-by: Jared Camins-Esakov --- etc/zebradb/marc_defs/normarc/biblios/record.abs | 36 +++++++++--------- .../prog/en/xslt/NORMARCslim2intranetDetail.xsl | 39 ++++++++++++++++-- .../prog/en/xslt/NORMARCslimUtils.xsl | 4 +- .../prog/en/xslt/NORMARCslim2OPACDetail.xsl | 41 +++++++++++++++++--- .../opac-tmpl/prog/en/xslt/NORMARCslimUtils.xsl | 4 +- 5 files changed, 93 insertions(+), 31 deletions(-) diff --git a/etc/zebradb/marc_defs/normarc/biblios/record.abs b/etc/zebradb/marc_defs/normarc/biblios/record.abs index 7495cc4..97d5334 100644 --- a/etc/zebradb/marc_defs/normarc/biblios/record.abs +++ b/etc/zebradb/marc_defs/normarc/biblios/record.abs @@ -177,25 +177,25 @@ melm 520 Abstract:w,Abstract:p #melm 533$d pubdate,pubdate:s #melm 541$d Date-of-acquisition,Date-of-acquisition:s -melm 600$a Name-and-title,Name,Personal-name,Subject-name-personal,Subject -melm 600$t Name-and-title,Title,Subject +melm 600$a Name-and-title,Name,Personal-name,Subject-name-personal,Subject,Subject:p +melm 600$t Name-and-title,Title,Subject,Subject:p melm 600$9 Koha-Auth-Number #melm 600 Name,Personal-name,Subject-heading,Subject-name-personal -melm 600 Name,Personal-name,Subject-name-personal,Subject -melm 610$a Name-and-title -melm 610$t Name-and-title,Title +melm 600 Name,Personal-name,Subject-name-personal,Subject,Subject:p +melm 610$a Name-and-title,Subject,Subject:p +melm 610$t Name-and-title,Title,Subject,Subject:p melm 610$9 Koha-Auth-Number -melm 610 Name,Subject,Corporate-name -melm 611 Conference-name -melm 611$a Name-and-title -melm 611$t Name-and-title,Title +melm 610 Name,Subject,Corporate-name,Subject,Subject:p +melm 611 Conference-name,Subject,Subject:p +melm 611$a Name-and-title,Subject,Subject:p +melm 611$t Name-and-title,Title,Subject,Subject:p melm 611$9 Koha-Auth-Number -melm 611 Name,Subject -melm 630$i Thematic-number -melm 630$n Thematic-number -melm 630$r Music-key +melm 611 Name,Subject,Subject:p +melm 630$i Thematic-number,Subject,Subject:p +melm 630$n Thematic-number,Subject,Subject:p +melm 630$r Music-key,Subject,Subject:p melm 630$9 Koha-Auth-Number -melm 630 Subject +melm 630 Subject,Subject:p melm 650$9 Koha-Auth-Number melm 650 Subject,Subject:p melm 651$9 Koha-Auth-Number @@ -205,13 +205,13 @@ melm 652$9 Koha-Auth-Number melm 653$9 Koha-Auth-Number melm 653 Subject,Subject:p melm 654$9 Koha-Auth-Number -melm 654 Subject +melm 654 Subject,Subject:p melm 655$9 Koha-Auth-Number -melm 655 Subject +melm 655 Subject,Subject:p melm 656$9 Koha-Auth-Number -melm 656 Subject +melm 656 Subject,Subject:p melm 657$9 Koha-Auth-Number -melm 657 Subject +melm 657 Subject,Subject:p melm 690$9 Koha-Auth-Number melm 690 Subject,Subject:p diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl index 163ed29..90dc602 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl @@ -15,6 +15,21 @@ + ,complete-subfield + + + + { + " + + + + + } + " + + + @@ -293,16 +308,29 @@ + + - Emner: + Emne(r): - - /cgi-bin/koha/catalogue/search.pl?q=an: + + + /cgi-bin/koha/catalogue/search.pl?q= + abcdvxyz + and + (su: + ) + + - /cgi-bin/koha/catalogue/search.pl?q=su: + /cgi-bin/koha/catalogue/search.pl?q=su: @@ -313,7 +341,8 @@ -- - + + | diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl index 7c2bf21..606727e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl @@ -24,13 +24,15 @@ + + - + diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl index 19cee91..bcf9eca 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl @@ -16,7 +16,22 @@ - + + ,complete-subfield + + + + { + " + + + + + } + " + + + @@ -301,16 +316,29 @@ + + - Emner: + Emne(r): - - /cgi-bin/koha/opac-search.pl?q=an: + + + /cgi-bin/koha/opac-search.pl?q= + abcdvxyz + and + (su: + ) + + - /cgi-bin/koha/opac-search.pl?q=su: + /cgi-bin/koha/opac-search.pl?q=su: @@ -321,7 +349,8 @@ -- - + + | diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslimUtils.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslimUtils.xsl index 31317b1..91a0437 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslimUtils.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslimUtils.xsl @@ -25,13 +25,15 @@ + + - + -- 1.7.2.5