Bugzilla – Attachment 21948 Details for
Bug 8252
Error in DOM biblio for UNIMARC (no range for fields 1xx)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8852 XSL handling sufield substring extraction
Bug-8852-XSL-handling-sufield-substring-extraction.patch (text/plain), 3.28 KB, created by
Jonathan Druart
on 2013-10-10 13:30:44 UTC
(
hide
)
Description:
Bug 8852 XSL handling sufield substring extraction
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-10-10 13:30:44 UTC
Size:
3.28 KB
patch
obsolete
>From 4fb97562e727b926f568a80659ec875ab121549d Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Tue, 24 Sep 2013 23:14:50 +0200 >Subject: [PATCH] Bug 8852 XSL handling sufield substring extraction > >This patch modify koha-indexdefs-to-zebra.xsl in order to add the >ability to populate indexes with subfield substring. > >It's now possible to understand such construction as: > ><index_subfields xmlns="http://..." tag="100" subfields="a" offset="7" length="1"> > <target_index>tpubdate:s</target_index> ></index_subfields> > >Signed-off-by:Mathieu Saby <mathieu.saby@univ-rennes2.fr> >I applied the patch and run xsltproc koha-indexdefs-to-zebra.xsl ../marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml > ../marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl >I lookes at the generated file. It looks nice. >Then I copied it file in my INSTALLDIR/etc/zebra.... and reindexed my records with rebuild_zebra.pl >I made some searches on coded position index and non coded position indexes, everything works. > >http://bugs.koha-community.org/show_bug.cgi?id=8252 > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl | 19 ++++++++++++++++++- > 1 file changed, 18 insertions(+), 1 deletion(-) > >diff --git a/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl b/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl >index 75e2a86..1488b1c 100644 >--- a/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl >+++ b/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl >@@ -253,6 +253,8 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xsl:template> > > <xsl:template name="handle-one-index-subfields"> >+ <xsl:variable name="offset"><xsl:value-of select="@offset"/></xsl:variable> >+ <xsl:variable name="length"><xsl:value-of select="@length"/></xsl:variable> > <xsl:variable name="indexes"> > <xsl:call-template name="get-target-indexes"/> > </xsl:variable> >@@ -265,7 +267,22 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xsl:attribute> > <z:index> > <xsl:attribute name="name"><xsl:value-of select="normalize-space($indexes)"/></xsl:attribute> >- <xslo:value-of select="."/> >+ <xslo:value-of> >+ <xsl:attribute name="select"> >+ <xsl:choose> >+ <xsl:when test="@length"> >+ <xsl:text>substring(., </xsl:text> >+ <xsl:value-of select="$offset + 1" /> >+ <xsl:text>, </xsl:text> >+ <xsl:value-of select="$length"/> >+ <xsl:text>)</xsl:text> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:text>.</xsl:text> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:attribute> >+ </xslo:value-of> > </z:index> > </xslo:if> > </xslo:for-each> >-- >1.7.10.4
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 8252
:
15007
|
15008
|
16945
|
16946
|
17970
|
17971
|
17972
|
21057
|
21058
|
21059
|
21430
|
21437
|
21438
|
21439
|
21452
|
21454
|
21945
|
21946
|
21947
| 21948 |
21949
|
22672