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

(-)a/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml (-42 / +18 lines)
Lines 302-325 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_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="700" subfields="9">
305
  <index_group_of_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="700" subfields="abdg">
306
    <target_index>Koha-Auth-Number:w</target_index>
307
    <target_index>Koha-Auth-Number:n</target_index>
308
  </index_subfields>
309
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="700" subfields="a">
310
    <target_index>Author:w</target_index>
311
    <target_index>Personal-name:w</target_index>
312
    <target_index>Author:p</target_index>
306
    <target_index>Author:p</target_index>
313
    <target_index>Personal-name:p</target_index>
314
    <target_index>Personal-name:w</target_index>
315
    <target_index>Author:s</target_index>
316
  </index_subfields>
317
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="700" subfields="bdg">
318
    <target_index>Author:w</target_index>
307
    <target_index>Author:w</target_index>
319
    <target_index>Personal-name:w</target_index>
320
    <target_index>Author:p</target_index>
321
    <target_index>Personal-name:p</target_index>
308
    <target_index>Personal-name:p</target_index>
322
    <target_index>Personal-name:w</target_index>
309
    <target_index>Personal-name:w</target_index>
310
    <target_index>Author:s</target_index>
311
  </index_group_of_subfields>
312
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="700" subfields="9">
313
    <target_index>Koha-Auth-Number:w</target_index>
314
    <target_index>Koha-Auth-Number:n</target_index>
323
  </index_subfields>
315
  </index_subfields>
324
  <!--701 : Physical author (other)-->
316
  <!--701 : Physical author (other)-->
325
  <!--Index $9 only in Koha-Auth-Number-->
317
  <!--Index $9 only in Koha-Auth-Number-->
Lines 327-359 Link Here
327
    <target_index>Koha-Auth-Number:w</target_index>
319
    <target_index>Koha-Auth-Number:w</target_index>
328
    <target_index>Koha-Auth-Number:n</target_index>
320
    <target_index>Koha-Auth-Number:n</target_index>
329
  </index_subfields>
321
  </index_subfields>
330
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="701" subfields="abdg">
322
  <index_group_of_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="701" subfields="abdg">
331
    <target_index>Author:w</target_index>
332
    <target_index>Personal-name:w</target_index>
333
    <target_index>Author:p</target_index>
323
    <target_index>Author:p</target_index>
324
    <target_index>Author:w</target_index>
334
    <target_index>Personal-name:p</target_index>
325
    <target_index>Personal-name:p</target_index>
335
    <target_index>Personal-name:w</target_index>
326
    <target_index>Personal-name:w</target_index>
336
  </index_subfields>
327
  </index_group_of_subfields>
337
  <!--702 : Physical author (secondary)-->
338
  <!--Index $9 only in Koha-Auth-Number-->
328
  <!--Index $9 only in Koha-Auth-Number-->
339
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="702" subfields="9">
329
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="702" subfields="9">
340
    <target_index>Koha-Auth-Number:w</target_index>
330
    <target_index>Koha-Auth-Number:w</target_index>
341
    <target_index>Koha-Auth-Number:n</target_index>
331
    <target_index>Koha-Auth-Number:n</target_index>
342
  </index_subfields>
332
  </index_subfields>
343
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="702" subfields="abdg">
333
  <index_group_of_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="702" subfields="abdg">
344
    <target_index>Author:w</target_index>
345
    <target_index>Personal-name:w</target_index>
346
    <target_index>Author:p</target_index>
334
    <target_index>Author:p</target_index>
335
    <target_index>Author:w</target_index>
347
    <target_index>Personal-name:p</target_index>
336
    <target_index>Personal-name:p</target_index>
348
    <target_index>Personal-name:w</target_index>
337
    <target_index>Personal-name:w</target_index>
349
  </index_subfields>
338
  </index_group_of_subfields>
350
  <!--710 : Collective author (main)-->
