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

(-)a/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl (-14 / +390 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">
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 640-645 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
640
      </xslo:if>
688
      </xslo:if>
641
    </xslo:for-each>
689
    </xslo:for-each>
642
  </xslo:template>
690
  </xslo:template>
691
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='181']">
692
    <xslo:for-each select="marc:subfield">
693
      <xslo:if test="contains('c', @code)">
694
        <z:index name="Content-type:w Content-type:p">
695
          <xslo:value-of select="."/>
696
        </z:index>
697
      </xslo:if>
698
    </xslo:for-each>
699
  </xslo:template>
700
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='182']">
701
    <xslo:for-each select="marc:subfield">
702
      <xslo:if test="contains('c', @code)">
703
        <z:index name="Material-Type:w Material-Type:p">
704
          <xslo:value-of select="."/>
705
        </z:index>
706
      </xslo:if>
707
    </xslo:for-each>
708
  </xslo:template>
709
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='183']">
710
    <xslo:for-each select="marc:subfield">
711
      <xslo:if test="contains('a', @code)">
712
        <z:index name="Carrier-type:w Carrier-type:p">
713
          <xslo:value-of select="."/>
714
        </z:index>
715
      </xslo:if>
716
    </xslo:for-each>
717
  </xslo:template>
718
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='203']">
719
    <xslo:for-each select="marc:subfield">
720
      <xslo:if test="contains('a', @code)">
721
        <z:index name="Content-type:w Content-type:p">
722
          <xslo:value-of select="."/>
723
        </z:index>
724
      </xslo:if>
725
    </xslo:for-each>
726
    <xslo:for-each select="marc:subfield">
727
      <xslo:if test="contains('b', @code)">
728
        <z:index name="Material-Type:w Material-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('c', @code)">
735
        <z:index name="Carrier-type:w Carrier-type:p">
736
          <xslo:value-of select="."/>
737
        </z:index>
738
      </xslo:if>
739
    </xslo:for-each>
740
  </xslo:template>
741
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='283']">
742
    <xslo:for-each select="marc:subfield">
743
      <xslo:if test="contains('a', @code)">
744
        <z:index name="Carrier-type:w Carrier-type:p">
745
          <xslo:value-of select="."/>
746
        </z:index>
747
      </xslo:if>
748
    </xslo:for-each>
749
  </xslo:template>
643
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']">
750
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']">
644
    <xslo:for-each select="marc:subfield">
751
    <xslo:for-each select="marc:subfield">
645
      <xslo:if test="contains('3', @code)">
752
      <xslo:if test="contains('3', @code)">
Lines 813-818 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
813
      </xslo:if>
920
      </xslo:if>
814
    </xslo:for-each>
921
    </xslo:for-each>
815
  </xslo:template>
922
  </xslo:template>
923
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='214']">
924
    <xslo:for-each select="marc:subfield">
925
      <xslo:if test="contains('d', @code)">
926
        <z:index name="pubdate:n pubdate:y">
927
          <xslo:value-of select="."/>
928
        </z:index>
929
      </xslo:if>
930
    </xslo:for-each>
931
    <xslo:for-each select="marc:subfield">
932
      <xslo:if test="contains('c', @code)">
933
        <z:index name="Publisher:w Publisher:p">
934
          <xslo:value-of select="."/>
935
        </z:index>
936
      </xslo:if>
937
    </xslo:for-each>
938
  </xslo:template>
939
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='219']">
940
    <xslo:for-each select="marc:subfield">
941
      <xslo:if test="contains('d', @code)">
942
        <z:index name="pubdate:n pubdate:y">
943
          <xslo:value-of select="."/>
944
        </z:index>
945
      </xslo:if>
946
    </xslo:for-each>
947
    <xslo:for-each select="marc:subfield">
948
      <xslo:if test="contains('c', @code)">
949
        <z:index name="Publisher:w Publisher:p">
950
          <xslo:value-of select="."/>
951
        </z:index>
952
      </xslo:if>
953
    </xslo:for-each>
