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

(-)a/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl (-17 / +429 lines)
Lines 17-22 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
17
  <xslo:template match="text()" mode="index_heading_conditional"/>
17
  <xslo:template match="text()" mode="index_heading_conditional"/>
18
  <xslo:template match="text()" mode="index_match_heading"/>
18
  <xslo:template match="text()" mode="index_match_heading"/>
19
  <xslo:template match="text()" mode="index_subject_thesaurus"/>
19
  <xslo:template match="text()" mode="index_subject_thesaurus"/>
20
  <xslo:template match="text()" mode="index_sort_tit"/>
20
  <xslo:template match="/">
21
  <xslo:template match="/">
21
    <xslo:if test="marc:collection">
22
    <xslo:if test="marc:collection">
22
      <collection>
23
      <collection>
Lines 42-47 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
42
      <xslo:apply-templates mode="index_match_heading"/>
43
      <xslo:apply-templates mode="index_match_heading"/>
43
      <xslo:apply-templates mode="index_subject_thesaurus"/>
44
      <xslo:apply-templates mode="index_subject_thesaurus"/>
44
      <xslo:apply-templates mode="index_all"/>
45
      <xslo:apply-templates mode="index_all"/>
46
      <xslo:apply-templates mode="index_sort_tit"/>
45
    </z:record>
47
    </z:record>
46
  </xslo:template>
48
  </xslo:template>
47
  <xslo:template match="marc:controlfield[@tag='001']">
49
  <xslo:template match="marc:controlfield[@tag='001']">
Lines 52-57 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
52
      <xslo:value-of select="."/>
54
      <xslo:value-of select="."/>
53
    </z:index>
55
    </z:index>
54
  </xslo:template>
56
  </xslo:template>
57
  <xslo:template match="marc:controlfield[@tag='003']">
58
    <z:index name="Identifier-persistent:w Identifier-persistent:p Identifier-persistent:n">
59
      <xslo:value-of select="."/>
60
    </z:index>
61
  </xslo:template>
55
  <xslo:template match="marc:controlfield[@tag='009']">
62
  <xslo:template match="marc:controlfield[@tag='009']">
56
    <z:index name="Identifier-standard:w">
63
    <z:index name="Identifier-standard:w">
57
      <xslo:value-of select="."/>
64
      <xslo:value-of select="."/>
Lines 85-92 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
85
      </xslo:if>
92
      </xslo:if>
86
    </xslo:for-each>
93
    </xslo:for-each>
87
    <xslo:for-each select="marc:subfield">
94
    <xslo:for-each select="marc:subfield">
95
      <xslo:if test="contains('o', @code)">
96
        <z:index name="Suppress:w Suppress:p">
97
          <xslo:value-of select="."/>
98
        </z:index>
99
      </xslo:if>
100
    </xslo:for-each>
101
    <xslo:for-each select="marc:subfield">
88
      <xslo:if test="contains('t', @code)">
102
      <xslo:if test="contains('t', @code)">
89
        <z:index name="ccode:w">
103
        <z:index name="index-type-doc:w index-type-doc:p">
90
          <xslo:value-of select="."/>
104
          <xslo:value-of select="."/>
91
        </z:index>
105
        </z:index>
92
      </xslo:if>
106
      </xslo:if>
Lines 171-176 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
171
      </xslo:if>
185
      </xslo:if>
172
    </xslo:for-each>
186
    </xslo:for-each>
173
  </xslo:template>
187
  </xslo:template>
188
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='018']">
189
    <xslo:for-each select="marc:subfield">
190
      <xslo:if test="contains('a', @code)">
191
        <z:index name="Identifier-standard:w">
192
          <xslo:value-of select="."/>
193
        </z:index>
194
      </xslo:if>
195
    </xslo:for-each>
196
  </xslo:template>
197
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='029']">
198
    <xslo:for-each select="marc:subfield">
199
      <xslo:if test="contains('a', @code)">
200
        <z:index name="Identifier-standard:w">
201
          <xslo:value-of select="."/>
202
        </z:index>
203
      </xslo:if>
204
    </xslo:for-each>
205
  </xslo:template>
206
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='033']">
207
    <xslo:for-each select="marc:subfield">
208
      <xslo:if test="contains('a', @code)">
209
        <z:index name="Identifier-persistent:w">
210
          <xslo:value-of select="."/>
211
        </z:index>
212
      </xslo:if>
213
    </xslo:for-each>
214
  </xslo:template>
174
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='040']">
215
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='040']">
175
    <xslo:for-each select="marc:subfield">