351
  <!--Do not index $p (affiliation/address),$3,$4. Index $a in Author:s. Index $9 only in Koha-Auth-Number-->
339
  <!--Do not index $p (affiliation/address),$3,$4. Index $a in Author:s. Index $9 only in Koha-Auth-Number-->
352
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="710" subfields="9">
340
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="710" subfields="9">
353
    <target_index>Koha-Auth-Number:w</target_index>
341
    <target_index>Koha-Auth-Number:w</target_index>
354
    <target_index>Koha-Auth-Number:n</target_index>
342
    <target_index>Koha-Auth-Number:n</target_index>
355
  </index_subfields>
343
  </index_subfields>
356
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="710" subfields="a">
344
  <index_group_of_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="710" subfields="abcdefgh">
357
    <target_index>Author:w</target_index>
345
    <target_index>Author:w</target_index>
358
    <target_index>Author-name-corporate:w</target_index>
346
    <target_index>Author-name-corporate:w</target_index>
359
    <target_index>Author-name-conference:w</target_index>
347
    <target_index>Author-name-conference:w</target_index>
Lines 365-390 Link Here
365
    <target_index>Corporate-name:p</target_index>
353
    <target_index>Corporate-name:p</target_index>
366
    <target_index>Conference-name:p</target_index>
354
    <target_index>Conference-name:p</target_index>
367
    <target_index>Author:s</target_index>
355
    <target_index>Author:s</target_index>
368
  </index_subfields>
356
  </index_group_of_subfields>
369
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="710" subfields="bcdefgh">
370
    <target_index>Author:w</target_index>
371
    <target_index>Author-name-corporate:w</target_index>
372
    <target_index>Author-name-conference:w</target_index>
373
    <target_index>Corporate-name:w</target_index>
374
    <target_index>Conference-name:w</target_index>
375
    <target_index>Author:p</target_index>
376
    <target_index>Author-name-corporate:p</target_index>
377
    <target_index>Author-name-conference:p</target_index>
378
    <target_index>Corporate-name:p</target_index>
379
    <target_index>Conference-name:p</target_index>
380
  </index_subfields>
381
  <!--711 : Collective author (other)-->
357
  <!--711 : Collective author (other)-->
382
  <!--Index $9 only in Koha-Auth-Number-->
358
  <!--Index $9 only in Koha-Auth-Number-->
383
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="711" subfields="9">
359
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="711" subfields="9">
384
    <target_index>Koha-Auth-Number:w</target_index>
360
    <target_index>Koha-Auth-Number:w</target_index>
385
    <target_index>Koha-Auth-Number:n</target_index>
361
    <target_index>Koha-Auth-Number:n</target_index>
386
  </index_subfields>
362
  </index_subfields>
387
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="711" subfields="abcdefgh">
363
  <index_group_of_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="711" subfields="abcdefgh">
388
    <target_index>Author:w</target_index>
364
    <target_index>Author:w</target_index>
389
    <target_index>Author-name-corporate:w</target_index>
365
    <target_index>Author-name-corporate:w</target_index>
390
    <target_index>Author-name-conference:w</target_index>
366
    <target_index>Author-name-conference:w</target_index>
Lines 395-408 Link Here
395
    <target_index>Author-name-conference:p</target_index>
371
    <target_index>Author-name-conference:p</target_index>
396
    <target_index>Corporate-name:p</target_index>
372
    <target_index>Corporate-name:p</target_index>
397
    <target_index>Conference-name:p</target_index>
373
    <target_index>Conference-name:p</target_index>
398
  </index_subfields>
374
  </index_group_of_subfields>
399
  <!--712 : Collective author (secondary)-->
375
  <!--712 : Collective author (secondary)-->
400
  <!--Index $9 only in Koha-Auth-Number-->
376
  <!--Index $9 only in Koha-Auth-Number-->
401
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="712" subfields="9">
377
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="712" subfields="9">
402
    <target_index>Koha-Auth-Number:w</target_index>