954
  </xslo:template>
816
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='225']">
955
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='225']">
817
    <xslo:for-each select="marc:subfield">
956
    <xslo:for-each select="marc:subfield">
818
      <xslo:if test="contains('a', @code)">
957
      <xslo:if test="contains('a', @code)">
Lines 871-876 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
871
      </xslo:if>
1010
      </xslo:if>
872
    </xslo:for-each>
1011
    </xslo:for-each>
873
  </xslo:template>
1012
  </xslo:template>
1013
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='231']">
1014
    <xslo:for-each select="marc:subfield">
1015
      <xslo:if test="contains('a', @code)">
1016
        <z:index name="Electronic-resource:w Electronic-resource:p">
1017
          <xslo:value-of select="."/>
1018
        </z:index>
1019
      </xslo:if>
1020
    </xslo:for-each>
1021
    <xslo:for-each select="marc:subfield">
1022
      <xslo:if test="contains('b', @code)">
1023
        <z:index name="Digital-content:w Digital-content:p">
1024
          <xslo:value-of select="."/>
1025
        </z:index>
1026
      </xslo:if>
1027
    </xslo:for-each>
1028
  </xslo:template>
874
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='300']">
1029
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='300']">
875
    <xslo:for-each select="marc:subfield">
1030
    <xslo:for-each select="marc:subfield">
876
      <xslo:if test="contains('a', @code)">
1031
      <xslo:if test="contains('a', @code)">
Lines 1148-1153 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1148
      </xslo:if>
1303
      </xslo:if>
1149
    </xslo:for-each>
1304
    </xslo:for-each>
1150
  </xslo:template>
1305
  </xslo:template>
1306
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='335']">
1307
    <xslo:for-each select="marc:subfield">
1308
      <xslo:if test="contains('a', @code)">
1309
        <z:index name="Note:w Note:p">
1310
          <xslo:value-of select="."/>
1311
        </z:index>
1312
      </xslo:if>
1313
    </xslo:for-each>
1314
  </xslo:template>
1151
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='336']">
1315
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='336']">
1152
    <xslo:for-each select="marc:subfield">
1316
    <xslo:for-each select="marc:subfield">
1153
      <xslo:if test="contains('a', @code)">
1317
      <xslo:if test="contains('a', @code)">
Lines 1166-1171 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1166
      </xslo:if>
1330
      </xslo:if>
1167
    </xslo:for-each>
1331
    </xslo:for-each>
1168
  </xslo:template>
1332
  </xslo:template>
1333
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='338']">
1334
    <xslo:for-each select="marc:subfield">
1335
      <xslo:if test="contains('a', @code)">
1336
        <z:index name="Note:w Note:p">
1337
          <xslo:value-of select="."/>
1338
        </z:index>
1339
      </xslo:if>
1340
    </xslo:for-each>
1341
  </xslo:template>
1169
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='345']">
1342
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='345']">
1170
    <xslo:for-each select="marc:subfield">
1343
    <xslo:for-each select="marc:subfield">
1171
      <xslo:if test="contains('a', @code)">
1344
      <xslo:if test="contains('a', @code)">
Lines 1447-1454 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1447
  </xslo:template>
1620
  </xslo:template>
1448
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='461']">
1621
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='461']">
1449
    <xslo:for-each select="marc:subfield">
1622
    <xslo:for-each select="marc:subfield">
1450
      <xslo:if test="contains('t', @code)">
1623
      <xslo:if test="contains('tv', @code)">
1451
        <z:index name="Title:w Title:p Host-item:w Host-item:p">
1624
        <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">
1625
          <xslo:value-of select="."/>
1626
        </z:index>
1627
      </xslo:if>
1628
    </xslo:for-each>
1629
    <xslo:for-each select="marc:subfield">
1630
      <xslo:if test="contains('9', @code)">
1631
        <z:index name="index-lien-desc:w index-lien-desc:p index-lien-desc:n">
1632
          <xslo:value-of select="."/>
1633
        </z:index>
1634
      </xslo:if>