216
    <xslo:for-each select="marc:subfield">
176
      <xslo:if test="contains('az', @code)">
217
      <xslo:if test="contains('az', @code)">
Lines 253-258 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
253
      </xslo:if>
294
      </xslo:if>
254
    </xslo:for-each>
295
    </xslo:for-each>
255
    <xslo:for-each select="marc:subfield">
296
    <xslo:for-each select="marc:subfield">
297
      <xslo:if test="contains('B', @code)">
298
        <z:index name="new-item:w new-item:n item:w">
299
          <xslo:value-of select="."/>
300
        </z:index>
301
      </xslo:if>
302
    </xslo:for-each>
303
    <xslo:for-each select="marc:subfield">
256
      <xslo:if test="contains('1', @code)">
304
      <xslo:if test="contains('1', @code)">
257
        <z:index name="damaged:w damaged:n item:w">
305
        <z:index name="damaged:w damaged:n item:w">
258
          <xslo:value-of select="."/>
306
          <xslo:value-of select="."/>
Lines 389-415 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
389
    </xslo:for-each>
437
    </xslo:for-each>
390
    <xslo:for-each select="marc:subfield">
438
    <xslo:for-each select="marc:subfield">
391
      <xslo:if test="contains('a', @code)">
439
      <xslo:if test="contains('a', @code)">
392
        <z:index name="char-encoding:n">
440
        <z:index name="char-encoding:w char-encoding:p">
393
          <xslo:value-of select="substring(., 27, 2)"/>
441
          <xslo:value-of select="substring(., 27, 2)"/>
394
        </z:index>
442
        </z:index>
395
      </xslo:if>
443
      </xslo:if>
396
    </xslo:for-each>
444
    </xslo:for-each>
397
    <xslo:for-each select="marc:subfield">
445
    <xslo:for-each select="marc:subfield">
398
      <xslo:if test="contains('a', @code)">
446
      <xslo:if test="contains('a', @code)">
399
        <z:index name="char-encoding:n">
447
        <z:index name="char-encoding:w char-encoding:p">
400
          <xslo:value-of select="substring(., 29, 2)"/>
448
          <xslo:value-of select="substring(., 29, 2)"/>
401
        </z:index>
449
        </z:index>
402
      </xslo:if>
450
      </xslo:if>
403
    </xslo:for-each>
451
    </xslo:for-each>
404
    <xslo:for-each select="marc:subfield">
452
    <xslo:for-each select="marc:subfield">
405
      <xslo:if test="contains('a', @code)">
453
      <xslo:if test="contains('a', @code)">
406
        <z:index name="char-encoding:n">
454
        <z:index name="char-encoding:w char-encoding:p">
407
          <xslo:value-of select="substring(., 31, 2)"/>
455
          <xslo:value-of select="substring(., 31, 2)"/>
408
        </z:index>
456
        </z:index>
409
      </xslo:if>
457
      </xslo:if>
410
    </xslo:for-each>
458
    </xslo:for-each>
411
    <xslo:for-each select="marc:subfield">
459
    <xslo:for-each select="marc:subfield">
412
      <xslo:if test="contains('a', @code)">
460
      <xslo:if test="contains('a', @code)">
461
        <z:index name="char-encoding:w char-encoding:p">
462
          <xslo:value-of select="substring(., 33, 2)"/>
463
        </z:index>
464
      </xslo:if>
465
    </xslo:for-each>
466
    <xslo:for-each select="marc:subfield">
467
      <xslo:if test="contains('a', @code)">
413
        <z:index name="script-Title:n">
468
        <z:index name="script-Title:n">
414
          <xslo:value-of select="substring(., 35, 2)"/>
469
          <xslo:value-of select="substring(., 35, 2)"/>
415
        </z:index>
470
        </z:index>
Lines 640-645 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
640
      </xslo:if>
695
      </xslo:if>
641
    </xslo:for-each>
696
    </xslo:for-each>
642
  </xslo:template>
697
  </xslo:template>
698
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='181']">
699
    <xslo:for-each select="marc:subfield">
700
      <xslo:if test="contains('c', @code)">
701
        <z:index name="Content-type:w Content-type:p">
702
          <xslo:value-of select="."/>
703
        </z:index>
704
      </xslo:if>
705
    </xslo:for-each>
706
  </xslo:template>
707
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='182']">
708
    <xslo:for-each select="marc:subfield">
709
      <xslo:if test="contains('c', @code)">
710
        <z:index name="Material-Type:w Material-Type:p">
711
          <xslo:value-of select="."/>
712
        </z:index>