378
    <target_index>Koha-Auth-Number:w</target_index>
403
    <target_index>Koha-Auth-Number:n</target_index>
379
    <target_index>Koha-Auth-Number:n</target_index>
404
  </index_subfields>
380
  </index_subfields>
405
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="712" subfields="abcdefgh">
381
  <index_group_of_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="712" subfields="abcdefgh">
406
    <target_index>Author:w</target_index>
382
    <target_index>Author:w</target_index>
407
    <target_index>Author-name-corporate:w</target_index>
383
    <target_index>Author-name-corporate:w</target_index>
408
    <target_index>Author-name-conference:w</target_index>
384
    <target_index>Author-name-conference:w</target_index>
Lines 413-419 Link Here
413
    <target_index>Author-name-conference:p</target_index>
389
    <target_index>Author-name-conference:p</target_index>
414
    <target_index>Corporate-name:p</target_index>
390
    <target_index>Corporate-name:p</target_index>
415
    <target_index>Conference-name:p</target_index>
391
    <target_index>Conference-name:p</target_index>
416
  </index_subfields>
392
  </index_group_of_subfields>
417
  <!--716$a : Trademark-->
393
  <!--716$a : Trademark-->
418
  <!--Do not index $f (dates),$c (additions other than dates),$3,$4. Index $9 only in Koha-Auth-Number-->
394
  <!--Do not index $f (dates),$c (additions other than dates),$3,$4. Index $9 only in Koha-Auth-Number-->
419
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="716" subfields="9">
395
  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="716" subfields="9">
(-)a/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl (-56 / +92 lines)
Lines 10-15 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
10
<xslo:stylesheet xmlns:xslo="http://www.w3.org/1999/XSL/Transform" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:z="http://indexdata.com/zebra-2.0" xmlns:kohaidx="http://www.koha-community.org/schemas/index-defs" version="1.0">
10
<xslo:stylesheet xmlns:xslo="http://www.w3.org/1999/XSL/Transform" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:z="http://indexdata.com/zebra-2.0" xmlns:kohaidx="http://www.koha-community.org/schemas/index-defs" version="1.0">
11
  <xslo:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
11
  <xslo:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
12
  <xslo:template match="text()"/>
12
  <xslo:template match="text()"/>
13
  <xslo:template match="text()" mode="index_group_of_subfields"/>
13
  <xslo:template match="text()" mode="index_subfields"/>
14
  <xslo:template match="text()" mode="index_subfields"/>
14
  <xslo:template match="text()" mode="index_data_field"/>
15
  <xslo:template match="text()" mode="index_data_field"/>
15
  <xslo:template match="text()" mode="index_heading"/>
16
  <xslo:template match="text()" mode="index_heading"/>
Lines 33-38 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
33
        <xslo:value-of select="$idfield"/>
34
        <xslo:value-of select="$idfield"/>
34
      </xslo:attribute>
35
      </xslo:attribute>
35
      <xslo:apply-templates/>
36
      <xslo:apply-templates/>
37
      <xslo:apply-templates mode="index_group_of_subfields"/>
36
      <xslo:apply-templates mode="index_subfields"/>
38
      <xslo:apply-templates mode="index_subfields"/>
37
      <xslo:apply-templates mode="index_data_field"/>
39
      <xslo:apply-templates mode="index_data_field"/>
38
      <xslo:apply-templates mode="index_heading"/>
40
      <xslo:apply-templates mode="index_heading"/>
Lines 58-63 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
58
      <xslo:value-of select="."/>
60
      <xslo:value-of select="."/>
59
    </z:index>
61
    </z:index>
60
  </xslo:template>
62
  </xslo:template>
63
  <xslo:template mode="index_group_of_subfields" match="marc:datafield[@tag='700']">
64
    <z:index name="Author:p Author:w Personal-name:p Personal-name:w Author:s">