1635
    </xslo:for-each>
1636
    <xslo:for-each select="marc:subfield">
1637
      <xslo:if test="contains('0', @code)">
1638
        <z:index name="index-lien-desc:w index-lien-desc:p index-lien-desc:n">
1452
          <xslo:value-of select="."/>
1639
          <xslo:value-of select="."/>
1453
        </z:index>
1640
        </z:index>
1454
      </xslo:if>
1641
      </xslo:if>
Lines 1465-1472 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1465
  </xslo:template>
1652
  </xslo:template>
1466
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='463']">
1653
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='463']">
1467
    <xslo:for-each select="marc:subfield">
1654
    <xslo:for-each select="marc:subfield">
1468
      <xslo:if test="contains('t', @code)">
1655
      <xslo:if test="contains('tv', @code)">
1469
        <z:index name="Title:w Title:p">
1656
        <z:index name="Title:w Title:p index-title-article:p index-title-article:w index-title-article:n">
1657
          <xslo:value-of select="."/>
1658
        </z:index>
1659
      </xslo:if>
1660
    </xslo:for-each>
1661
    <xslo:for-each select="marc:subfield">
1662
      <xslo:if test="contains('9', @code)">
1663
        <z:index name="index-lien-desc:w index-lien-desc:p index-lien-desc:n">
1664
          <xslo:value-of select="."/>
1665
        </z:index>
1666
      </xslo:if>
1667
    </xslo:for-each>
1668
    <xslo:for-each select="marc:subfield">
1669
      <xslo:if test="contains('0', @code)">
1670
        <z:index name="index-lien-desc:w index-lien-desc:p index-lien-desc:n">
1470
          <xslo:value-of select="."/>
1671
          <xslo:value-of select="."/>
1471
        </z:index>
1672
        </z:index>
1472
      </xslo:if>
1673
      </xslo:if>
Lines 1871-1876 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1871
      </xslo:if>
2072
      </xslo:if>
1872
    </xslo:for-each>
2073
    </xslo:for-each>
1873
  </xslo:template>
2074
  </xslo:template>
2075
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='856']">
2076
    <xslo:for-each select="marc:subfield">
2077
      <xslo:if test="contains('u', @code)">
2078
        <z:index name="uri:w">
2079
          <xslo:value-of select="."/>
2080
        </z:index>
2081
      </xslo:if>
2082
    </xslo:for-each>
2083
  </xslo:template>
1874
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='942']">
2084
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='942']">
1875
    <xslo:for-each select="marc:subfield">
2085
    <xslo:for-each select="marc:subfield">
1876
      <xslo:if test="contains('0', @code)">
2086
      <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)"/>
2138
      <xslo:value-of select="normalize-space($raw_heading)"/>
1929
    </z:index>
2139
    </z:index>
1930
  </xslo:template>
2140
  </xslo:template>
2141
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='703']">
2142
    <z:index name="Author:w Author:p">
2143
      <xslo:variable name="raw_heading">
2144
        <xslo:for-each select="marc:subfield">
2145
          <xslo:if test="position() &gt; 1">
2146
            <xslo:value-of select="substring(' ', 1, 1)"/>
2147
          </xslo:if>
2148
          <xslo:value-of select="."/>
2149
        </xslo:for-each>
2150
      </xslo:variable>
2151
      <xslo:value-of select="normalize-space($raw_heading)"/>
2152
    </z:index>
2153
  </xslo:template>
1931
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='710']">
2154
  <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">
2155
    <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">
2156
      <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)"/>
2190
      <xslo:value-of select="normalize-space($raw_heading)"/>
1968
    </z:index>
2191
    </z:index>
1969
  </xslo:template>
2192
  </xslo:template>
2193
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='713']">
2194
    <z:index name="Author:w Author:p">
2195
      <xslo:variable name="raw_heading">
2196
        <xslo:for-each select="marc:subfield">
2197
          <xslo:if test="position() &gt; 1">
2198
            <xslo:value-of select="substring(' ', 1, 1)"/>