713
      </xslo:if>
714
    </xslo:for-each>
715
  </xslo:template>
716
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='183']">
717
    <xslo:for-each select="marc:subfield">
718
      <xslo:if test="contains('a', @code)">
719
        <z:index name="Carrier-type:w Carrier-type:p">
720
          <xslo:value-of select="."/>
721
        </z:index>
722
      </xslo:if>
723
    </xslo:for-each>
724
  </xslo:template>
725
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='203']">
726
    <xslo:for-each select="marc:subfield">
727
      <xslo:if test="contains('a', @code)">
728
        <z:index name="Content-type:w Content-type:p">
729
          <xslo:value-of select="."/>
730
        </z:index>
731
      </xslo:if>
732
    </xslo:for-each>
733
    <xslo:for-each select="marc:subfield">
734
      <xslo:if test="contains('b', @code)">
735
        <z:index name="Material-Type:w Material-Type:p">
736
          <xslo:value-of select="."/>
737
        </z:index>
738
      </xslo:if>
739
    </xslo:for-each>
740
    <xslo:for-each select="marc:subfield">
741
      <xslo:if test="contains('c', @code)">
742
        <z:index name="Carrier-type:w Carrier-type:p">
743
          <xslo:value-of select="."/>
744
        </z:index>
745
      </xslo:if>
746
    </xslo:for-each>
747
  </xslo:template>
748
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='283']">
749
    <xslo:for-each select="marc:subfield">
750
      <xslo:if test="contains('a', @code)">
751
        <z:index name="Carrier-type:w Carrier-type:p">
752
          <xslo:value-of select="."/>
753
        </z:index>
754
      </xslo:if>
755
    </xslo:for-each>
756
  </xslo:template>
643
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']">
757
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']">
644
    <xslo:for-each select="marc:subfield">
758
    <xslo:for-each select="marc:subfield">
645
      <xslo:if test="contains('3', @code)">
759
      <xslo:if test="contains('3', @code)">
Lines 813-818 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
813
      </xslo:if>
927
      </xslo:if>
814
    </xslo:for-each>
928
    </xslo:for-each>
815
  </xslo:template>
929
  </xslo:template>
930
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='214']">
931
    <xslo:for-each select="marc:subfield">
932
      <xslo:if test="contains('d', @code)">
933
        <z:index name="pubdate:n pubdate:y">
934
          <xslo:value-of select="."/>
935
        </z:index>
936
      </xslo:if>
937
    </xslo:for-each>
938
    <xslo:for-each select="marc:subfield">
939
      <xslo:if test="contains('c', @code)">
940
        <z:index name="Publisher:w Publisher:p">
941
          <xslo:value-of select="."/>
942
        </z:index>
943
      </xslo:if>
944
    </xslo:for-each>
945
  </xslo:template>
946
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='219']">
947
    <xslo:for-each select="marc:subfield">
948
      <xslo:if test="contains('d', @code)">
949
        <z:index name="pubdate:n pubdate:y">
950
          <xslo:value-of select="."/>
951
        </z:index>
952
      </xslo:if>
953
    </xslo:for-each>
954
    <xslo:for-each select="marc:subfield">
955
      <xslo:if test="contains('c', @code)">
956
        <z:index name="Publisher:w Publisher:p">
957
          <xslo:value-of select="."/>
958
        </z:index>
959
      </xslo:if>
960
    </xslo:for-each>
961
  </xslo:template>
816
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='225']">
962
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='225']">
817
    <xslo:for-each select="marc:subfield">
963
    <xslo:for-each select="marc:subfield">
818
      <xslo:if test="contains('a', @code)">
964
      <xslo:if test="contains('a', @code)">
Lines 871-876 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
871
      </xslo:if>
1017
      </xslo:if>
872
    </xslo:for-each>
1018
    </xslo:for-each>
873
  </xslo:template>
1019
  </xslo:template>
1020
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='231']">
1021
    <xslo:for-each select="marc:subfield">
1022
      <xslo:if test="contains('a', @code)">
1023
        <z:index name="Electronic-resource:w Electronic-resource:p">
1024
          <xslo:value-of select="."/>
1025
        </z:index>
1026
      </xslo:if>
1027
    </xslo:for-each>
1028
    <xslo:for-each select="marc:subfield">
1029
      <xslo:if test="contains('b', @code)">
1030
        <z:index name="Digital-content:w Digital-content:p">
1031
          <xslo:value-of select="."/>
1032
        </z:index>
1033
      </xslo:if>
1034
    </xslo:for-each>
1035
  </xslo:template>