65
      <xslo:variable name="group_of_subfields">
66
        <xslo:for-each select="marc:subfield">
67
          <xslo:if test="contains('abdg', @code)">
68
            <xslo:value-of select="."/>
69
            <xslo:if test="position() != last()">
70
              <xslo:value-of select="substring(' ', 1, 1)"/>
71
            </xslo:if>
72
          </xslo:if>
73
        </xslo:for-each>
74
      </xslo:variable>
75
      <xslo:value-of select="normalize-space($group_of_subfields)"/>
76
    </z:index>
77
  </xslo:template>
78
  <xslo:template mode="index_group_of_subfields" match="marc:datafield[@tag='701']">
79
    <z:index name="Author:p Author:w Personal-name:p Personal-name:w">
80
      <xslo:variable name="group_of_subfields">
81
        <xslo:for-each select="marc:subfield">
82
          <xslo:if test="contains('abdg', @code)">
83
            <xslo:value-of select="."/>
84
            <xslo:if test="position() != last()">
85
              <xslo:value-of select="substring(' ', 1, 1)"/>
86
            </xslo:if>
87
          </xslo:if>
88
        </xslo:for-each>
89
      </xslo:variable>
90
      <xslo:value-of select="normalize-space($group_of_subfields)"/>
91
    </z:index>
92
  </xslo:template>
93
  <xslo:template mode="index_group_of_subfields" match="marc:datafield[@tag='702']">
94
    <z:index name="Author:p Author:w Personal-name:p Personal-name:w">
95
      <xslo:variable name="group_of_subfields">
96
        <xslo:for-each select="marc:subfield">
97
          <xslo:if test="contains('abdg', @code)">
98
            <xslo:value-of select="."/>
99
            <xslo:if test="position() != last()">
100
              <xslo:value-of select="substring(' ', 1, 1)"/>
101
            </xslo:if>
102
          </xslo:if>
103
        </xslo:for-each>
104
      </xslo:variable>
105
      <xslo:value-of select="normalize-space($group_of_subfields)"/>
106
    </z:index>
107
  </xslo:template>
108
  <xslo:template mode="index_group_of_subfields" match="marc:datafield[@tag='710']">
109
    <z:index name="Author:w Author-name-corporate:w Author-name-conference:w Corporate-name:w Conference-name:w Author:p Author-name-corporate:p Author-name-conference:p Corporate-name:p Conference-name:p Author:s">
110
      <xslo:variable name="group_of_subfields">
111
        <xslo:for-each select="marc:subfield">
112
          <xslo:if test="contains('abcdefgh', @code)">
113
            <xslo:value-of select="."/>
114
            <xslo:if test="position() != last()">
115
              <xslo:value-of select="substring(' ', 1, 1)"/>
116
            </xslo:if>
117
          </xslo:if>
118
        </xslo:for-each>
119
      </xslo:variable>
120
      <xslo:value-of select="normalize-space($group_of_subfields)"/>
121
    </z:index>
122
  </xslo:template>
123
  <xslo:template mode="index_group_of_subfields" match="marc:datafield[@tag='711']">
124
    <z:index name="Author:w Author-name-corporate:w Author-name-conference:w Corporate-name:w Conference-name:w Author:p Author-name-corporate:p Author-name-conference:p Corporate-name:p Conference-name:p">
125
      <xslo:variable name="group_of_subfields">
126
        <xslo:for-each select="marc:subfield">
127
          <xslo:if test="contains('abcdefgh', @code)">
128
            <xslo:value-of select="."/>
129
            <xslo:if test="position() != last()">
130
              <xslo:value-of select="substring(' ', 1, 1)"/>
131
            </xslo:if>
132
          </xslo:if>
133
        </xslo:for-each>
134
      </xslo:variable>
135
      <xslo:value-of select="normalize-space($group_of_subfields)"/>
136
    </z:index>
137
  </xslo:template>