2199
          </xslo:if>
2200
          <xslo:value-of select="."/>
2201
        </xslo:for-each>
2202
      </xslo:variable>
2203
      <xslo:value-of select="normalize-space($raw_heading)"/>
2204
    </z:index>
2205
  </xslo:template>
1970
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='716']">
2206
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='716']">
1971
    <z:index name="Author:w Author:p">
2207
    <z:index name="Author:w Author:p">
1972
      <xslo:variable name="raw_heading">
2208
      <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)"/>
2255
      <xslo:value-of select="normalize-space($raw_heading)"/>
2020
    </z:index>
2256
    </z:index>
2021
  </xslo:template>
2257
  </xslo:template>
2258
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='723']">
2259
    <z:index name="Author:w Author:p">
2260
      <xslo:variable name="raw_heading">
2261
        <xslo:for-each select="marc:subfield">
2262
          <xslo:if test="position() &gt; 1">
2263
            <xslo:value-of select="substring(' ', 1, 1)"/>
2264
          </xslo:if>
2265
          <xslo:value-of select="."/>
2266
        </xslo:for-each>
2267
      </xslo:variable>
2268
      <xslo:value-of select="normalize-space($raw_heading)"/>
2269
    </z:index>
2270
  </xslo:template>
2022
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='730']">
2271
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='730']">
2023
    <z:index name="Author:w Author:p">
2272
    <z:index name="Author:w Author:p">
2024
      <xslo:variable name="raw_heading">
2273
      <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)"/>
2281
      <xslo:value-of select="normalize-space($raw_heading)"/>
2033
    </z:index>
2282
    </z:index>
2034
  </xslo:template>
2283
  </xslo:template>
2284
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='901']">
2285
    <z:index name="index-genre:w index-genre:p">
2286
      <xslo:variable name="raw_heading">
2287
        <xslo:for-each select="marc:subfield">
2288
          <xslo:if test="position() &gt; 1">
2289
            <xslo:value-of select="substring(' ', 1, 1)"/>
2290
          </xslo:if>
2291
          <xslo:value-of select="."/>
2292
        </xslo:for-each>
2293
      </xslo:variable>
2294
      <xslo:value-of select="normalize-space($raw_heading)"/>
2295
    </z:index>
2296
  </xslo:template>
2035
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='205']">
2297
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='205']">
2036
    <z:index name="Title:w Title:p">
2298
    <z:index name="Title:w Title:p">
2037
      <xslo:variable name="raw_heading">
2299
      <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)"/>
2346
      <xslo:value-of select="normalize-space($raw_heading)"/>
2085
    </z:index>
2347
    </z:index>
2086
  </xslo:template>
2348
  </xslo:template>
2349
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='506']">
2350
    <z:index name="Title:w Title:p">
2351
      <xslo:variable name="raw_heading">
2352
        <xslo:for-each select="marc:subfield">
2353
          <xslo:if test="position() &gt; 1">
2354
            <xslo:value-of select="substring(' ', 1, 1)"/>
2355
          </xslo:if>
2356
          <xslo:value-of select="."/>
2357
        </xslo:for-each>
2358
      </xslo:variable>
2359
      <xslo:value-of select="normalize-space($raw_heading)"/>
2360
    </z:index>
2361
  </xslo:template>
2362
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='507']">
2363
    <z:index name="Title:w Title:p">
2364
      <xslo:variable name="raw_heading">
2365
        <xslo:for-each select="marc:subfield">
2366
          <xslo:if test="position() &gt; 1">
2367
            <xslo:value-of select="substring(' ', 1, 1)"/>
2368
          </xslo:if>
2369
          <xslo:value-of select="."/>
2370
        </xslo:for-each>
2371
      </xslo:variable>
2372
      <xslo:value-of select="normalize-space($raw_heading)"/>
2373
    </z:index>
2374
  </xslo:template>
2087
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='510']">
2375
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='510']">
2088
    <z:index name="Title:w Title:p">
2376
    <z:index name="Title:w Title:p">