874
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='300']">
1036
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='300']">
875
    <xslo:for-each select="marc:subfield">
1037
    <xslo:for-each select="marc:subfield">
876
      <xslo:if test="contains('a', @code)">
1038
      <xslo:if test="contains('a', @code)">
Lines 1148-1153 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1148
      </xslo:if>
1310
      </xslo:if>
1149
    </xslo:for-each>
1311
    </xslo:for-each>
1150
  </xslo:template>
1312
  </xslo:template>
1313
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='335']">
1314
    <xslo:for-each select="marc:subfield">
1315
      <xslo:if test="contains('a', @code)">
1316
        <z:index name="Note:w Note:p">
1317
          <xslo:value-of select="."/>
1318
        </z:index>
1319
      </xslo:if>
1320
    </xslo:for-each>
1321
  </xslo:template>
1151
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='336']">
1322
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='336']">
1152
    <xslo:for-each select="marc:subfield">
1323
    <xslo:for-each select="marc:subfield">
1153
      <xslo:if test="contains('a', @code)">
1324
      <xslo:if test="contains('a', @code)">
Lines 1166-1171 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1166
      </xslo:if>
1337
      </xslo:if>
1167
    </xslo:for-each>
1338
    </xslo:for-each>
1168
  </xslo:template>
1339
  </xslo:template>
1340
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='338']">
1341
    <xslo:for-each select="marc:subfield">
1342
      <xslo:if test="contains('a', @code)">
1343
        <z:index name="Note:w Note:p">
1344
          <xslo:value-of select="."/>
1345
        </z:index>
1346
      </xslo:if>
1347
    </xslo:for-each>
1348
  </xslo:template>
1169
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='345']">
1349
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='345']">
1170
    <xslo:for-each select="marc:subfield">
1350
    <xslo:for-each select="marc:subfield">
1171
      <xslo:if test="contains('a', @code)">
1351
      <xslo:if test="contains('a', @code)">
Lines 1184-1189 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1184
      </xslo:if>
1364
      </xslo:if>
1185
    </xslo:for-each>
1365
    </xslo:for-each>
1186
  </xslo:template>
1366
  </xslo:template>
1367
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='412']">
1368
    <xslo:for-each select="marc:subfield">
1369
      <xslo:if test="contains('t', @code)">
1370
        <z:index name="Title:w Title:p">
1371
          <xslo:value-of select="."/>
1372
        </z:index>
1373
      </xslo:if>
1374
    </xslo:for-each>
1375
  </xslo:template>
1187
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='413']">
1376
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='413']">
1188
    <xslo:for-each select="marc:subfield">
1377
    <xslo:for-each select="marc:subfield">
1189
      <xslo:if test="contains('t', @code)">
1378
      <xslo:if test="contains('t', @code)">
Lines 1447-1454 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1447
  </xslo:template>
1636
  </xslo:template>
1448
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='461']">
1637
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='461']">
1449
    <xslo:for-each select="marc:subfield">
1638
    <xslo:for-each select="marc:subfield">
1450
      <xslo:if test="contains('t', @code)">
1639
      <xslo:if test="contains('tv', @code)">
1451
        <z:index name="Title:w Title:p Host-item:w Host-item:p">
1640
        <z:index name="Title:w Title:p index-title-serie:p index-title-serie:w index-title-serie:n Host-item:w Host-item:p">
1641
          <xslo:value-of select="."/>
1642
        </z:index>
1643
      </xslo:if>
1644
    </xslo:for-each>
1645
    <xslo:for-each select="marc:subfield">
1646
      <xslo:if test="contains('9', @code)">
1647
        <z:index name="index-lien-desc:w index-lien-desc:p index-lien-desc:n">
1648
          <xslo:value-of select="."/>
1649
        </z:index>
1650
      </xslo:if>
1651
    </xslo:for-each>
1652
    <xslo:for-each select="marc:subfield">
1653
      <xslo:if test="contains('0', @code)">
1654
        <z:index name="index-lien-desc:w index-lien-desc:p index-lien-desc:n">
1452
          <xslo:value-of select="."/>
1655
          <xslo:value-of select="."/>
1453
        </z:index>
1656
        </z:index>
1454
      </xslo:if>
1657
      </xslo:if>
Lines 1465-1472 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1465
  </xslo:template>
1668
  </xslo:template>
1466
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='463']">
1669
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='463']">
1467
    <xslo:for-each select="marc:subfield">
1670
    <xslo:for-each select="marc:subfield">
1468
      <xslo:if test="contains('t', @code)">
1671
      <xslo:if test="contains('tv', @code)">