138
  <xslo:template mode="index_group_of_subfields" match="marc:datafield[@tag='712']">
139
    <z:index name="Author:w Author-name-corporate:w Author-name-conference:w Corporate-name:w Conference-name:w Author:p Author-name-corporate:p Author-name-conference:p Corporate-name:p Conference-name:p">
140
      <xslo:variable name="group_of_subfields">
141
        <xslo:for-each select="marc:subfield">
142
          <xslo:if test="contains('abcdefgh', @code)">
143
            <xslo:value-of select="."/>
144
            <xslo:if test="position() != last()">
145
              <xslo:value-of select="substring(' ', 1, 1)"/>
146
            </xslo:if>
147
          </xslo:if>
148
        </xslo:for-each>
149
      </xslo:variable>
150
      <xslo:value-of select="normalize-space($group_of_subfields)"/>
151
    </z:index>
152
  </xslo:template>
61
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='090']">
153
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='090']">
62
    <xslo:for-each select="marc:subfield">
154
    <xslo:for-each select="marc:subfield">
63
      <xslo:if test="contains('9', @code)">
155
      <xslo:if test="contains('9', @code)">
Lines 669-688 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
669
        </z:index>
761
        </z:index>
670
      </xslo:if>
762
      </xslo:if>
671
    </xslo:for-each>
763
    </xslo:for-each>
672
    <xslo:for-each select="marc:subfield">
673
      <xslo:if test="contains('a', @code)">
674
        <z:index name="Author:w Personal-name:w Author:p Personal-name:p Personal-name:w Author:s">
675
          <xslo:value-of select="."/>
676
        </z:index>
677
      </xslo:if>
678
    </xslo:for-each>
679
    <xslo:for-each select="marc:subfield">
680
      <xslo:if test="contains('bdg', @code)">
681
        <z:index name="Author:w Personal-name:w Author:p Personal-name:p Personal-name:w">
682
          <xslo:value-of select="."/>
683
        </z:index>
684
      </xslo:if>
685
    </xslo:for-each>
686
  </xslo:template>
764
  </xslo:template>
687
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='701']">
765
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='701']">
688
    <xslo:for-each select="marc:subfield">
766
    <xslo:for-each select="marc:subfield">
Lines 692-704 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
692
        </z:index>
770
        </z:index>
693
      </xslo:if>
771
      </xslo:if>
694
    </xslo:for-each>
772
    </xslo:for-each>
695
    <xslo:for-each select="marc:subfield">
696
      <xslo:if test="contains('abdg', @code)">
697
        <z:index name="Author:w Personal-name:w Author:p Personal-name:p Personal-name:w">
698
          <xslo:value-of select="."/>
699
        </z:index>
700
      </xslo:if>
701
    </xslo:for-each>
702
  </xslo:template>
773
  </xslo:template>
703
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='702']">
774
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='702']">
704
    <xslo:for-each select="marc:subfield">
775
    <xslo:for-each select="marc:subfield">
Lines 708-720 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
708
        </z:index>
779
        </z:index>
709
      </xslo:if>
780
      </xslo:if>
710
    </xslo:for-each>
781
    </xslo:for-each>
711
    <xslo:for-each select="marc:subfield">
712
      <xslo:if test="contains('abdg', @code)">
713
        <z:index name="Author:w Personal-name:w Author:p Personal-name:p Personal-name:w">
714
          <xslo:value-of select="."/>
715
        </z:index>
716
      </xslo:if>
717
    </xslo:for-each>
718
  </xslo:template>
782
  </xslo:template>
719
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='710']">
783
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='710']">
720
    <xslo:for-each select="marc:subfield">
784
    <xslo:for-each select="marc:subfield">
Lines 724-743 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
724
        </z:index>
788
        </z:index>
725
      </xslo:if>
789
      </xslo:if>
726
    </xslo:for-each>
790
    </xslo:for-each>
727
    <xslo:for-each select="marc:subfield">
