View | Details | Raw Unified | Return to bug 9352
Collapse All | Expand All

(-)a/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml (+4 lines)
Lines 302-307 Link Here
302
  </index_subfields>
302
  </index_subfields>
303
  <!--700 : Physical author (main)-->
303
  <!--700 : Physical author (main)-->
304
  <!--Do not index $f (dates),$c (additions other than dates),$p (affiliation/address),$3,$4. Index $9 only in Koha-Auth-Number. Index $a in Author:s-->
304
  <!--Do not index $f (dates),$c (additions other than dates),$p (affiliation/address),$3,$4. Index $9 only in Koha-Auth-Number. Index $a in Author:s-->
305
  <index_group_of_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="700" subfields="abdg">
306
    <target_index>Author:p</target_index>
307
    <target_index>Personal-name:p</target_index>
308
  </index_group_of_subfields>
305
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="700" subfields="9">
309
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="700" subfields="9">
306
    <target_index>Koha-Auth-Number:w</target_index>
310
    <target_index>Koha-Auth-Number:w</target_index>
307
    <target_index>Koha-Auth-Number:n</target_index>
311
    <target_index>Koha-Auth-Number:n</target_index>
(-)a/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl (+15 lines)
Lines 58-63 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
58
      <xslo:value-of select="."/>
58
      <xslo:value-of select="."/>
59
    </z:index>
59
    </z:index>
60
  </xslo:template>
60
  </xslo:template>
61
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']">
62
    <z:index name="Author:p Personal-name:p">
63
      <xslo:variable name="group_of_subfields">
64
        <xslo:for-each select="marc:subfield">
65
          <xslo:if test="contains('abdg', @code)">
66
            <xslo:value-of select="."/>
67
            <xslo:if test="position() != last()">
68
              <xslo:value-of select="substring(' ', 1, 1)"/>
69
            </xslo:if>
70
          </xslo:if>
71
        </xslo:for-each>
72
      </xslo:variable>
73
      <xslo:value-of select="normalize-space($group_of_subfields)"/>
74
    </z:index>
75
  </xslo:template>
61
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='090']">
76
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='090']">
62
    <xslo:for-each select="marc:subfield">
77
    <xslo:for-each select="marc:subfield">
63
      <xslo:if test="contains('9', @code)">
78
      <xslo:if test="contains('9', @code)">
(-)a/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl (-1 / +42 lines)
Lines 14-19 Link Here
14
    <!-- Keys on tags referenced in the index definitions -->
14
    <!-- Keys on tags referenced in the index definitions -->
15
    <xsl:key name="index_control_field_tag"   match="kohaidx:index_control_field"   use="@tag"/>
15
    <xsl:key name="index_control_field_tag"   match="kohaidx:index_control_field"   use="@tag"/>
16
    <xsl:key name="index_subfields_tag" match="kohaidx:index_subfields" use="@tag"/>
16
    <xsl:key name="index_subfields_tag" match="kohaidx:index_subfields" use="@tag"/>
17
    <xsl:key name="index_group_of_subfields_tag" match="kohaidx:index_group_of_subfields" use="@tag"/>
17
    <xsl:key name="index_heading_tag"   match="kohaidx:index_heading"   use="@tag"/>
18
    <xsl:key name="index_heading_tag"   match="kohaidx:index_heading"   use="@tag"/>
18
    <xsl:key name="index_data_field_tag"   match="kohaidx:index_data_field"   use="@tag"/>
19
    <xsl:key name="index_data_field_tag"   match="kohaidx:index_data_field"   use="@tag"/>
19
    <xsl:key name="index_heading_conditional_tag" match="kohaidx:index_heading_conditional" use="@tag"/>
20
    <xsl:key name="index_heading_conditional_tag" match="kohaidx:index_heading_conditional" use="@tag"/>
Lines 67-72 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
67
68
68
            <xsl:call-template name="handle-index-leader"/>
69
            <xsl:call-template name="handle-index-leader"/>
69
            <xsl:call-template name="handle-index-control-field"/>
70
            <xsl:call-template name="handle-index-control-field"/>
71
            <xsl:call-template name="handle-index-group-of-subfields"/>
70
            <xsl:call-template name="handle-index-subfields"/>
72
            <xsl:call-template name="handle-index-subfields"/>
71
            <xsl:call-template name="handle-index-data-field"/>
73
            <xsl:call-template name="handle-index-data-field"/>
72
            <xsl:call-template name="handle-index-heading"/>
74
            <xsl:call-template name="handle-index-heading"/>
Lines 237-242 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
237
        </z:index>
239
        </z:index>
238
    </xsl:template>
240
    </xsl:template>
239
241
242
    <xsl:template name="handle-index-group-of-subfields">
243
        <xsl:for-each select="//kohaidx:index_group_of_subfields[generate-id() = generate-id(key('index_group_of_subfields_tag', @tag)[1])]">
244
            <xslo:template mode="index_subfields">
245
                <xsl:attribute name="match">
246
                    <xsl:text>marc:datafield[@tag='</xsl:text>
247
                    <xsl:value-of select="@tag"/>
248
                    <xsl:text>']</xsl:text>
249
                </xsl:attribute>
250
                <xsl:for-each select="key('index_group_of_subfields_tag', @tag)">
251
                    <xsl:call-template name="handle-one-group-of-subfields"/>
252
                </xsl:for-each>
253
            </xslo:template>
254
        </xsl:for-each>
255
    </xsl:template>
256
257
    <xsl:template name="handle-one-group-of-subfields">
258
        <xsl:variable name="indexes">
259
            <xsl:call-template name="get-target-indexes"/>
260
        </xsl:variable>
261
        <z:index>
262
            <xsl:attribute name="name"><xsl:value-of select="normalize-space($indexes)"/></xsl:attribute>
263
            <xslo:variable name="group_of_subfields">
264
                <xslo:for-each select="marc:subfield">
265
                    <xslo:if>
266
                        <xsl:attribute name="test">
267
                            <xsl:text>contains('</xsl:text>
268
                            <xsl:value-of select="@subfields"/>
269
                            <xsl:text>', @code)</xsl:text>
270
                        </xsl:attribute>
271
                        <xslo:value-of select="."/>
272
                        <xslo:if test="position() != last()">
273
                            <xslo:value-of select="substring(' ', 1, 1)"/> <!-- FIXME surely there's a better way  to specify a space -->
274
                        </xslo:if>
275
                   </xslo:if>
276
                </xslo:for-each>
277
            </xslo:variable>
278
        <xslo:value-of select="normalize-space($group_of_subfields)"/>
279
        </z:index>
280
    </xsl:template>
281
240
    <xsl:template name="handle-index-subfields">
282
    <xsl:template name="handle-index-subfields">
241
        <xsl:for-each select="//kohaidx:index_subfields[generate-id() = generate-id(key('index_subfields_tag', @tag)[1])]">
283
        <xsl:for-each select="//kohaidx:index_subfields[generate-id() = generate-id(key('index_subfields_tag', @tag)[1])]">
242
            <xslo:template mode="index_subfields">
284
            <xslo:template mode="index_subfields">
243
- 

Return to bug 9352