1469
        <z:index name="Title:w Title:p">
1672
        <z:index name="Title:w Title:p index-title-article:p index-title-article:w index-title-article:n">
1673
          <xslo:value-of select="."/>
1674
        </z:index>
1675
      </xslo:if>
1676
    </xslo:for-each>
1677
    <xslo:for-each select="marc:subfield">
1678
      <xslo:if test="contains('9', @code)">
1679
        <z:index name="index-lien-desc:w index-lien-desc:p index-lien-desc:n">
1680
          <xslo:value-of select="."/>
1681
        </z:index>
1682
      </xslo:if>
1683
    </xslo:for-each>
1684
    <xslo:for-each select="marc:subfield">
1685
      <xslo:if test="contains('0', @code)">
1686
        <z:index name="index-lien-desc:w index-lien-desc:p index-lien-desc:n">
1470
          <xslo:value-of select="."/>
1687
          <xslo:value-of select="."/>
1471
        </z:index>
1688
        </z:index>
1472
      </xslo:if>
1689
      </xslo:if>
Lines 1771-1776 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1771
        </z:index>
1988
        </z:index>
1772
      </xslo:if>
1989
      </xslo:if>
1773
    </xslo:for-each>
1990
    </xslo:for-each>
1991
    <xslo:for-each select="marc:subfield">
1992
      <xslo:if test="contains('y', @code)">
1993
        <z:index name="Subject:w Subject:p">
1994
          <xslo:value-of select="."/>
1995
        </z:index>
1996
      </xslo:if>
1997
    </xslo:for-each>
1774
  </xslo:template>
1998
  </xslo:template>
1775
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='607']">
1999
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='607']">
1776
    <xslo:for-each select="marc:subfield">
2000
    <xslo:for-each select="marc:subfield">
Lines 1871-1876 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1871
      </xslo:if>
2095
      </xslo:if>
1872
    </xslo:for-each>
2096
    </xslo:for-each>
1873
  </xslo:template>
2097
  </xslo:template>
2098
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='856']">
2099
    <xslo:for-each select="marc:subfield">
2100
      <xslo:if test="contains('u', @code)">
2101
        <z:index name="uri:w">
2102
          <xslo:value-of select="."/>
2103
        </z:index>
2104
      </xslo:if>
2105
    </xslo:for-each>
2106
  </xslo:template>
1874
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='942']">
2107
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='942']">
1875
    <xslo:for-each select="marc:subfield">
2108
    <xslo:for-each select="marc:subfield">
1876
      <xslo:if test="contains('0', @code)">
2109
      <xslo:if test="contains('0', @code)">
Lines 1928-1933 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1928
      <xslo:value-of select="normalize-space($raw_heading)"/>
2161
      <xslo:value-of select="normalize-space($raw_heading)"/>
1929
    </z:index>
2162
    </z:index>
1930
  </xslo:template>
2163
  </xslo:template>
2164
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='703']">
2165
    <z:index name="Author:w Author:p">
2166
      <xslo:variable name="raw_heading">
2167
        <xslo:for-each select="marc:subfield">
2168
          <xslo:if test="position() &gt; 1">
2169
            <xslo:value-of select="substring(' ', 1, 1)"/>
2170
          </xslo:if>
2171
          <xslo:value-of select="."/>
2172
        </xslo:for-each>
2173
      </xslo:variable>
2174
      <xslo:value-of select="normalize-space($raw_heading)"/>
2175
    </z:index>
2176
  </xslo:template>
1931
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='710']">
2177
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='710']">
1932
    <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">
2178
    <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">
1933
      <xslo:variable name="raw_heading">
2179
      <xslo:variable name="raw_heading">
Lines 1967-1972 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1967
      <xslo:value-of select="normalize-space($raw_heading)"/>
2213
      <xslo:value-of select="normalize-space($raw_heading)"/>
1968
    </z:index>
2214
    </z:index>
1969
  </xslo:template>
2215
  </xslo:template>
2216
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='713']">
2217
    <z:index name="Author:w Author:p">
2218
      <xslo:variable name="raw_heading">
2219
        <xslo:for-each select="marc:subfield">
2220
          <xslo:if test="position() &gt; 1">
2221
            <xslo:value-of select="substring(' ', 1, 1)"/>
2222
          </xslo:if>
2223
          <xslo:value-of select="."/>
2224
        </xslo:for-each>
2225
      </xslo:variable>
2226
      <xslo:value-of select="normalize-space($raw_heading)"/>
2227
    </z:index>
2228
  </xslo:template>