728
      <xslo:if test="contains('a', @code)">
729
        <z:index name="Author:w Author-name-corporate:w Author-name-conference:w Corporate-name:w Conference-name:w Author:p Author-name-corporate:p Author-name-conference:p Corporate-name:p Conference-name:p Author:s">
730
          <xslo:value-of select="."/>
731
        </z:index>
732
      </xslo:if>
733
    </xslo:for-each>
734
    <xslo:for-each select="marc:subfield">
735
      <xslo:if test="contains('bcdefgh', @code)">
736
        <z:index name="Author:w Author-name-corporate:w Author-name-conference:w Corporate-name:w Conference-name:w Author:p Author-name-corporate:p Author-name-conference:p Corporate-name:p Conference-name:p">
737
          <xslo:value-of select="."/>
738
        </z:index>
739
      </xslo:if>
740
    </xslo:for-each>
741
  </xslo:template>
791
  </xslo:template>
742
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='711']">
792
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='711']">
743
    <xslo:for-each select="marc:subfield">
793
    <xslo:for-each select="marc:subfield">
Lines 747-759 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
747
        </z:index>
797
        </z:index>
748
      </xslo:if>
798
      </xslo:if>
749
    </xslo:for-each>
799
    </xslo:for-each>
750
    <xslo:for-each select="marc:subfield">
751
      <xslo:if test="contains('abcdefgh', @code)">
752
        <z:index name="Author:w Author-name-corporate:w Author-name-conference:w Corporate-name:w Conference-name:w Author:p Author-name-corporate:p Author-name-conference:p Corporate-name:p Conference-name:p">
753
          <xslo:value-of select="."/>
754
        </z:index>
755
      </xslo:if>
756
    </xslo:for-each>
757
  </xslo:template>
800
  </xslo:template>
758
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='712']">
801
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='712']">
759
    <xslo:for-each select="marc:subfield">
802
    <xslo:for-each select="marc:subfield">
Lines 763-775 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
763
        </z:index>
806
        </z:index>
764
      </xslo:if>
807
      </xslo:if>
765
    </xslo:for-each>
808
    </xslo:for-each>
766
    <xslo:for-each select="marc:subfield">
767
      <xslo:if test="contains('abcdefgh', @code)">
768
        <z:index name="Author:w Author-name-corporate:w Author-name-conference:w Corporate-name:w Conference-name:w Author:p Author-name-corporate:p Author-name-conference:p Corporate-name:p Conference-name:p">
769
          <xslo:value-of select="."/>
770
        </z:index>
771
      </xslo:if>
772
    </xslo:for-each>
773
  </xslo:template>
809
  </xslo:template>
774
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='716']">
810
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='716']">
775
    <xslo:for-each select="marc:subfield">
811
    <xslo:for-each select="marc:subfield">
