Bug 8620: (follow-up) apply to NORMARC and MARC21 authorities
[koha.git] / etc / zebradb / marc_defs / normarc / biblios / biblio-zebra-indexdefs.xsl
blobf14068f6a0baae32cd8ba92ec50540856c6f2a06
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 This file has been automatically generated from a Koha index definition file
4 with the stylesheet koha-indexdefs-to-zebra.xsl. Do not manually edit this file,
5 as it may be overwritten. To regenerate, edit the appropriate Koha index
6 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) and run:
7 `xsltproc koha-indexdefs-to-zebra.xsl {biblio,authority}-koha-indexdefs.xml >
8 {biblio,authority}-zebra-indexdefs.xsl` (substituting the appropriate file names).
9 -->
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"/>
12 <xslo:template match="text()"/>
13 <xslo:template match="text()" mode="index_subfields"/>
14 <xslo:template match="text()" mode="index_data_field"/>
15 <xslo:template match="text()" mode="index_heading"/>
16 <xslo:template match="text()" mode="index_heading_conditional"/>
17 <xslo:template match="text()" mode="index_match_heading"/>
18 <xslo:template match="text()" mode="index_subject_thesaurus"/>
19 <xslo:template match="/">
20 <xslo:if test="marc:collection">
21 <collection>
22 <xslo:apply-templates select="marc:collection/marc:record"/>
23 </collection>
24 </xslo:if>
25 <xslo:if test="marc:record">
26 <xslo:apply-templates select="marc:record"/>
27 </xslo:if>
28 </xslo:template>
29 <xslo:template match="marc:record">
30 <xslo:variable name="idfield" select="normalize-space()"/>
31 <z:record type="update">
32 <xslo:attribute name="z:id">
33 <xslo:value-of select="$idfield"/>
34 </xslo:attribute>
35 <xslo:apply-templates/>
36 <xslo:apply-templates mode="index_subfields"/>
37 <xslo:apply-templates mode="index_data_field"/>
38 <xslo:apply-templates mode="index_heading"/>
39 <xslo:apply-templates mode="index_heading_conditional"/>
40 <xslo:apply-templates mode="index_match_heading"/>
41 <xslo:apply-templates mode="index_subject_thesaurus"/>
42 <xslo:apply-templates mode="index_all"/>
43 </z:record>
44 </xslo:template>
45 <xslo:template match="marc:leader">
46 <z:index name="llength:w">
47 <xslo:value-of select="substring(., 1, 5)"/>
48 </z:index>
49 <z:index name="rtype:w">
50 <xslo:value-of select="substring(., 7, 1)"/>
51 </z:index>
52 <z:index name="Bib-level:w">
53 <xslo:value-of select="substring(., 8, 1)"/>
54 </z:index>
55 </xslo:template>
56 <xslo:template match="marc:controlfield[@tag='001']">
57 <z:index name="Control-number:w">
58 <xslo:value-of select="."/>
59 </z:index>
60 </xslo:template>
61 <xslo:template match="marc:controlfield[@tag='007']">
62 <z:index name="Microform-generation:n">
63 <xslo:value-of select="substring(., 12, 1)"/>
64 </z:index>
65 <z:index name="Material-type:w">
66 <xslo:value-of select="."/>
67 </z:index>
68 <z:index name="ff7-00:w">
69 <xslo:value-of select="substring(., 1, 1)"/>
70 </z:index>
71 <z:index name="ff7-01:w">
72 <xslo:value-of select="substring(., 2, 1)"/>
73 </z:index>
74 <z:index name="ff7-02:w">
75 <xslo:value-of select="substring(., 3, 1)"/>
76 </z:index>
77 <z:index name="ff7-01-02:w">
78 <xslo:value-of select="substring(., 1, 2)"/>
79 </z:index>
80 </xslo:template>
81 <xslo:template match="marc:controlfield[@tag='008']">
82 <z:index name="date-entered-on-file:n">
83 <xslo:value-of select="substring(., 1, 5)"/>
84 </z:index>
85 <z:index name="date-entered-on-file:s">
86 <xslo:value-of select="substring(., 1, 5)"/>
87 </z:index>
88 <z:index name="pubdate:w">
89 <xslo:value-of select="substring(., 8, 4)"/>
90 </z:index>
91 <z:index name="pubdate:n">
92 <xslo:value-of select="substring(., 8, 4)"/>
93 </z:index>
94 <z:index name="pubdate:y">
95 <xslo:value-of select="substring(., 8, 4)"/>
96 </z:index>
97 <z:index name="pubdate:s">
98 <xslo:value-of select="substring(., 8, 4)"/>
99 </z:index>
100 <z:index name="pl:w">
101 <xslo:value-of select="substring(., 16, 3)"/>
102 </z:index>
103 <z:index name="ta:w">
104 <xslo:value-of select="substring(., 23, 1)"/>
105 </z:index>
106 <z:index name="ff8-23:w">
107 <xslo:value-of select="substring(., 24, 1)"/>
108 </z:index>
109 <z:index name="ff8-29:w">
110 <xslo:value-of select="substring(., 30, 1)"/>
111 </z:index>
112 <z:index name="lf:w">
113 <xslo:value-of select="substring(., 34, 1)"/>
114 </z:index>
115 <z:index name="bio:w">
116 <xslo:value-of select="substring(., 35, 1)"/>
117 </z:index>
118 <z:index name="ln:n">
119 <xslo:value-of select="substring(., 36, 3)"/>
120 </z:index>
121 <z:index name="ctype:w">
122 <xslo:value-of select="substring(., 25, 4)"/>
123 </z:index>
124 <z:index name="Record-source:w">
125 <xslo:value-of select="substring(., 40, 0)"/>
126 </z:index>
127 </xslo:template>
128 <xslo:template mode="index_subfields" match="marc:datafield[@tag='020']">
129 <xslo:for-each select="marc:subfield">
130 <xslo:if test="contains('a', @code)">
131 <z:index name="ISBN:w Identifier-standard:w">
132 <xslo:value-of select="."/>
133 </z:index>
134 </xslo:if>
135 </xslo:for-each>
136 </xslo:template>
137 <xslo:template mode="index_subfields" match="marc:datafield[@tag='022']">
138 <xslo:for-each select="marc:subfield">
139 <xslo:if test="contains('a', @code)">
140 <z:index name="ISSN:w ISBN:w">
141 <xslo:value-of select="."/>
142 </z:index>
143 </xslo:if>
144 </xslo:for-each>
145 </xslo:template>
146 <xslo:template mode="index_subfields" match="marc:datafield[@tag='100']">
147 <xslo:for-each select="marc:subfield">
148 <xslo:if test="contains('9', @code)">
149 <z:index name="Cross-Reference:w Koha-Auth-Number:w">
150 <xslo:value-of select="."/>
151 </z:index>
152 </xslo:if>
153 </xslo:for-each>
154 <xslo:for-each select="marc:subfield">
155 <xslo:if test="contains('a', @code)">
156 <z:index name="Author:w Author:p Author:s Editor:w Author-personal-bibliography:w Author-personal-bibliography:p Author-personal-bibliography:s">
157 <xslo:value-of select="."/>
158 </z:index>
159 </xslo:if>
160 </xslo:for-each>
161 </xslo:template>
162 <xslo:template mode="index_subfields" match="marc:datafield[@tag='110']">
163 <xslo:for-each select="marc:subfield">
164 <xslo:if test="contains('9', @code)">
165 <z:index name="Koha-Auth-Number:w">
166 <xslo:value-of select="."/>
167 </z:index>
168 </xslo:if>
169 </xslo:for-each>
170 </xslo:template>
171 <xslo:template mode="index_subfields" match="marc:datafield[@tag='111']">
172 <xslo:for-each select="marc:subfield">
173 <xslo:if test="contains('9', @code)">
174 <z:index name="Koha-Auth-Number:w">
175 <xslo:value-of select="."/>
176 </z:index>
177 </xslo:if>
178 </xslo:for-each>
179 </xslo:template>
180 <xslo:template mode="index_subfields" match="marc:datafield[@tag='130']">
181 <xslo:for-each select="marc:subfield">
182 <xslo:if test="contains('i', @code)">
183 <z:index name="Thematic-number:w">
184 <xslo:value-of select="."/>
185 </z:index>
186 </xslo:if>
187 </xslo:for-each>
188 <xslo:for-each select="marc:subfield">
189 <xslo:if test="contains('n', @code)">
190 <z:index name="Thematic-number:w">
191 <xslo:value-of select="."/>
192 </z:index>
193 </xslo:if>
194 </xslo:for-each>
195 <xslo:for-each select="marc:subfield">
196 <xslo:if test="contains('r', @code)">
197 <z:index name="Music-key:w">
198 <xslo:value-of select="."/>
199 </z:index>
200 </xslo:if>
201 </xslo:for-each>
202 <xslo:for-each select="marc:subfield">
203 <xslo:if test="contains('9', @code)">
204 <z:index name="Koha-Auth-Number:w">
205 <xslo:value-of select="."/>
206 </z:index>
207 </xslo:if>
208 </xslo:for-each>
209 </xslo:template>
210 <xslo:template mode="index_subfields" match="marc:datafield[@tag='240']">
211 <xslo:for-each select="marc:subfield">
212 <xslo:if test="contains('i', @code)">
213 <z:index name="Thematic-number:w">
214 <xslo:value-of select="."/>
215 </z:index>
216 </xslo:if>
217 </xslo:for-each>
218 <xslo:for-each select="marc:subfield">
219 <xslo:if test="contains('r', @code)">
220 <z:index name="Music-key:w">
221 <xslo:value-of select="."/>
222 </z:index>
223 </xslo:if>
224 </xslo:for-each>
225 <xslo:for-each select="marc:subfield">
226 <xslo:if test="contains('n', @code)">
227 <z:index name="Thematic-number:w">
228 <xslo:value-of select="."/>
229 </z:index>
230 </xslo:if>
231 </xslo:for-each>
232 </xslo:template>
233 <xslo:template mode="index_subfields" match="marc:datafield[@tag='245']">
234 <xslo:for-each select="marc:subfield">
235 <xslo:if test="contains('a', @code)">
236 <z:index name="Title-cover:w Title-cover:p Title-cover:s Title:w Title:p Title:s">
237 <xslo:value-of select="."/>
238 </z:index>
239 </xslo:if>
240 </xslo:for-each>
241 <xslo:for-each select="marc:subfield">
242 <xslo:if test="contains('c', @code)">
243 <z:index name="Author:w Author-in-order:w Author-in-order:p Author-in-order:s">
244 <xslo:value-of select="."/>
245 </z:index>
246 </xslo:if>
247 </xslo:for-each>
248 <xslo:for-each select="marc:subfield">
249 <xslo:if test="contains('9', @code)">
250 <z:index name="Cross-Reference:w Koha-Auth-Number:w">
251 <xslo:value-of select="."/>
252 </z:index>
253 </xslo:if>
254 </xslo:for-each>
255 </xslo:template>
256 <xslo:template mode="index_subfields" match="marc:datafield[@tag='260']">
257 <xslo:for-each select="marc:subfield">
258 <xslo:if test="contains('a', @code)">
259 <z:index name="pl:w pl:p">
260 <xslo:value-of select="."/>
261 </z:index>
262 </xslo:if>
263 </xslo:for-each>
264 <xslo:for-each select="marc:subfield">
265 <xslo:if test="contains('b', @code)">
266 <z:index name="Publisher:w Publisher:p">
267 <xslo:value-of select="."/>
268 </z:index>
269 </xslo:if>
270 </xslo:for-each>
271 <xslo:for-each select="marc:subfield">
272 <xslo:if test="contains('c', @code)">
273 <z:index name="copydate:w copydate:s">
274 <xslo:value-of select="."/>
275 </z:index>
276 </xslo:if>
277 </xslo:for-each>
278 </xslo:template>
279 <xslo:template mode="index_subfields" match="marc:datafield[@tag='440']">
280 <xslo:for-each select="marc:subfield">
281 <xslo:if test="contains('a', @code)">
282 <z:index name="Title-series:w Title-series:p">
283 <xslo:value-of select="."/>
284 </z:index>
285 </xslo:if>
286 </xslo:for-each>
287 <xslo:for-each select="marc:subfield">
288 <xslo:if test="contains('9', @code)">
289 <z:index name="Koha-Auth-Number:w">
290 <xslo:value-of select="."/>
291 </z:index>
292 </xslo:if>
293 </xslo:for-each>
294 </xslo:template>
295 <xslo:template mode="index_subfields" match="marc:datafield[@tag='490']">
296 <xslo:for-each select="marc:subfield">
297 <xslo:if test="contains('a', @code)">
298 <z:index name="Title-series:w Title-series:p">
299 <xslo:value-of select="."/>
300 </z:index>
301 </xslo:if>
302 </xslo:for-each>
303 <xslo:for-each select="marc:subfield">
304 <xslo:if test="contains('9', @code)">
305 <z:index name="Koha-Auth-Number:w">
306 <xslo:value-of select="."/>
307 </z:index>
308 </xslo:if>
309 </xslo:for-each>
310 </xslo:template>
311 <xslo:template mode="index_subfields" match="marc:datafield[@tag='600']">
312 <xslo:for-each select="marc:subfield">
313 <xslo:if test="contains('a', @code)">
314 <z:index name="Name-and-title:w Name:w Personal-name:w Subject-name-personal:w Subject:w Subject:p">
315 <xslo:value-of select="."/>
316 </z:index>
317 </xslo:if>
318 </xslo:for-each>
319 <xslo:for-each select="marc:subfield">
320 <xslo:if test="contains('t', @code)">
321 <z:index name="Name-and-title:w Title:w Subject:w Subject:p">
322 <xslo:value-of select="."/>
323 </z:index>
324 </xslo:if>
325 </xslo:for-each>
326 <xslo:for-each select="marc:subfield">
327 <xslo:if test="contains('9', @code)">
328 <z:index name="Koha-Auth-Number:w">
329 <xslo:value-of select="."/>
330 </z:index>
331 </xslo:if>
332 </xslo:for-each>
333 </xslo:template>
334 <xslo:template mode="index_subfields" match="marc:datafield[@tag='610']">
335 <xslo:for-each select="marc:subfield">
336 <xslo:if test="contains('a', @code)">
337 <z:index name="Name-and-title:w Subject:w Subject:p">
338 <xslo:value-of select="."/>
339 </z:index>
340 </xslo:if>
341 </xslo:for-each>
342 <xslo:for-each select="marc:subfield">
343 <xslo:if test="contains('t', @code)">
344 <z:index name="Name-and-title:w Title:w Subject:w Subject:p">
345 <xslo:value-of select="."/>
346 </z:index>
347 </xslo:if>
348 </xslo:for-each>
349 <xslo:for-each select="marc:subfield">
350 <xslo:if test="contains('9', @code)">
351 <z:index name="Koha-Auth-Number:w">
352 <xslo:value-of select="."/>
353 </z:index>
354 </xslo:if>
355 </xslo:for-each>
356 </xslo:template>
357 <xslo:template mode="index_subfields" match="marc:datafield[@tag='611']">
358 <xslo:for-each select="marc:subfield">
359 <xslo:if test="contains('a', @code)">
360 <z:index name="Name-and-title:w Subject:w Subject:p">
361 <xslo:value-of select="."/>
362 </z:index>
363 </xslo:if>
364 </xslo:for-each>
365 <xslo:for-each select="marc:subfield">
366 <xslo:if test="contains('t', @code)">
367 <z:index name="Name-and-title:w Title:w Subject:w Subject:p">
368 <xslo:value-of select="."/>
369 </z:index>
370 </xslo:if>
371 </xslo:for-each>
372 <xslo:for-each select="marc:subfield">
373 <xslo:if test="contains('9', @code)">
374 <z:index name="Koha-Auth-Number:w">
375 <xslo:value-of select="."/>
376 </z:index>
377 </xslo:if>
378 </xslo:for-each>
379 </xslo:template>
380 <xslo:template mode="index_subfields" match="marc:datafield[@tag='630']">
381 <xslo:for-each select="marc:subfield">
382 <xslo:if test="contains('i', @code)">
383 <z:index name="Thematic-number:w Subject:w Subject:p">
384 <xslo:value-of select="."/>
385 </z:index>
386 </xslo:if>
387 </xslo:for-each>
388 <xslo:for-each select="marc:subfield">
389 <xslo:if test="contains('n', @code)">
390 <z:index name="Thematic-number:w Subject:w Subject:p">
391 <xslo:value-of select="."/>
392 </z:index>
393 </xslo:if>
394 </xslo:for-each>
395 <xslo:for-each select="marc:subfield">
396 <xslo:if test="contains('r', @code)">
397 <z:index name="Music-key:w Subject:w Subject:p">
398 <xslo:value-of select="."/>
399 </z:index>
400 </xslo:if>
401 </xslo:for-each>
402 <xslo:for-each select="marc:subfield">
403 <xslo:if test="contains('9', @code)">
404 <z:index name="Koha-Auth-Number:w">
405 <xslo:value-of select="."/>
406 </z:index>
407 </xslo:if>
408 </xslo:for-each>
409 </xslo:template>
410 <xslo:template mode="index_subfields" match="marc:datafield[@tag='650']">
411 <xslo:for-each select="marc:subfield">
412 <xslo:if test="contains('9', @code)">
413 <z:index name="Koha-Auth-Number:w">
414 <xslo:value-of select="."/>
415 </z:index>
416 </xslo:if>
417 </xslo:for-each>
418 </xslo:template>
419 <xslo:template mode="index_subfields" match="marc:datafield[@tag='651']">
420 <xslo:for-each select="marc:subfield">
421 <xslo:if test="contains('9', @code)">
422 <z:index name="Koha-Auth-Number:w">
423 <xslo:value-of select="."/>
424 </z:index>
425 </xslo:if>
426 </xslo:for-each>
427 </xslo:template>
428 <xslo:template mode="index_subfields" match="marc:datafield[@tag='652']">
429 <xslo:for-each select="marc:subfield">
430 <xslo:if test="contains('9', @code)">
431 <z:index name="Koha-Auth-Number:w">
432 <xslo:value-of select="."/>
433 </z:index>
434 </xslo:if>
435 </xslo:for-each>
436 </xslo:template>
437 <xslo:template mode="index_subfields" match="marc:datafield[@tag='653']">
438 <xslo:for-each select="marc:subfield">
439 <xslo:if test="contains('9', @code)">
440 <z:index name="Koha-Auth-Number:w">
441 <xslo:value-of select="."/>
442 </z:index>
443 </xslo:if>
444 </xslo:for-each>
445 </xslo:template>
446 <xslo:template mode="index_subfields" match="marc:datafield[@tag='654']">
447 <xslo:for-each select="marc:subfield">
448 <xslo:if test="contains('9', @code)">
449 <z:index name="Koha-Auth-Number:w">
450 <xslo:value-of select="."/>
451 </z:index>
452 </xslo:if>
453 </xslo:for-each>
454 </xslo:template>
455 <xslo:template mode="index_subfields" match="marc:datafield[@tag='655']">
456 <xslo:for-each select="marc:subfield">
457 <xslo:if test="contains('9', @code)">
458 <z:index name="Koha-Auth-Number:w">
459 <xslo:value-of select="."/>
460 </z:index>
461 </xslo:if>
462 </xslo:for-each>
463 </xslo:template>
464 <xslo:template mode="index_subfields" match="marc:datafield[@tag='656']">
465 <xslo:for-each select="marc:subfield">
466 <xslo:if test="contains('9', @code)">
467 <z:index name="Koha-Auth-Number:w">
468 <xslo:value-of select="."/>
469 </z:index>
470 </xslo:if>
471 </xslo:for-each>
472 </xslo:template>
473 <xslo:template mode="index_subfields" match="marc:datafield[@tag='657']">
474 <xslo:for-each select="marc:subfield">
475 <xslo:if test="contains('9', @code)">
476 <z:index name="Koha-Auth-Number:w">
477 <xslo:value-of select="."/>
478 </z:index>
479 </xslo:if>
480 </xslo:for-each>
481 </xslo:template>
482 <xslo:template mode="index_subfields" match="marc:datafield[@tag='690']">
483 <xslo:for-each select="marc:subfield">
484 <xslo:if test="contains('9', @code)">
485 <z:index name="Koha-Auth-Number:w">
486 <xslo:value-of select="."/>
487 </z:index>
488 </xslo:if>
489 </xslo:for-each>
490 </xslo:template>
491 <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']">
492 <xslo:for-each select="marc:subfield">
493 <xslo:if test="contains('9', @code)">
494 <z:index name="Cross-Reference:w Koha-Auth-Number:w">
495 <xslo:value-of select="."/>
496 </z:index>
497 </xslo:if>
498 </xslo:for-each>
499 <xslo:for-each select="marc:subfield">
500 <xslo:if test="contains('a', @code)">
501 <z:index name="Author:w Author:p">
502 <xslo:value-of select="."/>
503 </z:index>
504 </xslo:if>
505 </xslo:for-each>
506 <xslo:for-each select="marc:subfield">
507 <xslo:if test="contains('i', @code)">
508 <z:index name="Thematic-number:w">
509 <xslo:value-of select="."/>
510 </z:index>
511 </xslo:if>
512 </xslo:for-each>
513 <xslo:for-each select="marc:subfield">
514 <xslo:if test="contains('n', @code)">
515 <z:index name="Thematic-number:w">
516 <xslo:value-of select="."/>
517 </z:index>
518 </xslo:if>
519 </xslo:for-each>
520 <xslo:for-each select="marc:subfield">
521 <xslo:if test="contains('r', @code)">
522 <z:index name="Music-key:w">
523 <xslo:value-of select="."/>
524 </z:index>
525 </xslo:if>
526 </xslo:for-each>
527 <xslo:for-each select="marc:subfield">
528 <xslo:if test="contains('t', @code)">
529 <z:index name="Author-title:w Name-and-title:w Title:w Title-uniform:w">
530 <xslo:value-of select="."/>
531 </z:index>
532 </xslo:if>
533 </xslo:for-each>
534 </xslo:template>
535 <xslo:template mode="index_subfields" match="marc:datafield[@tag='710']">
536 <xslo:for-each select="marc:subfield">
537 <xslo:if test="contains('t', @code)">
538 <z:index name="Author-title:w Name-and-title:w Title:w Title-uniform:w">
539 <xslo:value-of select="."/>
540 </z:index>
541 </xslo:if>
542 </xslo:for-each>
543 <xslo:for-each select="marc:subfield">
544 <xslo:if test="contains('a', @code)">
545 <z:index name="Name-and-title:w">
546 <xslo:value-of select="."/>
547 </z:index>
548 </xslo:if>
549 </xslo:for-each>
550 <xslo:for-each select="marc:subfield">
551 <xslo:if test="contains('i', @code)">
552 <z:index name="Thematic-number:w">
553 <xslo:value-of select="."/>
554 </z:index>
555 </xslo:if>
556 </xslo:for-each>
557 <xslo:for-each select="marc:subfield">
558 <xslo:if test="contains('9', @code)">
559 <z:index name="Koha-Auth-Number:w">
560 <xslo:value-of select="."/>
561 </z:index>
562 </xslo:if>
563 </xslo:for-each>
564 </xslo:template>
565 <xslo:template mode="index_subfields" match="marc:datafield[@tag='711']">
566 <xslo:for-each select="marc:subfield">
567 <xslo:if test="contains('a', @code)">
568 <z:index name="Name-and-title:w">
569 <xslo:value-of select="."/>
570 </z:index>
571 </xslo:if>
572 </xslo:for-each>
573 <xslo:for-each select="marc:subfield">
574 <xslo:if test="contains('t', @code)">
575 <z:index name="Author-title:w Title:w Title-uniform:w">
576 <xslo:value-of select="."/>
577 </z:index>
578 </xslo:if>
579 </xslo:for-each>
580 <xslo:for-each select="marc:subfield">
581 <xslo:if test="contains('9', @code)">
582 <z:index name="Koha-Auth-Number:w">
583 <xslo:value-of select="."/>
584 </z:index>
585 </xslo:if>
586 </xslo:for-each>
587 </xslo:template>
588 <xslo:template mode="index_subfields" match="marc:datafield[@tag='730']">
589 <xslo:for-each select="marc:subfield">
590 <xslo:if test="contains('i', @code)">
591 <z:index name="Thematic-number:w">
592 <xslo:value-of select="."/>
593 </z:index>
594 </xslo:if>
595 </xslo:for-each>
596 <xslo:for-each select="marc:subfield">
597 <xslo:if test="contains('n', @code)">
598 <z:index name="Thematic-number:w">
599 <xslo:value-of select="."/>
600 </z:index>
601 </xslo:if>
602 </xslo:for-each>
603 <xslo:for-each select="marc:subfield">
604 <xslo:if test="contains('r', @code)">
605 <z:index name="Music-key:w">
606 <xslo:value-of select="."/>
607 </z:index>
608 </xslo:if>
609 </xslo:for-each>
610 <xslo:for-each select="marc:subfield">
611 <xslo:if test="contains('9', @code)">
612 <z:index name="Koha-Auth-Number:w">
613 <xslo:value-of select="."/>
614 </z:index>
615 </xslo:if>
616 </xslo:for-each>
617 </xslo:template>
618 <xslo:template mode="index_subfields" match="marc:datafield[@tag='773']">
619 <xslo:for-each select="marc:subfield">
620 <xslo:if test="contains('a', @code)">
621 <z:index name="Host-item:w">
622 <xslo:value-of select="."/>
623 </z:index>
624 </xslo:if>
625 </xslo:for-each>
626 <xslo:for-each select="marc:subfield">
627 <xslo:if test="contains('9', @code)">
628 <z:index name="Host-Item-Number:w">
629 <xslo:value-of select="."/>
630 </z:index>
631 </xslo:if>
632 </xslo:for-each>
633 <xslo:for-each select="marc:subfield">
634 <xslo:if test="contains('t', @code)">
635 <z:index name="Host-item:w">
636 <xslo:value-of select="."/>
637 </z:index>
638 </xslo:if>
639 </xslo:for-each>
640 <xslo:for-each select="marc:subfield">
641 <xslo:if test="contains('w', @code)">
642 <z:index name="Record-control-number:w">
643 <xslo:value-of select="."/>
644 </z:index>
645 </xslo:if>
646 </xslo:for-each>
647 </xslo:template>
648 <xslo:template mode="index_subfields" match="marc:datafield[@tag='780']">
649 <xslo:for-each select="marc:subfield">
650 <xslo:if test="contains('t', @code)">
651 <z:index name="Title:w">
652 <xslo:value-of select="."/>
653 </z:index>
654 </xslo:if>
655 </xslo:for-each>
656 </xslo:template>
657 <xslo:template mode="index_subfields" match="marc:datafield[@tag='800']">
658 <xslo:for-each select="marc:subfield">
659 <xslo:if test="contains('a', @code)">
660 <z:index name="Name-and-title:w">
661 <xslo:value-of select="."/>
662 </z:index>
663 </xslo:if>
664 </xslo:for-each>
665 <xslo:for-each select="marc:subfield">
666 <xslo:if test="contains('t', @code)">
667 <z:index name="Author-title:w Name-and-title:w Title:w Title-series:w">
668 <xslo:value-of select="."/>
669 </z:index>
670 </xslo:if>
671 </xslo:for-each>
672 <xslo:for-each select="marc:subfield">
673 <xslo:if test="contains('9', @code)">
674 <z:index name="Koha-Auth-Number:w">
675 <xslo:value-of select="."/>
676 </z:index>
677 </xslo:if>
678 </xslo:for-each>
679 </xslo:template>
680 <xslo:template mode="index_subfields" match="marc:datafield[@tag='810']">
681 <xslo:for-each select="marc:subfield">
682 <xslo:if test="contains('a', @code)">
683 <z:index name="Name-and-title:w">
684 <xslo:value-of select="."/>
685 </z:index>
686 </xslo:if>
687 </xslo:for-each>
688 <xslo:for-each select="marc:subfield">
689 <xslo:if test="contains('t', @code)">
690 <z:index name="Author-title:w Name-and-title:w Title:w Title-series:w">
691 <xslo:value-of select="."/>
692 </z:index>
693 </xslo:if>
694 </xslo:for-each>
695 <xslo:for-each select="marc:subfield">
696 <xslo:if test="contains('9', @code)">
697 <z:index name="Koha-Auth-Number:w">
698 <xslo:value-of select="."/>
699 </z:index>
700 </xslo:if>
701 </xslo:for-each>
702 </xslo:template>
703 <xslo:template mode="index_subfields" match="marc:datafield[@tag='811']">
704 <xslo:for-each select="marc:subfield">
705 <xslo:if test="contains('a', @code)">
706 <z:index name="Name-and-title:w">
707 <xslo:value-of select="."/>
708 </z:index>
709 </xslo:if>
710 </xslo:for-each>
711 <xslo:for-each select="marc:subfield">
712 <xslo:if test="contains('9', @code)">
713 <z:index name="Koha-Auth-Number:w">
714 <xslo:value-of select="."/>
715 </z:index>
716 </xslo:if>
717 </xslo:for-each>
718 <xslo:for-each select="marc:subfield">
719 <xslo:if test="contains('t', @code)">
720 <z:index name="Author-title:w Name-and-title:w Title:w Title-series:w">
721 <xslo:value-of select="."/>
722 </z:index>
723 </xslo:if>
724 </xslo:for-each>
725 </xslo:template>
726 <xslo:template mode="index_subfields" match="marc:datafield[@tag='830']">
727 <xslo:for-each select="marc:subfield">
728 <xslo:if test="contains('9', @code)">
729 <z:index name="Koha-Auth-Number:w">
730 <xslo:value-of select="."/>
731 </z:index>
732 </xslo:if>
733 </xslo:for-each>
734 </xslo:template>
735 <xslo:template mode="index_subfields" match="marc:datafield[@tag='999']">
736 <xslo:for-each select="marc:subfield">
737 <xslo:if test="contains('c', @code)">
738 <z:index name="Local-Number:n Local-Number:w Local-Number:s">
739 <xslo:value-of select="."/>
740 </z:index>
741 </xslo:if>
742 </xslo:for-each>
743 <xslo:for-each select="marc:subfield">
744 <xslo:if test="contains('d', @code)">
745 <z:index name="biblioitemnumber:n biblioitemnumber:w biblioitemnumber:s">
746 <xslo:value-of select="."/>
747 </z:index>
748 </xslo:if>
749 </xslo:for-each>
750 </xslo:template>
751 <xslo:template mode="index_subfields" match="marc:datafield[@tag='942']">
752 <xslo:for-each select="marc:subfield">
753 <xslo:if test="contains('0', @code)">
754 <z:index name="totalissues:n totalissues:s">
755 <xslo:value-of select="."/>
756 </z:index>
757 </xslo:if>
758 </xslo:for-each>
759 <xslo:for-each select="marc:subfield">
760 <xslo:if test="contains('2', @code)">
761 <z:index name="cn-bib-source:w">
762 <xslo:value-of select="."/>
763 </z:index>
764 </xslo:if>
765 </xslo:for-each>
766 <xslo:for-each select="marc:subfield">
767 <xslo:if test="contains('6', @code)">
768 <z:index name="cn-bib-sort:n cn-bib-sort:s">
769 <xslo:value-of select="."/>
770 </z:index>
771 </xslo:if>
772 </xslo:for-each>
773 <xslo:for-each select="marc:subfield">
774 <xslo:if test="contains('c', @code)">
775 <z:index name="itemtype:w">
776 <xslo:value-of select="."/>
777 </z:index>
778 </xslo:if>
779 </xslo:for-each>
780 <xslo:for-each select="marc:subfield">
781 <xslo:if test="contains('n', @code)">
782 <z:index name="Suppress:w Suppress:n">
783 <xslo:value-of select="."/>
784 </z:index>
785 </xslo:if>
786 </xslo:for-each>
787 <xslo:for-each select="marc:subfield">
788 <xslo:if test="contains('h', @code)">
789 <z:index name="cn-class:w">
790 <xslo:value-of select="."/>
791 </z:index>
792 </xslo:if>
793 </xslo:for-each>
794 <xslo:for-each select="marc:subfield">
795 <xslo:if test="contains('i', @code)">
796 <z:index name="cn-item:w">
797 <xslo:value-of select="."/>
798 </z:index>
799 </xslo:if>
800 </xslo:for-each>
801 <xslo:for-each select="marc:subfield">
802 <xslo:if test="contains('k', @code)">
803 <z:index name="cn-prefix:w">
804 <xslo:value-of select="."/>
805 </z:index>
806 </xslo:if>
807 </xslo:for-each>
808 <xslo:for-each select="marc:subfield">
809 <xslo:if test="contains('m', @code)">
810 <z:index name="cn-suffix:w">
811 <xslo:value-of select="."/>
812 </z:index>
813 </xslo:if>
814 </xslo:for-each>
815 </xslo:template>
816 <xslo:template mode="index_subfields" match="marc:datafield[@tag='952']">
817 <xslo:for-each select="marc:subfield">
818 <xslo:if test="contains('0', @code)">
819 <z:index name="withdrawn:n withdrawn:w">
820 <xslo:value-of select="."/>
821 </z:index>
822 </xslo:if>
823 </xslo:for-each>
824 <xslo:for-each select="marc:subfield">
825 <xslo:if test="contains('1', @code)">
826 <z:index name="lost:w lost:n">
827 <xslo:value-of select="."/>
828 </z:index>
829 </xslo:if>
830 </xslo:for-each>
831 <xslo:for-each select="marc:subfield">
832 <xslo:if test="contains('2', @code)">
833 <z:index name="classification-source:w">
834 <xslo:value-of select="."/>
835 </z:index>
836 </xslo:if>
837 </xslo:for-each>
838 <xslo:for-each select="marc:subfield">
839 <xslo:if test="contains('3', @code)">
840 <z:index name="materials-specified:w">
841 <xslo:value-of select="."/>
842 </z:index>
843 </xslo:if>
844 </xslo:for-each>
845 <xslo:for-each select="marc:subfield">
846 <xslo:if test="contains('4', @code)">
847 <z:index name="damaged:n damaged:w">
848 <xslo:value-of select="."/>
849 </z:index>
850 </xslo:if>
851 </xslo:for-each>
852 <xslo:for-each select="marc:subfield">
853 <xslo:if test="contains('5', @code)">
854 <z:index name="restricted:n restricted:w">
855 <xslo:value-of select="."/>
856 </z:index>
857 </xslo:if>
858 </xslo:for-each>
859 <xslo:for-each select="marc:subfield">
860 <xslo:if test="contains('6', @code)">
861 <z:index name="cn-sort:n cn-sort:s">
862 <xslo:value-of select="."/>
863 </z:index>
864 </xslo:if>
865 </xslo:for-each>
866 <xslo:for-each select="marc:subfield">
867 <xslo:if test="contains('7', @code)">
868 <z:index name="notforloan:n notforloan:w">
869 <xslo:value-of select="."/>
870 </z:index>
871 </xslo:if>
872 </xslo:for-each>
873 <xslo:for-each select="marc:subfield">
874 <xslo:if test="contains('8', @code)">
875 <z:index name="ccode:w">
876 <xslo:value-of select="."/>
877 </z:index>
878 </xslo:if>
879 </xslo:for-each>
880 <xslo:for-each select="marc:subfield">
881 <xslo:if test="contains('9', @code)">
882 <z:index name="itemnumber:n itemnumber:s">
883 <xslo:value-of select="."/>
884 </z:index>
885 </xslo:if>
886 </xslo:for-each>
887 <xslo:for-each select="marc:subfield">
888 <xslo:if test="contains('a', @code)">
889 <z:index name="homebranch:w">
890 <xslo:value-of select="."/>
891 </z:index>
892 </xslo:if>
893 </xslo:for-each>
894 <xslo:for-each select="marc:subfield">
895 <xslo:if test="contains('b', @code)">
896 <z:index name="holdingbranch:w">
897 <xslo:value-of select="."/>
898 </z:index>
899 </xslo:if>
900 </xslo:for-each>
901 <xslo:for-each select="marc:subfield">
902 <xslo:if test="contains('c', @code)">
903 <z:index name="location:w">
904 <xslo:value-of select="."/>
905 </z:index>
906 </xslo:if>
907 </xslo:for-each>
908 <xslo:for-each select="marc:subfield">
909 <xslo:if test="contains('d', @code)">
910 <z:index name="Date-of-acquisition:w Date-of-acquisition:d Date-of-acquisition:s">
911 <xslo:value-of select="."/>
912 </z:index>
913 </xslo:if>
914 </xslo:for-each>
915 <xslo:for-each select="marc:subfield">
916 <xslo:if test="contains('e', @code)">
917 <z:index name="acqsource:w">
918 <xslo:value-of select="."/>
919 </z:index>
920 </xslo:if>
921 </xslo:for-each>
922 <xslo:for-each select="marc:subfield">
923 <xslo:if test="contains('f', @code)">
924 <z:index name="coded-location-qualifier:w">
925 <xslo:value-of select="."/>
926 </z:index>
927 </xslo:if>
928 </xslo:for-each>
929 <xslo:for-each select="marc:subfield">
930 <xslo:if test="contains('g', @code)">
931 <z:index name="price:w">
932 <xslo:value-of select="."/>
933 </z:index>
934 </xslo:if>
935 </xslo:for-each>
936 <xslo:for-each select="marc:subfield">
937 <xslo:if test="contains('j', @code)">
938 <z:index name="stack:n stack:w">
939 <xslo:value-of select="."/>
940 </z:index>
941 </xslo:if>
942 </xslo:for-each>
943 <xslo:for-each select="marc:subfield">
944 <xslo:if test="contains('l', @code)">
945 <z:index name="issues:n issues:w issues:s">
946 <xslo:value-of select="."/>
947 </z:index>
948 </xslo:if>
949 </xslo:for-each>
950 <xslo:for-each select="marc:subfield">
951 <xslo:if test="contains('m', @code)">
952 <z:index name="renewals:n renewals:w">
953 <xslo:value-of select="."/>
954 </z:index>
955 </xslo:if>
956 </xslo:for-each>
957 <xslo:for-each select="marc:subfield">
958 <xslo:if test="contains('n', @code)">
959 <z:index name="reserves:n reserves:w">
960 <xslo:value-of select="."/>
961 </z:index>
962 </xslo:if>
963 </xslo:for-each>
964 <xslo:for-each select="marc:subfield">
965 <xslo:if test="contains('o', @code)">
966 <z:index name="Local-classification:w Local-classification:p Local-classification:s">
967 <xslo:value-of select="."/>
968 </z:index>
969 </xslo:if>
970 </xslo:for-each>
971 <xslo:for-each select="marc:subfield">
972 <xslo:if test="contains('p', @code)">
973 <z:index name="barcode:w barcode:n">
974 <xslo:value-of select="."/>
975 </z:index>
976 </xslo:if>
977 </xslo:for-each>
978 <xslo:for-each select="marc:subfield">
979 <xslo:if test="contains('q', @code)">
980 <z:index name="onloan:n onloan:w">
981 <xslo:value-of select="."/>
982 </z:index>
983 </xslo:if>
984 </xslo:for-each>
985 <xslo:for-each select="marc:subfield">
986 <xslo:if test="contains('r', @code)">
987 <z:index name="datelastseen:w">
988 <xslo:value-of select="."/>
989 </z:index>
990 </xslo:if>
991 </xslo:for-each>
992 <xslo:for-each select="marc:subfield">
993 <xslo:if test="contains('s', @code)">
994 <z:index name="datelastborrowed:w">
995 <xslo:value-of select="."/>
996 </z:index>
997 </xslo:if>
998 </xslo:for-each>
999 <xslo:for-each select="marc:subfield">
1000 <xslo:if test="contains('t', @code)">
1001 <z:index name="copynumber:w">
1002 <xslo:value-of select="."/>
1003 </z:index>
1004 </xslo:if>
1005 </xslo:for-each>
1006 <xslo:for-each select="marc:subfield">
1007 <xslo:if test="contains('u', @code)">
1008 <z:index name="uri:u">
1009 <xslo:value-of select="."/>
1010 </z:index>
1011 </xslo:if>
1012 </xslo:for-each>
1013 <xslo:for-each select="marc:subfield">
1014 <xslo:if test="contains('v', @code)">
1015 <z:index name="replacementprice:w">
1016 <xslo:value-of select="."/>
1017 </z:index>
1018 </xslo:if>
1019 </xslo:for-each>
1020 <xslo:for-each select="marc:subfield">
1021 <xslo:if test="contains('w', @code)">
1022 <z:index name="replacementpricedate:w">
1023 <xslo:value-of select="."/>
1024 </z:index>
1025 </xslo:if>
1026 </xslo:for-each>
1027 <xslo:for-each select="marc:subfield">
1028 <xslo:if test="contains('y', @code)">
1029 <z:index name="itype:w">
1030 <xslo:value-of select="."/>
1031 </z:index>
1032 </xslo:if>
1033 </xslo:for-each>
1034 </xslo:template>
1035 <xslo:template mode="index_data_field" match="marc:datafield[@tag='010']">
1036 <z:index name="LC-card-number:w Identifier-standard:w">
1037 <xslo:variable name="raw_heading">
1038 <xslo:for-each select="marc:subfield">
1039 <xslo:if test="position() &gt; 1">
1040 <xslo:value-of select="substring(' ', 1, 1)"/>
1041 </xslo:if>
1042 <xslo:value-of select="."/>
1043 </xslo:for-each>
1044 </xslo:variable>
1045 <xslo:value-of select="normalize-space($raw_heading)"/>
1046 </z:index>
1047 </xslo:template>
1048 <xslo:template mode="index_data_field" match="marc:datafield[@tag='015']">
1049 <z:index name="BNB-card-number:w BGF-number:w Number-db:w Number-natl-biblio:w Identifier-standard:w">
1050 <xslo:variable name="raw_heading">
1051 <xslo:for-each select="marc:subfield">
1052 <xslo:if test="position() &gt; 1">
1053 <xslo:value-of select="substring(' ', 1, 1)"/>
1054 </xslo:if>
1055 <xslo:value-of select="."/>
1056 </xslo:for-each>
1057 </xslo:variable>
1058 <xslo:value-of select="normalize-space($raw_heading)"/>
1059 </z:index>
1060 </xslo:template>
1061 <xslo:template mode="index_data_field" match="marc:datafield[@tag='020']">
1062 <z:index name="ISBN:w Identifier-standard:w">
1063 <xslo:variable name="raw_heading">
1064 <xslo:for-each select="marc:subfield">
1065 <xslo:if test="position() &gt; 1">
1066 <xslo:value-of select="substring(' ', 1, 1)"/>
1067 </xslo:if>
1068 <xslo:value-of select="."/>
1069 </xslo:for-each>
1070 </xslo:variable>
1071 <xslo:value-of select="normalize-space($raw_heading)"/>
1072 </z:index>
1073 </xslo:template>
1074 <xslo:template mode="index_data_field" match="marc:datafield[@tag='022']">
1075 <z:index name="ISSN:w Identifier-standard:w">
1076 <xslo:variable name="raw_heading">
1077 <xslo:for-each select="marc:subfield">
1078 <xslo:if test="position() &gt; 1">
1079 <xslo:value-of select="substring(' ', 1, 1)"/>
1080 </xslo:if>
1081 <xslo:value-of select="."/>
1082 </xslo:for-each>
1083 </xslo:variable>
1084 <xslo:value-of select="normalize-space($raw_heading)"/>
1085 </z:index>
1086 </xslo:template>
1087 <xslo:template mode="index_data_field" match="marc:datafield[@tag='024']">
1088 <z:index name="Identifier-standard:w">
1089 <xslo:variable name="raw_heading">
1090 <xslo:for-each select="marc:subfield">
1091 <xslo:if test="position() &gt; 1">
1092 <xslo:value-of select="substring(' ', 1, 1)"/>
1093 </xslo:if>
1094 <xslo:value-of select="."/>
1095 </xslo:for-each>
1096 </xslo:variable>
1097 <xslo:value-of select="normalize-space($raw_heading)"/>
1098 </z:index>
1099 </xslo:template>
1100 <xslo:template mode="index_data_field" match="marc:datafield[@tag='025']">
1101 <z:index name="Identifier-standard:w">
1102 <xslo:variable name="raw_heading">
1103 <xslo:for-each select="marc:subfield">
1104 <xslo:if test="position() &gt; 1">
1105 <xslo:value-of select="substring(' ', 1, 1)"/>
1106 </xslo:if>
1107 <xslo:value-of select="."/>
1108 </xslo:for-each>
1109 </xslo:variable>
1110 <xslo:value-of select="normalize-space($raw_heading)"/>
1111 </z:index>
1112 </xslo:template>
1113 <xslo:template mode="index_data_field" match="marc:datafield[@tag='027']">
1114 <z:index name="Report-number:w Identifier-standard:w">
1115 <xslo:variable name="raw_heading">
1116 <xslo:for-each select="marc:subfield">
1117 <xslo:if test="position() &gt; 1">
1118 <xslo:value-of select="substring(' ', 1, 1)"/>
1119 </xslo:if>
1120 <xslo:value-of select="."/>
1121 </xslo:for-each>
1122 </xslo:variable>
1123 <xslo:value-of select="normalize-space($raw_heading)"/>
1124 </z:index>
1125 </xslo:template>
1126 <xslo:template mode="index_data_field" match="marc:datafield[@tag='028']">
1127 <z:index name="Number-music-publisher:w Identifier-standard:w">
1128 <xslo:variable name="raw_heading">
1129 <xslo:for-each select="marc:subfield">
1130 <xslo:if test="position() &gt; 1">
1131 <xslo:value-of select="substring(' ', 1, 1)"/>
1132 </xslo:if>
1133 <xslo:value-of select="."/>
1134 </xslo:for-each>
1135 </xslo:variable>
1136 <xslo:value-of select="normalize-space($raw_heading)"/>
1137 </z:index>
1138 </xslo:template>
1139 <xslo:template mode="index_data_field" match="marc:datafield[@tag='030']">
1140 <z:index name="CODEN:w Identifier-standard:w">
1141 <xslo:variable name="raw_heading">
1142 <xslo:for-each select="marc:subfield">
1143 <xslo:if test="position() &gt; 1">
1144 <xslo:value-of select="substring(' ', 1, 1)"/>
1145 </xslo:if>
1146 <xslo:value-of select="."/>
1147 </xslo:for-each>
1148 </xslo:variable>
1149 <xslo:value-of select="normalize-space($raw_heading)"/>
1150 </z:index>
1151 </xslo:template>
1152 <xslo:template mode="index_data_field" match="marc:datafield[@tag='040']">
1153 <z:index name="Code-institution:w Record-source:w">
1154 <xslo:variable name="raw_heading">
1155 <xslo:for-each select="marc:subfield">
1156 <xslo:if test="position() &gt; 1">
1157 <xslo:value-of select="substring(' ', 1, 1)"/>
1158 </xslo:if>
1159 <xslo:value-of select="."/>
1160 </xslo:for-each>
1161 </xslo:variable>
1162 <xslo:value-of select="normalize-space($raw_heading)"/>
1163 </z:index>
1164 </xslo:template>
1165 <xslo:template mode="index_data_field" match="marc:datafield[@tag='041']">
1166 <z:index name="ln:w">
1167 <xslo:variable name="raw_heading">
1168 <xslo:for-each select="marc:subfield">
1169 <xslo:if test="position() &gt; 1">
1170 <xslo:value-of select="substring(' ', 1, 1)"/>
1171 </xslo:if>
1172 <xslo:value-of select="."/>
1173 </xslo:for-each>
1174 </xslo:variable>
1175 <xslo:value-of select="normalize-space($raw_heading)"/>
1176 </z:index>
1177 </xslo:template>
1178 <xslo:template mode="index_data_field" match="marc:datafield[@tag='043']">
1179 <z:index name="Code-geographic:w">
1180 <xslo:variable name="raw_heading">
1181 <xslo:for-each select="marc:subfield">
1182 <xslo:if test="position() &gt; 1">
1183 <xslo:value-of select="substring(' ', 1, 1)"/>
1184 </xslo:if>
1185 <xslo:value-of select="."/>
1186 </xslo:for-each>
1187 </xslo:variable>
1188 <xslo:value-of select="normalize-space($raw_heading)"/>
1189 </z:index>
1190 </xslo:template>
1191 <xslo:template mode="index_data_field" match="marc:datafield[@tag='060']">
1192 <z:index name="NLM-call-number:w">
1193 <xslo:variable name="raw_heading">
1194 <xslo:for-each select="marc:subfield">
1195 <xslo:if test="position() &gt; 1">
1196 <xslo:value-of select="substring(' ', 1, 1)"/>
1197 </xslo:if>
1198 <xslo:value-of select="."/>
1199 </xslo:for-each>
1200 </xslo:variable>
1201 <xslo:value-of select="normalize-space($raw_heading)"/>
1202 </z:index>
1203 </xslo:template>
1204 <xslo:template mode="index_data_field" match="marc:datafield[@tag='080']">
1205 <z:index name="UDC-classification:w">
1206 <xslo:variable name="raw_heading">
1207 <xslo:for-each select="marc:subfield">
1208 <xslo:if test="position() &gt; 1">
1209 <xslo:value-of select="substring(' ', 1, 1)"/>
1210 </xslo:if>
1211 <xslo:value-of select="."/>
1212 </xslo:for-each>
1213 </xslo:variable>
1214 <xslo:value-of select="normalize-space($raw_heading)"/>
1215 </z:index>
1216 </xslo:template>
1217 <xslo:template mode="index_data_field" match="marc:datafield[@tag='082']">
1218 <z:index name="Dewey-classification:w Dewey-classification:s">
1219 <xslo:variable name="raw_heading">
1220 <xslo:for-each select="marc:subfield">
1221 <xslo:if test="position() &gt; 1">
1222 <xslo:value-of select="substring(' ', 1, 1)"/>
1223 </xslo:if>
1224 <xslo:value-of select="."/>
1225 </xslo:for-each>
1226 </xslo:variable>
1227 <xslo:value-of select="normalize-space($raw_heading)"/>
1228 </z:index>
1229 </xslo:template>
1230 <xslo:template mode="index_data_field" match="marc:datafield[@tag='100']">
1231 <z:index name="Author:w Author-title:w Author-name-personal:w Name:w Name-and-title:w Personal-name:w">
1232 <xslo:variable name="raw_heading">
1233 <xslo:for-each select="marc:subfield">
1234 <xslo:if test="position() &gt; 1">
1235 <xslo:value-of select="substring(' ', 1, 1)"/>
1236 </xslo:if>
1237 <xslo:value-of select="."/>
1238 </xslo:for-each>
1239 </xslo:variable>
1240 <xslo:value-of select="normalize-space($raw_heading)"/>
1241 </z:index>
1242 </xslo:template>
1243 <xslo:template mode="index_data_field" match="marc:datafield[@tag='110']">
1244 <z:index name="Author:w Author-title:w Author-name-corporate:w Name:w Name-and-title:w Corporate-name:w">
1245 <xslo:variable name="raw_heading">
1246 <xslo:for-each select="marc:subfield">
1247 <xslo:if test="position() &gt; 1">
1248 <xslo:value-of select="substring(' ', 1, 1)"/>
1249 </xslo:if>
1250 <xslo:value-of select="."/>
1251 </xslo:for-each>
1252 </xslo:variable>
1253 <xslo:value-of select="normalize-space($raw_heading)"/>
1254 </z:index>
1255 </xslo:template>
1256 <xslo:template mode="index_data_field" match="marc:datafield[@tag='111']">
1257 <z:index name="Author:w Author-title:w Author-name-corporate:w Name:w Name-and-title:w Conference-name:w">
1258 <xslo:variable name="raw_heading">
1259 <xslo:for-each select="marc:subfield">
1260 <xslo:if test="position() &gt; 1">
1261 <xslo:value-of select="substring(' ', 1, 1)"/>
1262 </xslo:if>
1263 <xslo:value-of select="."/>
1264 </xslo:for-each>
1265 </xslo:variable>
1266 <xslo:value-of select="normalize-space($raw_heading)"/>
1267 </z:index>
1268 </xslo:template>
1269 <xslo:template mode="index_data_field" match="marc:datafield[@tag='130']">
1270 <z:index name="Title:w Title-uniform:w">
1271 <xslo:variable name="raw_heading">
1272 <xslo:for-each select="marc:subfield">
1273 <xslo:if test="position() &gt; 1">
1274 <xslo:value-of select="substring(' ', 1, 1)"/>
1275 </xslo:if>
1276 <xslo:value-of select="."/>
1277 </xslo:for-each>
1278 </xslo:variable>
1279 <xslo:value-of select="normalize-space($raw_heading)"/>
1280 </z:index>
1281 </xslo:template>
1282 <xslo:template mode="index_data_field" match="marc:datafield[@tag='210']">
1283 <z:index name="Title:w Title-abbreviated:w">
1284 <xslo:variable name="raw_heading">
1285 <xslo:for-each select="marc:subfield">
1286 <xslo:if test="position() &gt; 1">
1287 <xslo:value-of select="substring(' ', 1, 1)"/>
1288 </xslo:if>
1289 <xslo:value-of select="."/>
1290 </xslo:for-each>
1291 </xslo:variable>
1292 <xslo:value-of select="normalize-space($raw_heading)"/>
1293 </z:index>
1294 </xslo:template>
1295 <xslo:template mode="index_data_field" match="marc:datafield[@tag='222']">
1296 <z:index name="Title:w Title-key:w">
1297 <xslo:variable name="raw_heading">
1298 <xslo:for-each select="marc:subfield">
1299 <xslo:if test="position() &gt; 1">
1300 <xslo:value-of select="substring(' ', 1, 1)"/>
1301 </xslo:if>
1302 <xslo:value-of select="."/>
1303 </xslo:for-each>
1304 </xslo:variable>
1305 <xslo:value-of select="normalize-space($raw_heading)"/>
1306 </z:index>
1307 </xslo:template>
1308 <xslo:template mode="index_data_field" match="marc:datafield[@tag='240']">
1309 <z:index name="Title:w Title:p Title-uniform:w">
1310 <xslo:variable name="raw_heading">
1311 <xslo:for-each select="marc:subfield">
1312 <xslo:if test="position() &gt; 1">
1313 <xslo:value-of select="substring(' ', 1, 1)"/>
1314 </xslo:if>
1315 <xslo:value-of select="."/>
1316 </xslo:for-each>
1317 </xslo:variable>
1318 <xslo:value-of select="normalize-space($raw_heading)"/>
1319 </z:index>
1320 </xslo:template>
1321 <xslo:template mode="index_data_field" match="marc:datafield[@tag='245']">
1322 <z:index name="Title:w Title:p">
1323 <xslo:variable name="raw_heading">
1324 <xslo:for-each select="marc:subfield">
1325 <xslo:if test="position() &gt; 1">
1326 <xslo:value-of select="substring(' ', 1, 1)"/>
1327 </xslo:if>
1328 <xslo:value-of select="."/>
1329 </xslo:for-each>
1330 </xslo:variable>
1331 <xslo:value-of select="normalize-space($raw_heading)"/>
1332 </z:index>
1333 </xslo:template>
1334 <xslo:template mode="index_data_field" match="marc:datafield[@tag='246']">
1335 <z:index name="Title:w Title:p Title-abbreviated:w Title-expanded:w Title-former:w">
1336 <xslo:variable name="raw_heading">
1337 <xslo:for-each select="marc:subfield">
1338 <xslo:if test="position() &gt; 1">
1339 <xslo:value-of select="substring(' ', 1, 1)"/>
1340 </xslo:if>
1341 <xslo:value-of select="."/>
1342 </xslo:for-each>
1343 </xslo:variable>
1344 <xslo:value-of select="normalize-space($raw_heading)"/>
1345 </z:index>
1346 </xslo:template>
1347 <xslo:template mode="index_data_field" match="marc:datafield[@tag='260']">
1348 <z:index name="pl:w">
1349 <xslo:variable name="raw_heading">
1350 <xslo:for-each select="marc:subfield">
1351 <xslo:if test="position() &gt; 1">
1352 <xslo:value-of select="substring(' ', 1, 1)"/>
1353 </xslo:if>
1354 <xslo:value-of select="."/>
1355 </xslo:for-each>
1356 </xslo:variable>
1357 <xslo:value-of select="normalize-space($raw_heading)"/>
1358 </z:index>
1359 </xslo:template>
1360 <xslo:template mode="index_data_field" match="marc:datafield[@tag='300']">
1361 <z:index name="Extent:w Extent:p">
1362 <xslo:variable name="raw_heading">
1363 <xslo:for-each select="marc:subfield">
1364 <xslo:if test="position() &gt; 1">
1365 <xslo:value-of select="substring(' ', 1, 1)"/>
1366 </xslo:if>
1367 <xslo:value-of select="."/>
1368 </xslo:for-each>
1369 </xslo:variable>
1370 <xslo:value-of select="normalize-space($raw_heading)"/>
1371 </z:index>
1372 </xslo:template>
1373 <xslo:template mode="index_data_field" match="marc:datafield[@tag='440']">
1374 <z:index name="Title-series:w Title-series:p Title:w Title-series:w">
1375 <xslo:variable name="raw_heading">
1376 <xslo:for-each select="marc:subfield">
1377 <xslo:if test="position() &gt; 1">
1378 <xslo:value-of select="substring(' ', 1, 1)"/>
1379 </xslo:if>
1380 <xslo:value-of select="."/>
1381 </xslo:for-each>
1382 </xslo:variable>
1383 <xslo:value-of select="normalize-space($raw_heading)"/>
1384 </z:index>
1385 </xslo:template>
1386 <xslo:template mode="index_data_field" match="marc:datafield[@tag='490']">
1387 <z:index name="Title:w Title-series:w">
1388 <xslo:variable name="raw_heading">
1389 <xslo:for-each select="marc:subfield">
1390 <xslo:if test="position() &gt; 1">
1391 <xslo:value-of select="substring(' ', 1, 1)"/>
1392 </xslo:if>
1393 <xslo:value-of select="."/>
1394 </xslo:for-each>
1395 </xslo:variable>
1396 <xslo:value-of select="normalize-space($raw_heading)"/>
1397 </z:index>
1398 </xslo:template>
1399 <xslo:template mode="index_data_field" match="marc:datafield[@tag='502']">
1400 <z:index name="Material-type:w">
1401 <xslo:variable name="raw_heading">
1402 <xslo:for-each select="marc:subfield">
1403 <xslo:if test="position() &gt; 1">
1404 <xslo:value-of select="substring(' ', 1, 1)"/>
1405 </xslo:if>
1406 <xslo:value-of select="."/>
1407 </xslo:for-each>
1408 </xslo:variable>
1409 <xslo:value-of select="normalize-space($raw_heading)"/>
1410 </z:index>
1411 </xslo:template>
1412 <xslo:template mode="index_data_field" match="marc:datafield[@tag='505']">
1413 <z:index name="Note:w Note:p">
1414 <xslo:variable name="raw_heading">
1415 <xslo:for-each select="marc:subfield">
1416 <xslo:if test="position() &gt; 1">
1417 <xslo:value-of select="substring(' ', 1, 1)"/>
1418 </xslo:if>
1419 <xslo:value-of select="."/>
1420 </xslo:for-each>
1421 </xslo:variable>
1422 <xslo:value-of select="normalize-space($raw_heading)"/>
1423 </z:index>
1424 </xslo:template>
1425 <xslo:template mode="index_data_field" match="marc:datafield[@tag='510']">
1426 <z:index name="Indexed-by:w">
1427 <xslo:variable name="raw_heading">
1428 <xslo:for-each select="marc:subfield">
1429 <xslo:if test="position() &gt; 1">
1430 <xslo:value-of select="substring(' ', 1, 1)"/>
1431 </xslo:if>
1432 <xslo:value-of select="."/>
1433 </xslo:for-each>
1434 </xslo:variable>
1435 <xslo:value-of select="normalize-space($raw_heading)"/>
1436 </z:index>
1437 </xslo:template>
1438 <xslo:template mode="index_data_field" match="marc:datafield[@tag='520']">
1439 <z:index name="Abstract:w Abstract:p">
1440 <xslo:variable name="raw_heading">
1441 <xslo:for-each select="marc:subfield">
1442 <xslo:if test="position() &gt; 1">
1443 <xslo:value-of select="substring(' ', 1, 1)"/>
1444 </xslo:if>
1445 <xslo:value-of select="."/>
1446 </xslo:for-each>
1447 </xslo:variable>
1448 <xslo:value-of select="normalize-space($raw_heading)"/>
1449 </z:index>
1450 </xslo:template>
1451 <xslo:template mode="index_data_field" match="marc:datafield[@tag='600']">
1452 <z:index name="Name:w Personal-name:w Subject-name-personal:w Subject:w Subject:p">
1453 <xslo:variable name="raw_heading">
1454 <xslo:for-each select="marc:subfield">
1455 <xslo:if test="position() &gt; 1">
1456 <xslo:value-of select="substring(' ', 1, 1)"/>
1457 </xslo:if>
1458 <xslo:value-of select="."/>
1459 </xslo:for-each>
1460 </xslo:variable>
1461 <xslo:value-of select="normalize-space($raw_heading)"/>
1462 </z:index>
1463 </xslo:template>
1464 <xslo:template mode="index_data_field" match="marc:datafield[@tag='610']">
1465 <z:index name="Name:w Subject:w Corporate-name:w Subject:w Subject:p">
1466 <xslo:variable name="raw_heading">
1467 <xslo:for-each select="marc:subfield">
1468 <xslo:if test="position() &gt; 1">
1469 <xslo:value-of select="substring(' ', 1, 1)"/>
1470 </xslo:if>
1471 <xslo:value-of select="."/>
1472 </xslo:for-each>
1473 </xslo:variable>
1474 <xslo:value-of select="normalize-space($raw_heading)"/>
1475 </z:index>
1476 </xslo:template>
1477 <xslo:template mode="index_data_field" match="marc:datafield[@tag='611']">
1478 <z:index name="Conference-name:w Subject:w Subject:p">
1479 <xslo:variable name="raw_heading">
1480 <xslo:for-each select="marc:subfield">
1481 <xslo:if test="position() &gt; 1">
1482 <xslo:value-of select="substring(' ', 1, 1)"/>
1483 </xslo:if>
1484 <xslo:value-of select="."/>
1485 </xslo:for-each>
1486 </xslo:variable>
1487 <xslo:value-of select="normalize-space($raw_heading)"/>
1488 </z:index>
1489 <z:index name="Name:w Subject:w Subject:p">
1490 <xslo:variable name="raw_heading">
1491 <xslo:for-each select="marc:subfield">
1492 <xslo:if test="position() &gt; 1">
1493 <xslo:value-of select="substring(' ', 1, 1)"/>
1494 </xslo:if>
1495 <xslo:value-of select="."/>
1496 </xslo:for-each>
1497 </xslo:variable>
1498 <xslo:value-of select="normalize-space($raw_heading)"/>
1499 </z:index>
1500 </xslo:template>
1501 <xslo:template mode="index_data_field" match="marc:datafield[@tag='630']">
1502 <z:index name="Subject:w Subject:p">
1503 <xslo:variable name="raw_heading">
1504 <xslo:for-each select="marc:subfield">
1505 <xslo:if test="position() &gt; 1">
1506 <xslo:value-of select="substring(' ', 1, 1)"/>
1507 </xslo:if>
1508 <xslo:value-of select="."/>
1509 </xslo:for-each>
1510 </xslo:variable>
1511 <xslo:value-of select="normalize-space($raw_heading)"/>
1512 </z:index>
1513 </xslo:template>
1514 <xslo:template mode="index_data_field" match="marc:datafield[@tag='650']">
1515 <z:index name="Subject:w Subject:p">
1516 <xslo:variable name="raw_heading">
1517 <xslo:for-each select="marc:subfield">
1518 <xslo:if test="position() &gt; 1">
1519 <xslo:value-of select="substring(' ', 1, 1)"/>
1520 </xslo:if>
1521 <xslo:value-of select="."/>
1522 </xslo:for-each>
1523 </xslo:variable>
1524 <xslo:value-of select="normalize-space($raw_heading)"/>
1525 </z:index>
1526 </xslo:template>
1527 <xslo:template mode="index_data_field" match="marc:datafield[@tag='651']">
1528 <z:index name="Name-geographic:w Subject:w Subject:p">
1529 <xslo:variable name="raw_heading">
1530 <xslo:for-each select="marc:subfield">
1531 <xslo:if test="position() &gt; 1">
1532 <xslo:value-of select="substring(' ', 1, 1)"/>
1533 </xslo:if>
1534 <xslo:value-of select="."/>
1535 </xslo:for-each>
1536 </xslo:variable>
1537 <xslo:value-of select="normalize-space($raw_heading)"/>
1538 </z:index>
1539 </xslo:template>
1540 <xslo:template mode="index_data_field" match="marc:datafield[@tag='653']">
1541 <z:index name="Subject:w Subject:p">
1542 <xslo:variable name="raw_heading">
1543 <xslo:for-each select="marc:subfield">
1544 <xslo:if test="position() &gt; 1">
1545 <xslo:value-of select="substring(' ', 1, 1)"/>
1546 </xslo:if>
1547 <xslo:value-of select="."/>
1548 </xslo:for-each>
1549 </xslo:variable>
1550 <xslo:value-of select="normalize-space($raw_heading)"/>
1551 </z:index>
1552 </xslo:template>
1553 <xslo:template mode="index_data_field" match="marc:datafield[@tag='654']">
1554 <z:index name="Subject:w Subject:p">
1555 <xslo:variable name="raw_heading">
1556 <xslo:for-each select="marc:subfield">
1557 <xslo:if test="position() &gt; 1">
1558 <xslo:value-of select="substring(' ', 1, 1)"/>
1559 </xslo:if>
1560 <xslo:value-of select="."/>
1561 </xslo:for-each>
1562 </xslo:variable>
1563 <xslo:value-of select="normalize-space($raw_heading)"/>
1564 </z:index>
1565 </xslo:template>
1566 <xslo:template mode="index_data_field" match="marc:datafield[@tag='655']">
1567 <z:index name="Subject:w Subject:p">
1568 <xslo:variable name="raw_heading">
1569 <xslo:for-each select="marc:subfield">
1570 <xslo:if test="position() &gt; 1">
1571 <xslo:value-of select="substring(' ', 1, 1)"/>
1572 </xslo:if>
1573 <xslo:value-of select="."/>
1574 </xslo:for-each>
1575 </xslo:variable>
1576 <xslo:value-of select="normalize-space($raw_heading)"/>
1577 </z:index>
1578 </xslo:template>
1579 <xslo:template mode="index_data_field" match="marc:datafield[@tag='656']">
1580 <z:index name="Subject:w Subject:p">
1581 <xslo:variable name="raw_heading">
1582 <xslo:for-each select="marc:subfield">
1583 <xslo:if test="position() &gt; 1">
1584 <xslo:value-of select="substring(' ', 1, 1)"/>
1585 </xslo:if>
1586 <xslo:value-of select="."/>
1587 </xslo:for-each>
1588 </xslo:variable>
1589 <xslo:value-of select="normalize-space($raw_heading)"/>
1590 </z:index>
1591 </xslo:template>
1592 <xslo:template mode="index_data_field" match="marc:datafield[@tag='657']">
1593 <z:index name="Subject:w Subject:p">
1594 <xslo:variable name="raw_heading">
1595 <xslo:for-each select="marc:subfield">
1596 <xslo:if test="position() &gt; 1">
1597 <xslo:value-of select="substring(' ', 1, 1)"/>
1598 </xslo:if>
1599 <xslo:value-of select="."/>
1600 </xslo:for-each>
1601 </xslo:variable>
1602 <xslo:value-of select="normalize-space($raw_heading)"/>
1603 </z:index>
1604 </xslo:template>
1605 <xslo:template mode="index_data_field" match="marc:datafield[@tag='690']">
1606 <z:index name="Subject:w Subject:p">
1607 <xslo:variable name="raw_heading">
1608 <xslo:for-each select="marc:subfield">
1609 <xslo:if test="position() &gt; 1">
1610 <xslo:value-of select="substring(' ', 1, 1)"/>
1611 </xslo:if>
1612 <xslo:value-of select="."/>
1613 </xslo:for-each>
1614 </xslo:variable>
1615 <xslo:value-of select="normalize-space($raw_heading)"/>
1616 </z:index>
1617 </xslo:template>
1618 <xslo:template mode="index_data_field" match="marc:datafield[@tag='700']">
1619 <z:index name="Author:w Author-name-corporate:w Author-name-personal:w Name:w Editor:w Personal-name:w">
1620 <xslo:variable name="raw_heading">
1621 <xslo:for-each select="marc:subfield">
1622 <xslo:if test="position() &gt; 1">
1623 <xslo:value-of select="substring(' ', 1, 1)"/>
1624 </xslo:if>
1625 <xslo:value-of select="."/>
1626 </xslo:for-each>
1627 </xslo:variable>
1628 <xslo:value-of select="normalize-space($raw_heading)"/>
1629 </z:index>
1630 </xslo:template>
1631 <xslo:template mode="index_data_field" match="marc:datafield[@tag='710']">
1632 <z:index name="Author:w Corporate-name:w">
1633 <xslo:variable name="raw_heading">
1634 <xslo:for-each select="marc:subfield">
1635 <xslo:if test="position() &gt; 1">
1636 <xslo:value-of select="substring(' ', 1, 1)"/>
1637 </xslo:if>
1638 <xslo:value-of select="."/>
1639 </xslo:for-each>
1640 </xslo:variable>
1641 <xslo:value-of select="normalize-space($raw_heading)"/>
1642 </z:index>
1643 <z:index name="Author:w Name:w">
1644 <xslo:variable name="raw_heading">
1645 <xslo:for-each select="marc:subfield">
1646 <xslo:if test="position() &gt; 1">
1647 <xslo:value-of select="substring(' ', 1, 1)"/>
1648 </xslo:if>
1649 <xslo:value-of select="."/>
1650 </xslo:for-each>
1651 </xslo:variable>
1652 <xslo:value-of select="normalize-space($raw_heading)"/>
1653 </z:index>
1654 </xslo:template>
1655 <xslo:template mode="index_data_field" match="marc:datafield[@tag='711']">
1656 <z:index name="Author-name-corporate:w Name:w Conference-name:w">
1657 <xslo:variable name="raw_heading">
1658 <xslo:for-each select="marc:subfield">
1659 <xslo:if test="position() &gt; 1">
1660 <xslo:value-of select="substring(' ', 1, 1)"/>
1661 </xslo:if>
1662 <xslo:value-of select="."/>
1663 </xslo:for-each>
1664 </xslo:variable>
1665 <xslo:value-of select="normalize-space($raw_heading)"/>
1666 </z:index>
1667 </xslo:template>
1668 <xslo:template mode="index_data_field" match="marc:datafield[@tag='730']">
1669 <z:index name="Title:w Title-uniform:w">
1670 <xslo:variable name="raw_heading">
1671 <xslo:for-each select="marc:subfield">
1672 <xslo:if test="position() &gt; 1">
1673 <xslo:value-of select="substring(' ', 1, 1)"/>
1674 </xslo:if>
1675 <xslo:value-of select="."/>
1676 </xslo:for-each>
1677 </xslo:variable>
1678 <xslo:value-of select="normalize-space($raw_heading)"/>
1679 </z:index>
1680 </xslo:template>
1681 <xslo:template mode="index_data_field" match="marc:datafield[@tag='740']">
1682 <z:index name="Title:w Title-other-variant:w">
1683 <xslo:variable name="raw_heading">
1684 <xslo:for-each select="marc:subfield">
1685 <xslo:if test="position() &gt; 1">
1686 <xslo:value-of select="substring(' ', 1, 1)"/>
1687 </xslo:if>
1688 <xslo:value-of select="."/>
1689 </xslo:for-each>
1690 </xslo:variable>
1691 <xslo:value-of select="normalize-space($raw_heading)"/>
1692 </z:index>
1693 </xslo:template>
1694 <xslo:template mode="index_data_field" match="marc:datafield[@tag='780']">
1695 <z:index name="Title:w Title-former:w Related-periodical:w">
1696 <xslo:variable name="raw_heading">
1697 <xslo:for-each select="marc:subfield">
1698 <xslo:if test="position() &gt; 1">
1699 <xslo:value-of select="substring(' ', 1, 1)"/>
1700 </xslo:if>
1701 <xslo:value-of select="."/>
1702 </xslo:for-each>
1703 </xslo:variable>
1704 <xslo:value-of select="normalize-space($raw_heading)"/>
1705 </z:index>
1706 </xslo:template>
1707 <xslo:template mode="index_data_field" match="marc:datafield[@tag='785']">
1708 <z:index name="Related-periodical:w">
1709 <xslo:variable name="raw_heading">
1710 <xslo:for-each select="marc:subfield">
1711 <xslo:if test="position() &gt; 1">
1712 <xslo:value-of select="substring(' ', 1, 1)"/>
1713 </xslo:if>
1714 <xslo:value-of select="."/>
1715 </xslo:for-each>
1716 </xslo:variable>
1717 <xslo:value-of select="normalize-space($raw_heading)"/>
1718 </z:index>
1719 </xslo:template>
1720 <xslo:template mode="index_data_field" match="marc:datafield[@tag='800']">
1721 <z:index name="Author:w Author-name-personal:w Name:w Personal-name:w">
1722 <xslo:variable name="raw_heading">
1723 <xslo:for-each select="marc:subfield">
1724 <xslo:if test="position() &gt; 1">
1725 <xslo:value-of select="substring(' ', 1, 1)"/>
1726 </xslo:if>
1727 <xslo:value-of select="."/>
1728 </xslo:for-each>
1729 </xslo:variable>
1730 <xslo:value-of select="normalize-space($raw_heading)"/>
1731 </z:index>
1732 </xslo:template>
1733 <xslo:template mode="index_data_field" match="marc:datafield[@tag='810']">
1734 <z:index name="Author:w Corporate-name:w Author-name-corporate:w Name:w">
1735 <xslo:variable name="raw_heading">
1736 <xslo:for-each select="marc:subfield">
1737 <xslo:if test="position() &gt; 1">
1738 <xslo:value-of select="substring(' ', 1, 1)"/>
1739 </xslo:if>
1740 <xslo:value-of select="."/>
1741 </xslo:for-each>
1742 </xslo:variable>
1743 <xslo:value-of select="normalize-space($raw_heading)"/>
1744 </z:index>
1745 </xslo:template>
1746 <xslo:template mode="index_data_field" match="marc:datafield[@tag='811']">
1747 <z:index name="Author:w Author-name-corporate:w Name:w Conference-name:w">
1748 <xslo:variable name="raw_heading">
1749 <xslo:for-each select="marc:subfield">
1750 <xslo:if test="position() &gt; 1">
1751 <xslo:value-of select="substring(' ', 1, 1)"/>
1752 </xslo:if>
1753 <xslo:value-of select="."/>
1754 </xslo:for-each>
1755 </xslo:variable>
1756 <xslo:value-of select="normalize-space($raw_heading)"/>
1757 </z:index>
1758 </xslo:template>
1759 <xslo:template mode="index_data_field" match="marc:datafield[@tag='830']">
1760 <z:index name="Title:w Title-series:w">
1761 <xslo:variable name="raw_heading">
1762 <xslo:for-each select="marc:subfield">
1763 <xslo:if test="position() &gt; 1">
1764 <xslo:value-of select="substring(' ', 1, 1)"/>
1765 </xslo:if>
1766 <xslo:value-of select="."/>
1767 </xslo:for-each>
1768 </xslo:variable>
1769 <xslo:value-of select="normalize-space($raw_heading)"/>
1770 </z:index>
1771 </xslo:template>
1772 <xslo:template mode="index_all" match="text()">
1773 <z:index name="Any:w Any:p">
1774 <xslo:value-of select="."/>
1775 </z:index>
1776 </xslo:template>
1777 <xslo:template name="chopPunctuation">
1778 <xslo:param name="chopString"/>
1779 <xslo:variable name="length" select="string-length($chopString)"/>
1780 <xslo:choose>
1781 <xslo:when test="$length=0"/>
1782 <xslo:when test="contains('-,.:=;!%/', substring($chopString,$length,1))">
1783 <xslo:call-template name="chopPunctuation">
1784 <xslo:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>
1785 </xslo:call-template>
1786 </xslo:when>
1787 <xslo:when test="not($chopString)"/>
1788 <xslo:otherwise>
1789 <xslo:value-of select="$chopString"/>
1790 </xslo:otherwise>
1791 </xslo:choose>
1792 <xslo:text/>
1793 </xslo:template>
1794 </xslo:stylesheet>