2089
      <xslo:variable name="raw_heading">
2377
      <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)"/>
2593
      <xslo:value-of select="normalize-space($raw_heading)"/>
2306
    </z:index>
2594
    </z:index>
2307
  </xslo:template>
2595
  </xslo:template>
2596
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='576']">
2597
    <z:index name="Title:w Title:p">
2598
      <xslo:variable name="raw_heading">
2599
        <xslo:for-each select="marc:subfield">
2600
          <xslo:if test="position() &gt; 1">
2601
            <xslo:value-of select="substring(' ', 1, 1)"/>
2602
          </xslo:if>
2603
          <xslo:value-of select="."/>
2604
        </xslo:for-each>
2605
      </xslo:variable>
2606
      <xslo:value-of select="normalize-space($raw_heading)"/>
2607
    </z:index>
2608
  </xslo:template>
2609
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='577']">
2610
    <z:index name="Title:w Title:p">
2611
      <xslo:variable name="raw_heading">
2612
        <xslo:for-each select="marc:subfield">
2613
          <xslo:if test="position() &gt; 1">
2614
            <xslo:value-of select="substring(' ', 1, 1)"/>
2615
          </xslo:if>
2616
          <xslo:value-of select="."/>
2617
        </xslo:for-each>
2618
      </xslo:variable>
2619
      <xslo:value-of select="normalize-space($raw_heading)"/>
2620
    </z:index>
2621
  </xslo:template>
2308
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='600']">
2622
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='600']">
2309
    <z:index name="Subject:w Subject:p">
2623
    <z:index name="Subject:w Subject:p">
2310
      <xslo:variable name="raw_heading">
2624
      <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)"/>
2801
      <xslo:value-of select="normalize-space($raw_heading)"/>
2488
    </z:index>
2802
    </z:index>
2489
  </xslo:template>
2803
  </xslo:template>
2804
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='623']">
2805
    <z:index name="Subject:w Subject:p">
2806
      <xslo:variable name="raw_heading">
2807
        <xslo:for-each select="marc:subfield">
2808
          <xslo:if test="position() &gt; 1">
2809
            <xslo:value-of select="substring(' ', 1, 1)"/>
2810
          </xslo:if>
2811
          <xslo:value-of select="."/>
2812
        </xslo:for-each>
2813
      </xslo:variable>
2814
      <xslo:value-of select="normalize-space($raw_heading)"/>
2815
    </z:index>
2816
  </xslo:template>
2817
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='631']">
2818
    <z:index name="Subject:w Subject:p">
2819
      <xslo:variable name="raw_heading">
2820
        <xslo:for-each select="marc:subfield">
2821
          <xslo:if test="position() &gt; 1">
2822
            <xslo:value-of select="substring(' ', 1, 1)"/>
2823
          </xslo:if>
2824
          <xslo:value-of select="."/>
2825
        </xslo:for-each>
2826
      </xslo:variable>
2827
      <xslo:value-of select="normalize-space($raw_heading)"/>
2828
    </z:index>
2829
  </xslo:template>
2830
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='632']">
2831
    <z:index name="Subject:w Subject:p">
2832
      <xslo:variable name="raw_heading">
2833
        <xslo:for-each select="marc:subfield">
2834
          <xslo:if test="position() &gt; 1">
2835
            <xslo:value-of select="substring(' ', 1, 1)"/>
2836
          </xslo:if>
2837
          <xslo:value-of select="."/>
2838
        </xslo:for-each>
2839
      </xslo:variable>
2840
      <xslo:value-of select="normalize-space($raw_heading)"/>
2841
    </z:index>
2842
  </xslo:template>
2490
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='670']">
2843
  <xslo:template mode="index_data_field" match="marc:datafield[@tag='670']">
2491
    <z:index name="Subject-precis:w Subject-precis:p">
2844
    <z:index name="Subject-precis:w Subject-precis:p">
2492
      <xslo:variable name="raw_heading">
2845
      <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)"/>
2892
      <xslo:value-of select="normalize-space($raw_heading)"/>