(-)a/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl (-1 / +46 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 31-36 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
31
        <xslo:stylesheet version="1.0">
32
        <xslo:stylesheet version="1.0">
32
            <xslo:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
33
            <xslo:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
33
            <xslo:template match="text()"/>
34
            <xslo:template match="text()"/>
35
            <xslo:template match="text()" mode="index_group_of_subfields"/>
34
            <xslo:template match="text()" mode="index_subfields"/>
36
            <xslo:template match="text()" mode="index_subfields"/>
35
            <xslo:template match="text()" mode="index_data_field"/>
37
            <xslo:template match="text()" mode="index_data_field"/>
36
            <xslo:template match="text()" mode="index_heading"/>
38
            <xslo:template match="text()" mode="index_heading"/>
Lines 55-60 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
55
                <z:record type="update">
57
                <z:record type="update">
56
                    <xslo:attribute name="z:id"><xslo:value-of select="$idfield"/></xslo:attribute>
58
                    <xslo:attribute name="z:id"><xslo:value-of select="$idfield"/></xslo:attribute>
57
                    <xslo:apply-templates/>
59
                    <xslo:apply-templates/>
60
                    <xslo:apply-templates mode="index_group_of_subfields"/>
58
                    <xslo:apply-templates mode="index_subfields"/>
61
                    <xslo:apply-templates mode="index_subfields"/>
59
                    <xslo:apply-templates mode="index_data_field"/>
62
                    <xslo:apply-templates mode="index_data_field"/>
60
                    <xslo:apply-templates mode="index_heading"/>
63
                    <xslo:apply-templates mode="index_heading"/>
Lines 67-72 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
67
70
68
            <xsl:call-template name="handle-index-leader"/>
71
            <xsl:call-template name="handle-index-leader"/>
69
            <xsl:call-template name="handle-index-control-field"/>
72
            <xsl:call-template name="handle-index-control-field"/>
73
            <xsl:call-template name="handle-index-group-of-subfields"/>
70
            <xsl:call-template name="handle-index-subfields"/>
74
            <xsl:call-template name="handle-index-subfields"/>
71
            <xsl:call-template name="handle-index-data-field"/>
75
            <xsl:call-template name="handle-index-data-field"/>
72
            <xsl:call-template name="handle-index-heading"/>
76
            <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>
241
        </z:index>
238
    </xsl:template>
242
    </xsl:template>
239
243
244
    <xsl:template name="handle-index-group-of-subfields">
245
        <xsl:for-each select="//kohaidx:index_group_of_subfields[generate-id() = generate-id(key('index_group_of_subfields_tag', @tag)[1])]">
246
            <xslo:template mode="index_group_of_subfields">
247
                <xsl:attribute name="match">
248
                    <xsl:text>marc:datafield[@tag='</xsl:text>
249
                    <xsl:value-of select="@tag"/>
250
                    <xsl:text>']</xsl:text>
251
                </xsl:attribute>
252
                <xsl:for-each select="key('index_group_of_subfields_tag', @tag)">
253
                    <xsl:call-template name="handle-one-group-of-subfields"/>
254
                </xsl:for-each>
255
            </xslo:template>
256
        </xsl:for-each>
257
    </xsl:template>
258
259
    <xsl:template name="handle-one-group-of-subfields">
260
        <xsl:variable name="indexes">
261
            <xsl:call-template name="get-target-indexes"/>
262
        </xsl:variable>
263
        <xsl:if test="$indexes">
264
        <z:index>
265
            <xsl:attribute name="name"><xsl:value-of select="normalize-space($indexes)"/></xsl:attribute>
266
            <xslo:variable name="group_of_subfields">
267
                <xslo:for-each select="marc:subfield">
268
                    <xslo:if>
269
                        <xsl:attribute name="test">
270
                            <xsl:text>contains('</xsl:text>
271
                            <xsl:value-of select="@subfields"/>
272
                            <xsl:text>', @code)</xsl:text>
273
                        </xsl:attribute>
274
                        <xslo:value-of select="."/>
275
                        <xslo:if test="position() != last()">
276
                            <xslo:value-of select="substring(' ', 1, 1)"/> <!-- FIXME surely there's a better way  to specify a space -->
277
                        </xslo:if>
278
                   </xslo:if>
279
                </xslo:for-each>
280
            </xslo:variable>
281
        <xslo:value-of select="normalize-space($group_of_subfields)"/>
282
        </z:index>
283
        </xsl:if>
284
    </xsl:template>
285
240
    <xsl:template name="handle-index-subfields">
286
    <xsl:template name="handle-index-subfields">
241
        <xsl:for-each select="//kohaidx:index_subfields[generate-id() = generate-id(key('index_subfields_tag', @tag)[1])]">
287
        <xsl:for-each select="//kohaidx:index_subfields[generate-id() = generate-id(key('index_subfields_tag', @tag)[1])]">
242
            <xslo:template mode="index_subfields">
288
            <xslo:template mode="index_subfields">
243
- 

Return to bug 9352