1970
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='716']">
2229
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='716']">
1971
    <z:index name="Author:w Author:p">
2230
    <z:index name="Author:w Author:p">
1972
      <xslo:variable name="raw_heading">
2231
      <xslo:variable name="raw_heading">
Lines 2019-2024 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
2019
      <xslo:value-of select="normalize-space($raw_heading)"/>
2278
      <xslo:value-of select="normalize-space($raw_heading)"/>
2020
    </z:index>
2279
    </z:index>
2021
  </xslo:template>
2280
  </xslo:template>
2281
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='723']">
2282
    <z:index name="Author:w Author:p">
2283
      <xslo:variable name="raw_heading">
2284
        <xslo:for-each select="marc:subfield">
2285
          <xslo:if test="position() &gt; 1">
2286
            <xslo:value-of select="substring(' ', 1, 1)"/>
2287
          </xslo:if>
2288
          <xslo:value-of select="."/>
2289
        </xslo:for-each>
2290
      </xslo:variable>
2291
      <xslo:value-of select="normalize-space($raw_heading)"/>
2292
    </z:index>
2293
  </xslo:template>
2022
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='730']">
2294
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='730']">
2023
    <z:index name="Author:w Author:p">
2295
    <z:index name="Author:w Author:p">
2024
      <xslo:variable name="raw_heading">
2296
      <xslo:variable name="raw_heading">
Lines 2032-2037 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
2032
      <xslo:value-of select="normalize-space($raw_heading)"/>
2304
      <xslo:value-of select="normalize-space($raw_heading)"/>
2033
    </z:index>
2305
    </z:index>
2034
  </xslo:template>
2306
  </xslo:template>
2307
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='901']">
2308
    <z:index name="index-genre:w index-genre:p">
2309
      <xslo:variable name="raw_heading">
2310
        <xslo:for-each select="marc:subfield">
2311
          <xslo:if test="position() &gt; 1">
2312
            <xslo:value-of select="substring(' ', 1, 1)"/>
2313
          </xslo:if>
2314
          <xslo:value-of select="."/>
2315
        </xslo:for-each>
2316
      </xslo:variable>
2317
      <xslo:value-of select="normalize-space($raw_heading)"/>
2318
    </z:index>
2319
  </xslo:template>
2035
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='205']">
2320
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='205']">
2036
    <z:index name="Title:w Title:p">
2321
    <z:index name="Title:w Title:p">
2037
      <xslo:variable name="raw_heading">
2322
      <xslo:variable name="raw_heading">
Lines 2084-2089 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
2084
      <xslo:value-of select="normalize-space($raw_heading)"/>
2369
      <xslo:value-of select="normalize-space($raw_heading)"/>
2085
    </z:index>
2370
    </z:index>
2086
  </xslo:template>
2371
  </xslo:template>
2372
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='506']">
2373
    <z:index name="Title:w Title:p">
2374
      <xslo:variable name="raw_heading">
2375
        <xslo:for-each select="marc:subfield">
2376
          <xslo:if test="position() &gt; 1">
2377
            <xslo:value-of select="substring(' ', 1, 1)"/>
2378
          </xslo:if>
2379
          <xslo:value-of select="."/>
2380
        </xslo:for-each>
2381
      </xslo:variable>
2382
      <xslo:value-of select="normalize-space($raw_heading)"/>
2383
    </z:index>
2384
  </xslo:template>
2385
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='507']">
2386
    <z:index name="Title:w Title:p">
2387
      <xslo:variable name="raw_heading">
2388
        <xslo:for-each select="marc:subfield">
2389
          <xslo:if test="position() &gt; 1">
2390
            <xslo:value-of select="substring(' ', 1, 1)"/>
2391
          </xslo:if>
2392
          <xslo:value-of select="."/>
2393
        </xslo:for-each>
2394
      </xslo:variable>
2395
      <xslo:value-of select="normalize-space($raw_heading)"/>
2396
    </z:index>
2397
  </xslo:template>
2087
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='510']">
2398
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='510']">
2088
    <z:index name="Title:w Title:p">
2399
    <z:index name="Title:w Title:p">
2089
      <xslo:variable name="raw_heading">
2400
      <xslo:variable name="raw_heading">
Lines 2097-2102 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
2097
      <xslo:value-of select="normalize-space($raw_heading)"/>
2408
      <xslo:value-of select="normalize-space($raw_heading)"/>
2098
    </z:index>
2409
    </z:index>
2099
  </xslo:template>
2410
  </xslo:template>
2411
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='511']">
2412
    <z:index name="Title:w Title:p">