2540
    </z:index>
2893
    </z:index>
2541
  </xslo:template>
2894
  </xslo:template>
2542
  <xslo:template mode="index_facets" match="marc:datafield[@tag='099']">
2895
  <xslo:template mode="index_facets" match="marc:datafield[@tag='225']">
2543
    <xslo:if test="not(@ind1='z')">
2896
    <xslo:if test="not(@ind1='z')">
2544
      <z:index name="ccode:0">
2897
      <z:index name="se:0">
2545
        <xslo:value-of select="marc:subfield[@code='t']"/>
2898
        <xslo:value-of select="marc:subfield[@code='a']"/>
2546
      </z:index>
2899
      </z:index>
2547
    </xslo:if>
2900
    </xslo:if>
2548
  </xslo:template>
2901
  </xslo:template>
2549
  <xslo:template mode="index_facets" match="marc:datafield[@tag='225']">
2902
  <xslo:template mode="index_facets" match="marc:datafield[@tag='500']">
2550
    <xslo:if test="not(@ind1='z')">
2903
    <xslo:if test="not(@ind1='z')">
2551
      <z:index name="se:0">
2904
      <z:index name="su-ut:0">
2905
        <xslo:value-of select="marc:subfield[@code='a']"/>
2906
      </z:index>
2907
    </xslo:if>
2908
  </xslo:template>
2909
  <xslo:template mode="index_facets" match="marc:datafield[@tag='501']">
2910
    <xslo:if test="not(@ind1='z')">
2911
      <z:index name="su-ut:0">
2912
        <xslo:value-of select="marc:subfield[@code='a']"/>
2913
      </z:index>
2914
    </xslo:if>
2915
  </xslo:template>
2916
  <xslo:template mode="index_facets" match="marc:datafield[@tag='503']">
2917
    <xslo:if test="not(@ind1='z')">
2918
      <z:index name="su-ut:0">
2552
        <xslo:value-of select="marc:subfield[@code='a']"/>
2919
        <xslo:value-of select="marc:subfield[@code='a']"/>
2553
      </z:index>
2920
      </z:index>
2554
    </xslo:if>
2921
    </xslo:if>
Lines 2669-2677 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
2669
      <z:index name="location:0">
3036
      <z:index name="location:0">
2670
        <xslo:value-of select="marc:subfield[@code='e']"/>
3037
        <xslo:value-of select="marc:subfield[@code='e']"/>
2671
      </z:index>
3038
      </z:index>
2672
      <z:index name="ccode:0">
2673
        <xslo:value-of select="marc:subfield[@code='h']"/>
2674
      </z:index>
2675
    </xslo:if>
3039
    </xslo:if>
2676
  </xslo:template>
3040
  </xslo:template>
2677
  <xslo:template mode="index_all" match="text()">
3041
  <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="."/>
3043
      <xslo:value-of select="."/>
2680
    </z:index>
3044
    </z:index>
2681
  </xslo:template>
3045
  </xslo:template>
3046
  <xslo:template mode="index_sort_tit" match="marc:datafield[@tag='245']">
3047
    <xslo:variable name="chop">
3048
      <xslo:choose>
3049
        <xslo:when test="not(number(@ind2))">0</xslo:when>
3050
        <xslo:otherwise>
3051
          <xslo:value-of select="number(@ind2)"/>
3052
        </xslo:otherwise>
3053
      </xslo:choose>
3054
    </xslo:variable>
3055
    <z:index name="Title:s">
3056
      <xslo:value-of select="substring(marc:subfield[@code='a'], $chop+1)"/>
3057
    </z:index>
3058
  </xslo:template>
2682
  <xslo:template name="chopPunctuation">
3059
  <xslo:template name="chopPunctuation">
2683
    <xslo:param name="chopString"/>
3060
    <xslo:param name="chopString"/>
2684
    <xslo:variable name="length" select="string-length($chopString)"/>
3061
    <xslo:variable name="length" select="string-length($chopString)"/>
2685
- 

Return to bug 20424