2413
      <xslo:variable name="raw_heading">
2414
        <xslo:for-each select="marc:subfield">
2415
          <xslo:if test="position() &gt; 1">
2416
            <xslo:value-of select="substring(' ', 1, 1)"/>
2417
          </xslo:if>
2418
          <xslo:value-of select="."/>
2419
        </xslo:for-each>
2420
      </xslo:variable>
2421
      <xslo:value-of select="normalize-space($raw_heading)"/>
2422
    </z:index>
2423
  </xslo:template>
2100
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='512']">
2424
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='512']">
2101
    <z:index name="Title:w Title:p">
2425
    <z:index name="Title:w Title:p">
2102
      <xslo:variable name="raw_heading">
2426
      <xslo:variable name="raw_heading">
Lines 2305-2310 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
2305
      <xslo:value-of select="normalize-space($raw_heading)"/>
2629
      <xslo:value-of select="normalize-space($raw_heading)"/>
2306
    </z:index>
2630
    </z:index>
2307
  </xslo:template>
2631
  </xslo:template>
2632
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='576']">
2633
    <z:index name="Title:w Title:p">
2634
      <xslo:variable name="raw_heading">
2635
        <xslo:for-each select="marc:subfield">
2636
          <xslo:if test="position() &gt; 1">
2637
            <xslo:value-of select="substring(' ', 1, 1)"/>
2638
          </xslo:if>
2639
          <xslo:value-of select="."/>
2640
        </xslo:for-each>
2641
      </xslo:variable>
2642
      <xslo:value-of select="normalize-space($raw_heading)"/>
2643
    </z:index>
2644
  </xslo:template>
2645
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='577']">
2646
    <z:index name="Title:w Title:p">
2647
      <xslo:variable name="raw_heading">
2648
        <xslo:for-each select="marc:subfield">
2649
          <xslo:if test="position() &gt; 1">
2650
            <xslo:value-of select="substring(' ', 1, 1)"/>
2651
          </xslo:if>
2652
          <xslo:value-of select="."/>
2653
        </xslo:for-each>
2654
      </xslo:variable>
2655
      <xslo:value-of select="normalize-space($raw_heading)"/>
2656
    </z:index>
2657
  </xslo:template>
2308
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='600']">
2658
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='600']">
2309
    <z:index name="Subject:w Subject:p">
2659
    <z:index name="Subject:w Subject:p">
2310
      <xslo:variable name="raw_heading">
2660
      <xslo:variable name="raw_heading">
Lines 2487-2492 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
2487
      <xslo:value-of select="normalize-space($raw_heading)"/>
2837
      <xslo:value-of select="normalize-space($raw_heading)"/>
2488
    </z:index>
2838
    </z:index>
2489
  </xslo:template>
2839
  </xslo:template>
2840
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='623']">
2841
    <z:index name="Subject:w Subject:p">
2842
      <xslo:variable name="raw_heading">
2843
        <xslo:for-each select="marc:subfield">
2844
          <xslo:if test="position() &gt; 1">
2845
            <xslo:value-of select="substring(' ', 1, 1)"/>
2846
          </xslo:if>
2847
          <xslo:value-of select="."/>
2848
        </xslo:for-each>
2849
      </xslo:variable>
2850
      <xslo:value-of select="normalize-space($raw_heading)"/>
2851
    </z:index>
2852
  </xslo:template>
2853
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='631']">
2854
    <z:index name="Subject:w Subject:p">
2855
      <xslo:variable name="raw_heading">
2856
        <xslo:for-each select="marc:subfield">
2857
          <xslo:if test="position() &gt; 1">
2858
            <xslo:value-of select="substring(' ', 1, 1)"/>
2859
          </xslo:if>
2860
          <xslo:value-of select="."/>
2861
        </xslo:for-each>
2862
      </xslo:variable>
2863
      <xslo:value-of select="normalize-space($raw_heading)"/>
2864
    </z:index>
2865
  </xslo:template>
2866
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='632']">
2867
    <z:index name="Subject:w Subject:p">
2868
      <xslo:variable name="raw_heading">
2869
        <xslo:for-each select="marc:subfield">
2870
          <xslo:if test="position() &gt; 1">
2871
            <xslo:value-of select="substring(' ', 1, 1)"/>
2872
          </xslo:if>
2873
          <xslo:value-of select="."/>
2874
        </xslo:for-each>
2875
      </xslo:variable>
2876
      <xslo:value-of select="normalize-space($raw_heading)"/>
2877
    </z:index>
2878
  </xslo:template>
2490
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='670']">
2879
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='670']">
2491
    <z:index name="Subject-precis:w Subject-precis:p">
2880
    <z:index name="Subject-precis:w Subject-precis:p">
2492
      <xslo:variable name="raw_heading">
2881
      <xslo:variable name="raw_heading">
Lines 2539-2554 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
2539
      <xslo:value-of select="normalize-space($raw_heading)"/>
2928
      <xslo:value-of select="normalize-space($raw_heading)"/>
2540
    </z:index>
2929
    </z:index>
2541
  </xslo:template>
2930
  </xslo:template>
2542
  <xslo:template mode="index_facets" match="marc:datafield[@tag='099']">
2931
  <xslo:template mode="index_facets" match="marc:datafield[@tag='225']">
2543
    <xslo:if test="not(@ind1='z')">
2932
    <xslo:if test="not(@ind1='z')">
2544
      <z:index name="ccode:0">
2933
      <z:index name="se:0">
2545
        <xslo:value-of select="marc:subfield[@code='t']"/>
2934
        <xslo:value-of select="marc:subfield[@code='a']"/>
2546
      </z:index>
2935
      </z:index>
2547
    </xslo:if>
2936
    </xslo:if>
2548
  </xslo:template>
2937
  </xslo:template>
2549
  <xslo:template mode="index_facets" match="marc:datafield[@tag='225']">
2938
  <xslo:template mode="index_facets" match="marc:datafield[@tag='500']">
2550
    <xslo:if test="not(@ind1='z')">
2939
    <xslo:if test="not(@ind1='z')">
2551
      <z:index name="se:0">
2940
      <z:index name="su-ut:0">
2941
        <xslo:value-of select="marc:subfield[@code='a']"/>
2942
      </z:index>
2943
    </xslo:if>
2944
  </xslo:template>
2945
  <xslo:template mode="index_facets" match="marc:datafield[@tag='501']">
2946
    <xslo:if test="not(@ind1='z')">
2947
      <z:index name="su-ut:0">
2948
        <xslo:value-of select="marc:subfield[@code='a']"/>
2949
      </z:index>
2950
    </xslo:if>
2951
  </xslo:template>
2952
  <xslo:template mode="index_facets" match="marc:datafield[@tag='503']">
2953
    <xslo:if test="not(@ind1='z')">
2954
      <z:index name="su-ut:0">
2552
        <xslo:value-of select="marc:subfield[@code='a']"/>
2955
        <xslo:value-of select="marc:subfield[@code='a']"/>
2553
      </z:index>
2956
      </z:index>
2554
    </xslo:if>
2957
    </xslo:if>
Lines 2669-2677 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
2669
      <z:index name="location:0">
3072
      <z:index name="location:0">
2670
        <xslo:value-of select="marc:subfield[@code='e']"/>
3073
        <xslo:value-of select="marc:subfield[@code='e']"/>
2671
      </z:index>
3074
      </z:index>
2672
      <z:index name="ccode:0">
2673
        <xslo:value-of select="marc:subfield[@code='h']"/>
2674
      </z:index>
2675
    </xslo:if>
3075
    </xslo:if>
2676
  </xslo:template>
3076
  </xslo:template>
2677
  <xslo:template mode="index_all" match="text()">
3077
  <xslo:template mode="index_all" match="text()">
Lines 2679-2684 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
2679
      <xslo:value-of select="."/>
3079
      <xslo:value-of select="."/>
2680
    </z:index>
3080
    </z:index>
2681
  </xslo:template>
3081
  </xslo:template>
3082
  <xslo:template mode="index_sort_tit" match="marc:datafield[@tag='245']">
3083
    <xslo:variable name="chop">
3084
      <xslo:choose>
3085
        <xslo:when test="not(number(@ind2))">0</xslo:when>
3086
        <xslo:otherwise>
3087
          <xslo:value-of select="number(@ind2)"/>
3088
        </xslo:otherwise>
3089
      </xslo:choose>
3090
    </xslo:variable>
3091
    <z:index name="Title:s">
3092
      <xslo:value-of select="substring(marc:subfield[@code='a'], $chop+1)"/>
3093
    </z:index>
3094
  </xslo:template>
2682
  <xslo:template name="chopPunctuation">
3095
  <xslo:template name="chopPunctuation">
2683
    <xslo:param name="chopString"/>
3096
    <xslo:param name="chopString"/>
2684
    <xslo:variable name="length" select="string-length($chopString)"/>
3097
    <xslo:variable name="length" select="string-length($chopString)"/>
2685
- 

Return to bug 20424