1 <?xml version="1.0" encoding="UTF-8"?>
2 <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">
3 <xslo:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
4 <xslo:template match="text()"/>
5 <xslo:template match="text()" mode="index_subfields"/>
6 <xslo:template match="text()" mode="index_heading"/>
7 <xslo:template match="text()" mode="index_match_heading"/>
8 <xslo:template match="text()" mode="index_subject_thesaurus"/>
9 <xslo:template match="/">
10 <xslo:if test="marc:collection">
12 <xslo:apply-templates select="marc:collection/marc:record"/>
15 <xslo:if test="marc:record">
16 <xslo:apply-templates select="marc:record"/>
19 <xslo:template match="marc:record">
20 <xslo:variable name="controlField001" select="normalize-space(marc:controlfield[@tag='001'])"/>
21 <z:record type="update">
22 <xslo:attribute name="z:id">
23 <xslo:value-of select="$controlField001"/>
25 <xslo:apply-templates/>
26 <xslo:apply-templates mode="index_subfields"/>
27 <xslo:apply-templates mode="index_heading"/>
28 <xslo:apply-templates mode="index_match_heading"/>
29 <xslo:apply-templates mode="index_subject_thesaurus"/>
32 <xslo:template match="marc:leader">
33 <z:index name="Record-status:w">
34 <xslo:value-of select="substring(., 6, 1)"/>
36 <z:index name="Encoding-level:w">
37 <xslo:value-of select="substring(., 18, 1)"/>
40 <xslo:template match="marc:controlfield[@tag='001']">
41 <z:index name="Local-Number:w">
42 <xslo:value-of select="."/>
45 <xslo:template match="marc:controlfield[@tag='008']">
46 <z:index name="Kind-of-record:w">
47 <xslo:value-of select="substring(., 10, 1)"/>
49 <z:index name="Descriptive-cataloging-rules:w">
50 <xslo:value-of select="substring(., 11, 1)"/>
52 <z:index name="Heading-use-main-or-added-entry:w">
53 <xslo:value-of select="substring(., 15, 1)"/>
55 <z:index name="Heading-use-subject-added-entry:w">
56 <xslo:value-of select="substring(., 16, 1)"/>
58 <z:index name="Heading-use-series-added-entry:w">
59 <xslo:value-of select="substring(., 17, 1)"/>
62 <xslo:template mode="index_subfields" match="marc:datafield[@tag='100']">
63 <xslo:for-each select="marc:subfield">
64 <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)">
65 <z:index name="Personal-name:w Personal-name:p Personal-name:s">
66 <xslo:value-of select="."/>
71 <xslo:template mode="index_subfields" match="marc:datafield[@tag='110']">
72 <xslo:for-each select="marc:subfield">
73 <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)">
74 <z:index name="Corporate-name:w Corporate-name:p">
75 <xslo:value-of select="."/>
80 <xslo:template mode="index_subfields" match="marc:datafield[@tag='111']">
81 <xslo:for-each select="marc:subfield">
82 <xslo:if test="contains('acdefghjklnpqstvxyz', @code)">
83 <z:index name="Meeting-name:w Meeting-name:p">
84 <xslo:value-of select="."/>
89 <xslo:template mode="index_subfields" match="marc:datafield[@tag='130']">
90 <xslo:for-each select="marc:subfield">
91 <xslo:if test="contains('adfghklmnoprstvxyz', @code)">
92 <z:index name="Title-uniform:w Title-uniform:p">
93 <xslo:value-of select="."/>
98 <xslo:template mode="index_subfields" match="marc:datafield[@tag='148']">
99 <xslo:for-each select="marc:subfield">
100 <xslo:if test="contains('avxyz', @code)">
101 <z:index name="Chronological-term:w Chronological-term:p">
102 <xslo:value-of select="."/>
107 <xslo:template mode="index_subfields" match="marc:datafield[@tag='150']">
108 <xslo:for-each select="marc:subfield">
109 <xslo:if test="contains('abvxyz', @code)">
110 <z:index name="Subject-topical:w Subject-topical:p">
111 <xslo:value-of select="."/>
116 <xslo:template mode="index_subfields" match="marc:datafield[@tag='151']">
117 <xslo:for-each select="marc:subfield">
118 <xslo:if test="contains('avxyz', @code)">
119 <z:index name="Name-geographic:w Name-geographic:p">
120 <xslo:value-of select="."/>
125 <xslo:template mode="index_subfields" match="marc:datafield[@tag='155']">
126 <xslo:for-each select="marc:subfield">
127 <xslo:if test="contains('avxyz', @code)">
128 <z:index name="Term-genre-form:w Term-genre-form:p">
129 <xslo:value-of select="."/>
134 <xslo:template mode="index_subfields" match="marc:datafield[@tag='942']">
135 <xslo:for-each select="marc:subfield">
136 <xslo:if test="contains('a', @code)">
137 <z:index name="authtype:w">
138 <xslo:value-of select="."/>
143 <xslo:template mode="index_heading" match="marc:datafield[@tag='100']">
144 <z:index name="Personal-name-heading:w Personal-name-heading:p Personal-name-heading:s Heading:w Heading:p Heading:s">
145 <xslo:variable name="raw_heading">
146 <xslo:for-each select="marc:subfield">
147 <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Personal-name-heading:w Personal-name-heading:p Personal-name-heading:s Heading:w Heading:p Heading:s">
148 <xslo:if test="position() > 1">
150 <xslo:when test="contains('vxyz', @code)">
151 <xslo:text>--</xslo:text>
154 <xslo:value-of select="substring(' ', 1, 1)"/>
158 <xslo:value-of select="."/>
162 <xslo:value-of select="normalize-space($raw_heading)"/>
164 <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
165 <xslo:variable name="raw_heading">
166 <xslo:for-each select="marc:subfield">
167 <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
168 <xslo:if test="position() > 1">
170 <xslo:when test="contains('', @code)">
171 <xslo:text>--</xslo:text>
174 <xslo:value-of select="substring(' ', 1, 1)"/>
178 <xslo:value-of select="."/>
182 <xslo:value-of select="normalize-space($raw_heading)"/>
185 <xslo:template mode="index_heading" match="marc:datafield[@tag='400']">
186 <z:index name="Personal-name-see-from:w Personal-name-see-from:p Personal-name-see-from:s See-from:w See-from:p See-from:s">
187 <xslo:variable name="raw_heading">
188 <xslo:for-each select="marc:subfield">
189 <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Personal-name-see-from:w Personal-name-see-from:p Personal-name-see-from:s See-from:w See-from:p See-from:s">
190 <xslo:if test="position() > 1">
192 <xslo:when test="contains('vxyz', @code)">
193 <xslo:text>--</xslo:text>
196 <xslo:value-of select="substring(' ', 1, 1)"/>
200 <xslo:value-of select="."/>
204 <xslo:value-of select="normalize-space($raw_heading)"/>
207 <xslo:template mode="index_heading" match="marc:datafield[@tag='500']">
208 <z:index name="Personal-name-see-also-from:w Personal-name-see-also-from:p Personal-name-see-also-from:s See-also-from:w See-also-from:p See-also-from:s">
209 <xslo:variable name="raw_heading">
210 <xslo:for-each select="marc:subfield">
211 <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Personal-name-see-also-from:w Personal-name-see-also-from:p Personal-name-see-also-from:s See-also-from:w See-also-from:p See-also-from:s">
212 <xslo:if test="position() > 1">
214 <xslo:when test="contains('vxyz', @code)">
215 <xslo:text>--</xslo:text>
218 <xslo:value-of select="substring(' ', 1, 1)"/>
222 <xslo:value-of select="."/>
226 <xslo:value-of select="normalize-space($raw_heading)"/>
229 <xslo:template mode="index_heading" match="marc:datafield[@tag='110']">
230 <z:index name="Corporate-name-heading:w Corporate-name-heading:p Corporate-name-heading:s Heading:w Heading:p Heading:s">
231 <xslo:variable name="raw_heading">
232 <xslo:for-each select="marc:subfield">
233 <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Corporate-name-heading:w Corporate-name-heading:p Corporate-name-heading:s Heading:w Heading:p Heading:s">
234 <xslo:if test="position() > 1">
236 <xslo:when test="contains('vxyz', @code)">
237 <xslo:text>--</xslo:text>
240 <xslo:value-of select="substring(' ', 1, 1)"/>
244 <xslo:value-of select="."/>
248 <xslo:value-of select="normalize-space($raw_heading)"/>
250 <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
251 <xslo:variable name="raw_heading">
252 <xslo:for-each select="marc:subfield">
253 <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
254 <xslo:if test="position() > 1">
256 <xslo:when test="contains('', @code)">
257 <xslo:text>--</xslo:text>
260 <xslo:value-of select="substring(' ', 1, 1)"/>
264 <xslo:value-of select="."/>
268 <xslo:value-of select="normalize-space($raw_heading)"/>
271 <xslo:template mode="index_heading" match="marc:datafield[@tag='410']">
272 <z:index name="Corporate-name-see-from:w Corporate-name-see-from:p Corporate-name-see-from:s See-from:w See-from:p See-from:s">
273 <xslo:variable name="raw_heading">
274 <xslo:for-each select="marc:subfield">
275 <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Corporate-name-see-from:w Corporate-name-see-from:p Corporate-name-see-from:s See-from:w See-from:p See-from:s">
276 <xslo:if test="position() > 1">
278 <xslo:when test="contains('vxyz', @code)">
279 <xslo:text>--</xslo:text>
282 <xslo:value-of select="substring(' ', 1, 1)"/>
286 <xslo:value-of select="."/>
290 <xslo:value-of select="normalize-space($raw_heading)"/>
293 <xslo:template mode="index_heading" match="marc:datafield[@tag='510']">
294 <z:index name="Corporate-name-see-also-from:w Corporate-name-see-also-from:p Corporate-name-see-also-from:s See-also-from:w See-also-from:p See-also-from:s">
295 <xslo:variable name="raw_heading">
296 <xslo:for-each select="marc:subfield">
297 <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Corporate-name-see-also-from:w Corporate-name-see-also-from:p Corporate-name-see-also-from:s See-also-from:w See-also-from:p See-also-from:s">
298 <xslo:if test="position() > 1">
300 <xslo:when test="contains('vxyz', @code)">
301 <xslo:text>--</xslo:text>
304 <xslo:value-of select="substring(' ', 1, 1)"/>
308 <xslo:value-of select="."/>
312 <xslo:value-of select="normalize-space($raw_heading)"/>
315 <xslo:template mode="index_heading" match="marc:datafield[@tag='111']">
316 <z:index name="Meeting-name-heading:w Meeting-name-heading:p Meeting-name-heading:s Heading:w Heading:p Heading:s">
317 <xslo:variable name="raw_heading">
318 <xslo:for-each select="marc:subfield">
319 <xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Meeting-name-heading:w Meeting-name-heading:p Meeting-name-heading:s Heading:w Heading:p Heading:s">
320 <xslo:if test="position() > 1">
322 <xslo:when test="contains('vxyz', @code)">
323 <xslo:text>--</xslo:text>
326 <xslo:value-of select="substring(' ', 1, 1)"/>
330 <xslo:value-of select="."/>
334 <xslo:value-of select="normalize-space($raw_heading)"/>
336 <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
337 <xslo:variable name="raw_heading">
338 <xslo:for-each select="marc:subfield">
339 <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
340 <xslo:if test="position() > 1">
342 <xslo:when test="contains('', @code)">
343 <xslo:text>--</xslo:text>
346 <xslo:value-of select="substring(' ', 1, 1)"/>
350 <xslo:value-of select="."/>
354 <xslo:value-of select="normalize-space($raw_heading)"/>
357 <xslo:template mode="index_heading" match="marc:datafield[@tag='411']">
358 <z:index name="Meeting-name-see-from:w Meeting-name-see-from:p Meeting-name-see-from:s See-from:w See-from:p See-from:s">
359 <xslo:variable name="raw_heading">
360 <xslo:for-each select="marc:subfield">
361 <xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Meeting-name-see-from:w Meeting-name-see-from:p Meeting-name-see-from:s See-from:w See-from:p See-from:s">
362 <xslo:if test="position() > 1">
364 <xslo:when test="contains('vxyz', @code)">
365 <xslo:text>--</xslo:text>
368 <xslo:value-of select="substring(' ', 1, 1)"/>
372 <xslo:value-of select="."/>
376 <xslo:value-of select="normalize-space($raw_heading)"/>
379 <xslo:template mode="index_heading" match="marc:datafield[@tag='511']">
380 <z:index name="Meeting-name-see-also-from:w Meeting-name-see-also-from:p Meeting-name-see-also-from:s See-also-from:w See-also-from:p See-also-from:s">
381 <xslo:variable name="raw_heading">
382 <xslo:for-each select="marc:subfield">
383 <xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Meeting-name-see-also-from:w Meeting-name-see-also-from:p Meeting-name-see-also-from:s See-also-from:w See-also-from:p See-also-from:s">
384 <xslo:if test="position() > 1">
386 <xslo:when test="contains('vxyz', @code)">
387 <xslo:text>--</xslo:text>
390 <xslo:value-of select="substring(' ', 1, 1)"/>
394 <xslo:value-of select="."/>
398 <xslo:value-of select="normalize-space($raw_heading)"/>
401 <xslo:template mode="index_heading" match="marc:datafield[@tag='130']">
402 <z:index name="Title-uniform-heading:w Title-uniform-heading:p Title-uniform-heading:s Heading:w Heading:p Heading:s">
403 <xslo:variable name="raw_heading">
404 <xslo:for-each select="marc:subfield">
405 <xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Title-uniform-heading:w Title-uniform-heading:p Title-uniform-heading:s Heading:w Heading:p Heading:s">
406 <xslo:if test="position() > 1">
408 <xslo:when test="contains('vxyz', @code)">
409 <xslo:text>--</xslo:text>
412 <xslo:value-of select="substring(' ', 1, 1)"/>
416 <xslo:value-of select="."/>
420 <xslo:value-of select="normalize-space($raw_heading)"/>
422 <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
423 <xslo:variable name="raw_heading">
424 <xslo:for-each select="marc:subfield">
425 <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
426 <xslo:if test="position() > 1">
428 <xslo:when test="contains('', @code)">
429 <xslo:text>--</xslo:text>
432 <xslo:value-of select="substring(' ', 1, 1)"/>
436 <xslo:value-of select="."/>
440 <xslo:value-of select="normalize-space($raw_heading)"/>
443 <xslo:template mode="index_heading" match="marc:datafield[@tag='430']">
444 <z:index name="Title-uniform-see-from:w Title-uniform-see-from:p Title-uniform-see-from:s See-from:w See-from:p See-from:s">
445 <xslo:variable name="raw_heading">
446 <xslo:for-each select="marc:subfield">
447 <xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Title-uniform-see-from:w Title-uniform-see-from:p Title-uniform-see-from:s See-from:w See-from:p See-from:s">
448 <xslo:if test="position() > 1">
450 <xslo:when test="contains('vxyz', @code)">
451 <xslo:text>--</xslo:text>
454 <xslo:value-of select="substring(' ', 1, 1)"/>
458 <xslo:value-of select="."/>
462 <xslo:value-of select="normalize-space($raw_heading)"/>
465 <xslo:template mode="index_heading" match="marc:datafield[@tag='530']">
466 <z:index name="Title-uniform-see-also-from:w Title-uniform-see-also-from:p Title-uniform-see-also-from:s See-also-from:w See-also-from:p See-also-from:s">
467 <xslo:variable name="raw_heading">
468 <xslo:for-each select="marc:subfield">
469 <xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Title-uniform-see-also-from:w Title-uniform-see-also-from:p Title-uniform-see-also-from:s See-also-from:w See-also-from:p See-also-from:s">
470 <xslo:if test="position() > 1">
472 <xslo:when test="contains('vxyz', @code)">
473 <xslo:text>--</xslo:text>
476 <xslo:value-of select="substring(' ', 1, 1)"/>
480 <xslo:value-of select="."/>
484 <xslo:value-of select="normalize-space($raw_heading)"/>
487 <xslo:template mode="index_heading" match="marc:datafield[@tag='148']">
488 <z:index name="Chronological-term-heading:w Chronological-term-heading:p Chronological-term-heading:s Heading:w Heading:p Heading:s">
489 <xslo:variable name="raw_heading">
490 <xslo:for-each select="marc:subfield">
491 <xslo:if test="contains('avxyz', @code)" name="Chronological-term-heading:w Chronological-term-heading:p Chronological-term-heading:s Heading:w Heading:p Heading:s">
492 <xslo:if test="position() > 1">
494 <xslo:when test="contains('vxyz', @code)">
495 <xslo:text>--</xslo:text>
498 <xslo:value-of select="substring(' ', 1, 1)"/>
502 <xslo:value-of select="."/>
506 <xslo:value-of select="normalize-space($raw_heading)"/>
508 <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
509 <xslo:variable name="raw_heading">
510 <xslo:for-each select="marc:subfield">
511 <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
512 <xslo:if test="position() > 1">
514 <xslo:when test="contains('', @code)">
515 <xslo:text>--</xslo:text>
518 <xslo:value-of select="substring(' ', 1, 1)"/>
522 <xslo:value-of select="."/>
526 <xslo:value-of select="normalize-space($raw_heading)"/>
529 <xslo:template mode="index_heading" match="marc:datafield[@tag='448']">
530 <z:index name="Chronological-term-see-from:w Chronological-term-see-from:p Chronological-term-see-from:s See-from:w See-from:p See-from:s">
531 <xslo:variable name="raw_heading">
532 <xslo:for-each select="marc:subfield">
533 <xslo:if test="contains('avxyz', @code)" name="Chronological-term-see-from:w Chronological-term-see-from:p Chronological-term-see-from:s See-from:w See-from:p See-from:s">
534 <xslo:if test="position() > 1">
536 <xslo:when test="contains('vxyz', @code)">
537 <xslo:text>--</xslo:text>
540 <xslo:value-of select="substring(' ', 1, 1)"/>
544 <xslo:value-of select="."/>
548 <xslo:value-of select="normalize-space($raw_heading)"/>
551 <xslo:template mode="index_heading" match="marc:datafield[@tag='548']">
552 <z:index name="Chronological-term-see-also-from:w Chronological-term-see-also-from:p Chronological-term-see-also-from:s See-also-from:w See-also-from:p See-also-from:s">
553 <xslo:variable name="raw_heading">
554 <xslo:for-each select="marc:subfield">
555 <xslo:if test="contains('avxyz', @code)" name="Chronological-term-see-also-from:w Chronological-term-see-also-from:p Chronological-term-see-also-from:s See-also-from:w See-also-from:p See-also-from:s">
556 <xslo:if test="position() > 1">
558 <xslo:when test="contains('vxyz', @code)">
559 <xslo:text>--</xslo:text>
562 <xslo:value-of select="substring(' ', 1, 1)"/>
566 <xslo:value-of select="."/>
570 <xslo:value-of select="normalize-space($raw_heading)"/>
573 <xslo:template mode="index_heading" match="marc:datafield[@tag='150']">
574 <z:index name="Subject-topical-heading:w Subject-topical-heading:p Subject-topical-heading:s Heading:w Heading:p Heading:s">
575 <xslo:variable name="raw_heading">
576 <xslo:for-each select="marc:subfield">
577 <xslo:if test="contains('abvxyz', @code)" name="Subject-topical-heading:w Subject-topical-heading:p Subject-topical-heading:s Heading:w Heading:p Heading:s">
578 <xslo:if test="position() > 1">
580 <xslo:when test="contains('vxyz', @code)">
581 <xslo:text>--</xslo:text>
584 <xslo:value-of select="substring(' ', 1, 1)"/>
588 <xslo:value-of select="."/>
592 <xslo:value-of select="normalize-space($raw_heading)"/>
594 <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
595 <xslo:variable name="raw_heading">
596 <xslo:for-each select="marc:subfield">
597 <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
598 <xslo:if test="position() > 1">
600 <xslo:when test="contains('', @code)">
601 <xslo:text>--</xslo:text>
604 <xslo:value-of select="substring(' ', 1, 1)"/>
608 <xslo:value-of select="."/>
612 <xslo:value-of select="normalize-space($raw_heading)"/>
615 <xslo:template mode="index_heading" match="marc:datafield[@tag='450']">
616 <z:index name="Subject-topical-see-from:w Subject-topical-see-from:p Subject-topical-see-from:s See-from:w See-from:p See-from:s">
617 <xslo:variable name="raw_heading">
618 <xslo:for-each select="marc:subfield">
619 <xslo:if test="contains('abvxyz', @code)" name="Subject-topical-see-from:w Subject-topical-see-from:p Subject-topical-see-from:s See-from:w See-from:p See-from:s">
620 <xslo:if test="position() > 1">
622 <xslo:when test="contains('vxyz', @code)">
623 <xslo:text>--</xslo:text>
626 <xslo:value-of select="substring(' ', 1, 1)"/>
630 <xslo:value-of select="."/>
634 <xslo:value-of select="normalize-space($raw_heading)"/>
637 <xslo:template mode="index_heading" match="marc:datafield[@tag='550']">
638 <z:index name="Subject-topical-see-also-from:w Subject-topical-see-also-from:p Subject-topical-see-also-from:s See-also-from:w See-also-from:p See-also-from:s">
639 <xslo:variable name="raw_heading">
640 <xslo:for-each select="marc:subfield">
641 <xslo:if test="contains('abvxyz', @code)" name="Subject-topical-see-also-from:w Subject-topical-see-also-from:p Subject-topical-see-also-from:s See-also-from:w See-also-from:p See-also-from:s">
642 <xslo:if test="position() > 1">
644 <xslo:when test="contains('vxyz', @code)">
645 <xslo:text>--</xslo:text>
648 <xslo:value-of select="substring(' ', 1, 1)"/>
652 <xslo:value-of select="."/>
656 <xslo:value-of select="normalize-space($raw_heading)"/>
659 <xslo:template mode="index_heading" match="marc:datafield[@tag='151']">
660 <z:index name="Name-geographic-heading:w Name-geographic-heading:p Name-geographic-heading:s Heading:w Heading:p Heading:s">
661 <xslo:variable name="raw_heading">
662 <xslo:for-each select="marc:subfield">
663 <xslo:if test="contains('avxyz', @code)" name="Name-geographic-heading:w Name-geographic-heading:p Name-geographic-heading:s Heading:w Heading:p Heading:s">
664 <xslo:if test="position() > 1">
666 <xslo:when test="contains('vxyz', @code)">
667 <xslo:text>--</xslo:text>
670 <xslo:value-of select="substring(' ', 1, 1)"/>
674 <xslo:value-of select="."/>
678 <xslo:value-of select="normalize-space($raw_heading)"/>
680 <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
681 <xslo:variable name="raw_heading">
682 <xslo:for-each select="marc:subfield">
683 <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
684 <xslo:if test="position() > 1">
686 <xslo:when test="contains('', @code)">
687 <xslo:text>--</xslo:text>
690 <xslo:value-of select="substring(' ', 1, 1)"/>
694 <xslo:value-of select="."/>
698 <xslo:value-of select="normalize-space($raw_heading)"/>
701 <xslo:template mode="index_heading" match="marc:datafield[@tag='451']">
702 <z:index name="Name-geographic-see-from:w Name-geographic-see-from:p Name-geographic-see-from:s See-from:w See-from:p See-from:s">
703 <xslo:variable name="raw_heading">
704 <xslo:for-each select="marc:subfield">
705 <xslo:if test="contains('avxyz', @code)" name="Name-geographic-see-from:w Name-geographic-see-from:p Name-geographic-see-from:s See-from:w See-from:p See-from:s">
706 <xslo:if test="position() > 1">
708 <xslo:when test="contains('vxyz', @code)">
709 <xslo:text>--</xslo:text>
712 <xslo:value-of select="substring(' ', 1, 1)"/>
716 <xslo:value-of select="."/>
720 <xslo:value-of select="normalize-space($raw_heading)"/>
723 <xslo:template mode="index_heading" match="marc:datafield[@tag='551']">
724 <z:index name="Name-geographic-see-also-from:w Name-geographic-see-also-from:p Name-geographic-see-also-from:s See-also-from:w See-also-from:p See-also-from:s">
725 <xslo:variable name="raw_heading">
726 <xslo:for-each select="marc:subfield">
727 <xslo:if test="contains('avxyz', @code)" name="Name-geographic-see-also-from:w Name-geographic-see-also-from:p Name-geographic-see-also-from:s See-also-from:w See-also-from:p See-also-from:s">
728 <xslo:if test="position() > 1">
730 <xslo:when test="contains('vxyz', @code)">
731 <xslo:text>--</xslo:text>
734 <xslo:value-of select="substring(' ', 1, 1)"/>
738 <xslo:value-of select="."/>
742 <xslo:value-of select="normalize-space($raw_heading)"/>
745 <xslo:template mode="index_heading" match="marc:datafield[@tag='155']">
746 <z:index name="Term-genre-form-heading:w Term-genre-form-heading:p Term-genre-form-heading:s Heading:w Heading:p Heading:s">
747 <xslo:variable name="raw_heading">
748 <xslo:for-each select="marc:subfield">
749 <xslo:if test="contains('avxyz', @code)" name="Term-genre-form-heading:w Term-genre-form-heading:p Term-genre-form-heading:s Heading:w Heading:p Heading:s">
750 <xslo:if test="position() > 1">
752 <xslo:when test="contains('vxyz', @code)">
753 <xslo:text>--</xslo:text>
756 <xslo:value-of select="substring(' ', 1, 1)"/>
760 <xslo:value-of select="."/>
764 <xslo:value-of select="normalize-space($raw_heading)"/>
766 <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
767 <xslo:variable name="raw_heading">
768 <xslo:for-each select="marc:subfield">
769 <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
770 <xslo:if test="position() > 1">
772 <xslo:when test="contains('', @code)">
773 <xslo:text>--</xslo:text>
776 <xslo:value-of select="substring(' ', 1, 1)"/>
780 <xslo:value-of select="."/>
784 <xslo:value-of select="normalize-space($raw_heading)"/>
787 <xslo:template mode="index_heading" match="marc:datafield[@tag='455']">
788 <z:index name="Term-genre-form-see-from:w Term-genre-form-see-from:p Term-genre-form-see-from:s See-from:w See-from:p See-from:s">
789 <xslo:variable name="raw_heading">
790 <xslo:for-each select="marc:subfield">
791 <xslo:if test="contains('avxyz', @code)" name="Term-genre-form-see-from:w Term-genre-form-see-from:p Term-genre-form-see-from:s See-from:w See-from:p See-from:s">
792 <xslo:if test="position() > 1">
794 <xslo:when test="contains('vxyz', @code)">
795 <xslo:text>--</xslo:text>
798 <xslo:value-of select="substring(' ', 1, 1)"/>
802 <xslo:value-of select="."/>
806 <xslo:value-of select="normalize-space($raw_heading)"/>
809 <xslo:template mode="index_heading" match="marc:datafield[@tag='555']">
810 <z:index name="Term-genre-form-see-also-from:w Term-genre-form-see-also-from:p Term-genre-form-see-also-from:s See-also-from:w See-also-from:p See-also-from:s">
811 <xslo:variable name="raw_heading">
812 <xslo:for-each select="marc:subfield">
813 <xslo:if test="contains('avxyz', @code)" name="Term-genre-form-see-also-from:w Term-genre-form-see-also-from:p Term-genre-form-see-also-from:s See-also-from:w See-also-from:p See-also-from:s">
814 <xslo:if test="position() > 1">
816 <xslo:when test="contains('vxyz', @code)">
817 <xslo:text>--</xslo:text>
820 <xslo:value-of select="substring(' ', 1, 1)"/>
824 <xslo:value-of select="."/>
828 <xslo:value-of select="normalize-space($raw_heading)"/>
831 <xslo:template mode="index_heading" match="marc:datafield[@tag='180']">
832 <z:index name="General-subdivision:w General-subdivision:p General-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
833 <xslo:variable name="raw_heading">
834 <xslo:for-each select="marc:subfield">
835 <xslo:if test="contains('vxyz', @code)" name="General-subdivision:w General-subdivision:p General-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
836 <xslo:if test="position() > 1">
838 <xslo:when test="contains('vxyz', @code)">
839 <xslo:text>--</xslo:text>
842 <xslo:value-of select="substring(' ', 1, 1)"/>
846 <xslo:value-of select="."/>
850 <xslo:value-of select="normalize-space($raw_heading)"/>
853 <xslo:template mode="index_heading" match="marc:datafield[@tag='480']">
854 <z:index name="General-subdivision-see-from:w General-subdivision-see-from:p General-subdivision-see-from:s Subdivision-see-from:w Subdivision-see-from:p Subdivision-see-from:s">
855 <xslo:variable name="raw_heading">
856 <xslo:for-each select="marc:subfield">
857 <xslo:if test="contains('vxyz', @code)" name="General-subdivision-see-from:w General-subdivision-see-from:p General-subdivision-see-from:s Subdivision-see-from:w Subdivision-see-from:p Subdivision-see-from:s">
858 <xslo:if test="position() > 1">
860 <xslo:when test="contains('vxyz', @code)">
861 <xslo:text>--</xslo:text>
864 <xslo:value-of select="substring(' ', 1, 1)"/>
868 <xslo:value-of select="."/>
872 <xslo:value-of select="normalize-space($raw_heading)"/>
875 <xslo:template mode="index_heading" match="marc:datafield[@tag='580']">
876 <z:index name="General-subdivision-see-also-from:w General-subdivision-see-also-from:p General-subdivision-see-also-from:s Subdivision-see-also-from:w Subdivision-see-also-from:p Subdivision-see-also-from:s">
877 <xslo:variable name="raw_heading">
878 <xslo:for-each select="marc:subfield">
879 <xslo:if test="contains('vxyz', @code)" name="General-subdivision-see-also-from:w General-subdivision-see-also-from:p General-subdivision-see-also-from:s Subdivision-see-also-from:w Subdivision-see-also-from:p Subdivision-see-also-from:s">
880 <xslo:if test="position() > 1">
882 <xslo:when test="contains('vxyz', @code)">
883 <xslo:text>--</xslo:text>
886 <xslo:value-of select="substring(' ', 1, 1)"/>
890 <xslo:value-of select="."/>
894 <xslo:value-of select="normalize-space($raw_heading)"/>
897 <xslo:template mode="index_heading" match="marc:datafield[@tag='181']">
898 <z:index name="Geographic-subdivision:w Geographic-subdivision:p Geographic-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
899 <xslo:variable name="raw_heading">
900 <xslo:for-each select="marc:subfield">
901 <xslo:if test="contains('vxyz', @code)" name="Geographic-subdivision:w Geographic-subdivision:p Geographic-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
902 <xslo:if test="position() > 1">
904 <xslo:when test="contains('vxyz', @code)">
905 <xslo:text>--</xslo:text>
908 <xslo:value-of select="substring(' ', 1, 1)"/>
912 <xslo:value-of select="."/>
916 <xslo:value-of select="normalize-space($raw_heading)"/>
919 <xslo:template mode="index_heading" match="marc:datafield[@tag='481']">
920 <z:index name="Geographic-subdivision-see-from:w Geographic-subdivision-see-from:p Geographic-subdivision-see-from:s Subdivision-see-from:w Subdivision-see-from:p Subdivision-see-from:s">
921 <xslo:variable name="raw_heading">
922 <xslo:for-each select="marc:subfield">
923 <xslo:if test="contains('vxyz', @code)" name="Geographic-subdivision-see-from:w Geographic-subdivision-see-from:p Geographic-subdivision-see-from:s Subdivision-see-from:w Subdivision-see-from:p Subdivision-see-from:s">
924 <xslo:if test="position() > 1">
926 <xslo:when test="contains('vxyz', @code)">
927 <xslo:text>--</xslo:text>
930 <xslo:value-of select="substring(' ', 1, 1)"/>
934 <xslo:value-of select="."/>
938 <xslo:value-of select="normalize-space($raw_heading)"/>
941 <xslo:template mode="index_heading" match="marc:datafield[@tag='581']">
942 <z:index name="Geographic-subdivision-see-also-from:w Geographic-subdivision-see-also-from:p Geographic-subdivision-see-also-from:s Subdivision-see-also-from:w Subdivision-see-also-from:p Subdivision-see-also-from:s">
943 <xslo:variable name="raw_heading">
944 <xslo:for-each select="marc:subfield">
945 <xslo:if test="contains('vxyz', @code)" name="Geographic-subdivision-see-also-from:w Geographic-subdivision-see-also-from:p Geographic-subdivision-see-also-from:s Subdivision-see-also-from:w Subdivision-see-also-from:p Subdivision-see-also-from:s">
946 <xslo:if test="position() > 1">
948 <xslo:when test="contains('vxyz', @code)">
949 <xslo:text>--</xslo:text>
952 <xslo:value-of select="substring(' ', 1, 1)"/>
956 <xslo:value-of select="."/>
960 <xslo:value-of select="normalize-space($raw_heading)"/>
963 <xslo:template mode="index_heading" match="marc:datafield[@tag='182']">
964 <z:index name="Chronological-subdivision:w Chronological-subdivision:p Chronological-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
965 <xslo:variable name="raw_heading">
966 <xslo:for-each select="marc:subfield">
967 <xslo:if test="contains('vxyz', @code)" name="Chronological-subdivision:w Chronological-subdivision:p Chronological-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
968 <xslo:if test="position() > 1">
970 <xslo:when test="contains('vxyz', @code)">
971 <xslo:text>--</xslo:text>
974 <xslo:value-of select="substring(' ', 1, 1)"/>
978 <xslo:value-of select="."/>
982 <xslo:value-of select="normalize-space($raw_heading)"/>
985 <xslo:template mode="index_heading" match="marc:datafield[@tag='482']">
986 <z:index name="Chronological-subdivision-see-from:w Chronological-subdivision-see-from:p Chronological-subdivision-see-from:s Subdivision-see-from:w Subdivision-see-from:p Subdivision-see-from:s">
987 <xslo:variable name="raw_heading">
988 <xslo:for-each select="marc:subfield">
989 <xslo:if test="contains('vxyz', @code)" name="Chronological-subdivision-see-from:w Chronological-subdivision-see-from:p Chronological-subdivision-see-from:s Subdivision-see-from:w Subdivision-see-from:p Subdivision-see-from:s">
990 <xslo:if test="position() > 1">
992 <xslo:when test="contains('vxyz', @code)">
993 <xslo:text>--</xslo:text>
996 <xslo:value-of select="substring(' ', 1, 1)"/>
1000 <xslo:value-of select="."/>
1004 <xslo:value-of select="normalize-space($raw_heading)"/>
1007 <xslo:template mode="index_heading" match="marc:datafield[@tag='582']">
1008 <z:index name="Chronological-subdivision-see-also-from:w Chronological-subdivision-see-also-from:p Chronological-subdivision-see-also-from:s Subdivision-see-also-from:w Subdivision-see-also-from:p Subdivision-see-also-from:s">
1009 <xslo:variable name="raw_heading">
1010 <xslo:for-each select="marc:subfield">
1011 <xslo:if test="contains('vxyz', @code)" name="Chronological-subdivision-see-also-from:w Chronological-subdivision-see-also-from:p Chronological-subdivision-see-also-from:s Subdivision-see-also-from:w Subdivision-see-also-from:p Subdivision-see-also-from:s">
1012 <xslo:if test="position() > 1">
1014 <xslo:when test="contains('vxyz', @code)">
1015 <xslo:text>--</xslo:text>
1018 <xslo:value-of select="substring(' ', 1, 1)"/>
1022 <xslo:value-of select="."/>
1026 <xslo:value-of select="normalize-space($raw_heading)"/>
1029 <xslo:template mode="index_heading" match="marc:datafield[@tag='185']">
1030 <z:index name="Form-subdivision:w Form-subdivision:p Form-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
1031 <xslo:variable name="raw_heading">
1032 <xslo:for-each select="marc:subfield">
1033 <xslo:if test="contains('vxyz', @code)" name="Form-subdivision:w Form-subdivision:p Form-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
1034 <xslo:if test="position() > 1">
1036 <xslo:when test="contains('vxyz', @code)">
1037 <xslo:text>--</xslo:text>
1040 <xslo:value-of select="substring(' ', 1, 1)"/>
1044 <xslo:value-of select="."/>
1048 <xslo:value-of select="normalize-space($raw_heading)"/>
1051 <xslo:template mode="index_heading" match="marc:datafield[@tag='485']">
1052 <z:index name="Form-subdivision-see-from:w Form-subdivision-see-from:p Form-subdivision-see-from:s Subdivision-see-from:w Subdivision-see-from:p Subdivision-see-from:s">
1053 <xslo:variable name="raw_heading">
1054 <xslo:for-each select="marc:subfield">
1055 <xslo:if test="contains('vxyz', @code)" name="Form-subdivision-see-from:w Form-subdivision-see-from:p Form-subdivision-see-from:s Subdivision-see-from:w Subdivision-see-from:p Subdivision-see-from:s">
1056 <xslo:if test="position() > 1">
1058 <xslo:when test="contains('vxyz', @code)">
1059 <xslo:text>--</xslo:text>
1062 <xslo:value-of select="substring(' ', 1, 1)"/>
1066 <xslo:value-of select="."/>
1070 <xslo:value-of select="normalize-space($raw_heading)"/>
1073 <xslo:template mode="index_heading" match="marc:datafield[@tag='585']">
1074 <z:index name="Form-subdivision-see-also-from:w Form-subdivision-see-also-from:p Form-subdivision-see-also-from:s Subdivision-see-also-from:w Subdivision-see-also-from:p Subdivision-see-also-from:s">
1075 <xslo:variable name="raw_heading">
1076 <xslo:for-each select="marc:subfield">
1077 <xslo:if test="contains('vxyz', @code)" name="Form-subdivision-see-also-from:w Form-subdivision-see-also-from:p Form-subdivision-see-also-from:s Subdivision-see-also-from:w Subdivision-see-also-from:p Subdivision-see-also-from:s">
1078 <xslo:if test="position() > 1">
1080 <xslo:when test="contains('vxyz', @code)">
1081 <xslo:text>--</xslo:text>
1084 <xslo:value-of select="substring(' ', 1, 1)"/>
1088 <xslo:value-of select="."/>
1092 <xslo:value-of select="normalize-space($raw_heading)"/>
1095 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='100']">
1096 <z:index name="Match-heading:p Match-heading:s">
1097 <xslo:variable name="raw_heading">
1098 <xslo:for-each select="marc:subfield">
1099 <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Match-heading:p Match-heading:s">
1100 <xslo:if test="position() > 1">
1102 <xslo:when test="contains('vxyz', @code)">
1104 <xslo:when test="@code = $general_subdivision_subfield">
1105 <xslo:text> generalsubdiv </xslo:text>
1107 <xslo:when test="@code = $form_subdivision_subfield">
1108 <xslo:text> formsubdiv </xslo:text>
1110 <xslo:when test="@code = $chronological_subdivision_subfield">
1111 <xslo:text> chronologicalsubdiv </xslo:text>
1113 <xslo:when test="@code = $geographic_subdivision_subfield">
1114 <xslo:text> geographicsubdiv </xslo:text>
1119 <xslo:value-of select="substring(' ', 1, 1)"/>
1123 <xslo:value-of select="."/>
1127 <xslo:value-of select="normalize-space($raw_heading)"/>
1130 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='400']">
1131 <z:index name="Match-heading-see-from:p Match-heading-see-from:s">
1132 <xslo:variable name="raw_heading">
1133 <xslo:for-each select="marc:subfield">
1134 <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s">
1135 <xslo:if test="position() > 1">
1137 <xslo:when test="contains('vxyz', @code)">
1139 <xslo:when test="@code = $general_subdivision_subfield">
1140 <xslo:text> generalsubdiv </xslo:text>
1142 <xslo:when test="@code = $form_subdivision_subfield">
1143 <xslo:text> formsubdiv </xslo:text>
1145 <xslo:when test="@code = $chronological_subdivision_subfield">
1146 <xslo:text> chronologicalsubdiv </xslo:text>
1148 <xslo:when test="@code = $geographic_subdivision_subfield">
1149 <xslo:text> geographicsubdiv </xslo:text>
1154 <xslo:value-of select="substring(' ', 1, 1)"/>
1158 <xslo:value-of select="."/>
1162 <xslo:value-of select="normalize-space($raw_heading)"/>
1165 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='110']">
1166 <z:index name="Match-heading:p Match-heading:s">
1167 <xslo:variable name="raw_heading">
1168 <xslo:for-each select="marc:subfield">
1169 <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Match-heading:p Match-heading:s">
1170 <xslo:if test="position() > 1">
1172 <xslo:when test="contains('vxyz', @code)">
1174 <xslo:when test="@code = $general_subdivision_subfield">
1175 <xslo:text> generalsubdiv </xslo:text>
1177 <xslo:when test="@code = $form_subdivision_subfield">
1178 <xslo:text> formsubdiv </xslo:text>
1180 <xslo:when test="@code = $chronological_subdivision_subfield">
1181 <xslo:text> chronologicalsubdiv </xslo:text>
1183 <xslo:when test="@code = $geographic_subdivision_subfield">
1184 <xslo:text> geographicsubdiv </xslo:text>
1189 <xslo:value-of select="substring(' ', 1, 1)"/>
1193 <xslo:value-of select="."/>
1197 <xslo:value-of select="normalize-space($raw_heading)"/>
1200 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='410']">
1201 <z:index name="Match-heading-see-from:p Match-heading-see-from:s">
1202 <xslo:variable name="raw_heading">
1203 <xslo:for-each select="marc:subfield">
1204 <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s">
1205 <xslo:if test="position() > 1">
1207 <xslo:when test="contains('vxyz', @code)">
1209 <xslo:when test="@code = $general_subdivision_subfield">
1210 <xslo:text> generalsubdiv </xslo:text>
1212 <xslo:when test="@code = $form_subdivision_subfield">
1213 <xslo:text> formsubdiv </xslo:text>
1215 <xslo:when test="@code = $chronological_subdivision_subfield">
1216 <xslo:text> chronologicalsubdiv </xslo:text>
1218 <xslo:when test="@code = $geographic_subdivision_subfield">
1219 <xslo:text> geographicsubdiv </xslo:text>
1224 <xslo:value-of select="substring(' ', 1, 1)"/>
1228 <xslo:value-of select="."/>
1232 <xslo:value-of select="normalize-space($raw_heading)"/>
1235 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='111']">
1236 <z:index name="Match-heading:p Match-heading:s">
1237 <xslo:variable name="raw_heading">
1238 <xslo:for-each select="marc:subfield">
1239 <xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Match-heading:p Match-heading:s">
1240 <xslo:if test="position() > 1">
1242 <xslo:when test="contains('vxyz', @code)">
1244 <xslo:when test="@code = $general_subdivision_subfield">
1245 <xslo:text> generalsubdiv </xslo:text>
1247 <xslo:when test="@code = $form_subdivision_subfield">
1248 <xslo:text> formsubdiv </xslo:text>
1250 <xslo:when test="@code = $chronological_subdivision_subfield">
1251 <xslo:text> chronologicalsubdiv </xslo:text>
1253 <xslo:when test="@code = $geographic_subdivision_subfield">
1254 <xslo:text> geographicsubdiv </xslo:text>
1259 <xslo:value-of select="substring(' ', 1, 1)"/>
1263 <xslo:value-of select="."/>
1267 <xslo:value-of select="normalize-space($raw_heading)"/>
1270 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='411']">
1271 <z:index name="Match-heading-see-from:p Match-heading-see-from:s">
1272 <xslo:variable name="raw_heading">
1273 <xslo:for-each select="marc:subfield">
1274 <xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s">
1275 <xslo:if test="position() > 1">
1277 <xslo:when test="contains('vxyz', @code)">
1279 <xslo:when test="@code = $general_subdivision_subfield">
1280 <xslo:text> generalsubdiv </xslo:text>
1282 <xslo:when test="@code = $form_subdivision_subfield">
1283 <xslo:text> formsubdiv </xslo:text>
1285 <xslo:when test="@code = $chronological_subdivision_subfield">
1286 <xslo:text> chronologicalsubdiv </xslo:text>
1288 <xslo:when test="@code = $geographic_subdivision_subfield">
1289 <xslo:text> geographicsubdiv </xslo:text>
1294 <xslo:value-of select="substring(' ', 1, 1)"/>
1298 <xslo:value-of select="."/>
1302 <xslo:value-of select="normalize-space($raw_heading)"/>
1305 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='130']">
1306 <z:index name="Match-heading:p Match-heading:s">
1307 <xslo:variable name="raw_heading">
1308 <xslo:for-each select="marc:subfield">
1309 <xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Match-heading:p Match-heading:s">
1310 <xslo:if test="position() > 1">
1312 <xslo:when test="contains('vxyz', @code)">
1314 <xslo:when test="@code = $general_subdivision_subfield">
1315 <xslo:text> generalsubdiv </xslo:text>
1317 <xslo:when test="@code = $form_subdivision_subfield">
1318 <xslo:text> formsubdiv </xslo:text>
1320 <xslo:when test="@code = $chronological_subdivision_subfield">
1321 <xslo:text> chronologicalsubdiv </xslo:text>
1323 <xslo:when test="@code = $geographic_subdivision_subfield">
1324 <xslo:text> geographicsubdiv </xslo:text>
1329 <xslo:value-of select="substring(' ', 1, 1)"/>
1333 <xslo:value-of select="."/>
1337 <xslo:value-of select="normalize-space($raw_heading)"/>
1340 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='430']">
1341 <z:index name="Match-heading-see-from:p Match-heading-see-from:s">
1342 <xslo:variable name="raw_heading">
1343 <xslo:for-each select="marc:subfield">
1344 <xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s">
1345 <xslo:if test="position() > 1">
1347 <xslo:when test="contains('vxyz', @code)">
1349 <xslo:when test="@code = $general_subdivision_subfield">
1350 <xslo:text> generalsubdiv </xslo:text>
1352 <xslo:when test="@code = $form_subdivision_subfield">
1353 <xslo:text> formsubdiv </xslo:text>
1355 <xslo:when test="@code = $chronological_subdivision_subfield">
1356 <xslo:text> chronologicalsubdiv </xslo:text>
1358 <xslo:when test="@code = $geographic_subdivision_subfield">
1359 <xslo:text> geographicsubdiv </xslo:text>
1364 <xslo:value-of select="substring(' ', 1, 1)"/>
1368 <xslo:value-of select="."/>
1372 <xslo:value-of select="normalize-space($raw_heading)"/>
1375 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='148']">
1376 <z:index name="Match-heading:p Match-heading:s">
1377 <xslo:variable name="raw_heading">
1378 <xslo:for-each select="marc:subfield">
1379 <xslo:if test="contains('avxyz', @code)" name="Match-heading:p Match-heading:s">
1380 <xslo:if test="position() > 1">
1382 <xslo:when test="contains('vxyz', @code)">
1384 <xslo:when test="@code = $general_subdivision_subfield">
1385 <xslo:text> generalsubdiv </xslo:text>
1387 <xslo:when test="@code = $form_subdivision_subfield">
1388 <xslo:text> formsubdiv </xslo:text>
1390 <xslo:when test="@code = $chronological_subdivision_subfield">
1391 <xslo:text> chronologicalsubdiv </xslo:text>
1393 <xslo:when test="@code = $geographic_subdivision_subfield">
1394 <xslo:text> geographicsubdiv </xslo:text>
1399 <xslo:value-of select="substring(' ', 1, 1)"/>
1403 <xslo:value-of select="."/>
1407 <xslo:value-of select="normalize-space($raw_heading)"/>
1410 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='448']">
1411 <z:index name="Match-heading-see-from:p Match-heading-see-from:s">
1412 <xslo:variable name="raw_heading">
1413 <xslo:for-each select="marc:subfield">
1414 <xslo:if test="contains('avxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s">
1415 <xslo:if test="position() > 1">
1417 <xslo:when test="contains('vxyz', @code)">
1419 <xslo:when test="@code = $general_subdivision_subfield">
1420 <xslo:text> generalsubdiv </xslo:text>
1422 <xslo:when test="@code = $form_subdivision_subfield">
1423 <xslo:text> formsubdiv </xslo:text>
1425 <xslo:when test="@code = $chronological_subdivision_subfield">
1426 <xslo:text> chronologicalsubdiv </xslo:text>
1428 <xslo:when test="@code = $geographic_subdivision_subfield">
1429 <xslo:text> geographicsubdiv </xslo:text>
1434 <xslo:value-of select="substring(' ', 1, 1)"/>
1438 <xslo:value-of select="."/>
1442 <xslo:value-of select="normalize-space($raw_heading)"/>
1445 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='150']">
1446 <z:index name="Match-heading:p Match-heading:s">
1447 <xslo:variable name="raw_heading">
1448 <xslo:for-each select="marc:subfield">
1449 <xslo:if test="contains('abvxyz', @code)" name="Match-heading:p Match-heading:s">
1450 <xslo:if test="position() > 1">
1452 <xslo:when test="contains('vxyz', @code)">
1454 <xslo:when test="@code = $general_subdivision_subfield">
1455 <xslo:text> generalsubdiv </xslo:text>
1457 <xslo:when test="@code = $form_subdivision_subfield">
1458 <xslo:text> formsubdiv </xslo:text>
1460 <xslo:when test="@code = $chronological_subdivision_subfield">
1461 <xslo:text> chronologicalsubdiv </xslo:text>
1463 <xslo:when test="@code = $geographic_subdivision_subfield">
1464 <xslo:text> geographicsubdiv </xslo:text>
1469 <xslo:value-of select="substring(' ', 1, 1)"/>
1473 <xslo:value-of select="."/>
1477 <xslo:value-of select="normalize-space($raw_heading)"/>
1480 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='450']">
1481 <z:index name="Match-heading-see-from:p Match-heading-see-from:s">
1482 <xslo:variable name="raw_heading">
1483 <xslo:for-each select="marc:subfield">
1484 <xslo:if test="contains('abvxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s">
1485 <xslo:if test="position() > 1">
1487 <xslo:when test="contains('vxyz', @code)">
1489 <xslo:when test="@code = $general_subdivision_subfield">
1490 <xslo:text> generalsubdiv </xslo:text>
1492 <xslo:when test="@code = $form_subdivision_subfield">
1493 <xslo:text> formsubdiv </xslo:text>
1495 <xslo:when test="@code = $chronological_subdivision_subfield">
1496 <xslo:text> chronologicalsubdiv </xslo:text>
1498 <xslo:when test="@code = $geographic_subdivision_subfield">
1499 <xslo:text> geographicsubdiv </xslo:text>
1504 <xslo:value-of select="substring(' ', 1, 1)"/>
1508 <xslo:value-of select="."/>
1512 <xslo:value-of select="normalize-space($raw_heading)"/>
1515 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='151']">
1516 <z:index name="Match-heading:p Match-heading:s">
1517 <xslo:variable name="raw_heading">
1518 <xslo:for-each select="marc:subfield">
1519 <xslo:if test="contains('avxyz', @code)" name="Match-heading:p Match-heading:s">
1520 <xslo:if test="position() > 1">
1522 <xslo:when test="contains('vxyz', @code)">
1524 <xslo:when test="@code = $general_subdivision_subfield">
1525 <xslo:text> generalsubdiv </xslo:text>
1527 <xslo:when test="@code = $form_subdivision_subfield">
1528 <xslo:text> formsubdiv </xslo:text>
1530 <xslo:when test="@code = $chronological_subdivision_subfield">
1531 <xslo:text> chronologicalsubdiv </xslo:text>
1533 <xslo:when test="@code = $geographic_subdivision_subfield">
1534 <xslo:text> geographicsubdiv </xslo:text>
1539 <xslo:value-of select="substring(' ', 1, 1)"/>
1543 <xslo:value-of select="."/>
1547 <xslo:value-of select="normalize-space($raw_heading)"/>
1550 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='451']">
1551 <z:index name="Match-heading-see-from:p Match-heading-see-from:s">
1552 <xslo:variable name="raw_heading">
1553 <xslo:for-each select="marc:subfield">
1554 <xslo:if test="contains('avxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s">
1555 <xslo:if test="position() > 1">
1557 <xslo:when test="contains('vxyz', @code)">
1559 <xslo:when test="@code = $general_subdivision_subfield">
1560 <xslo:text> generalsubdiv </xslo:text>
1562 <xslo:when test="@code = $form_subdivision_subfield">
1563 <xslo:text> formsubdiv </xslo:text>
1565 <xslo:when test="@code = $chronological_subdivision_subfield">
1566 <xslo:text> chronologicalsubdiv </xslo:text>
1568 <xslo:when test="@code = $geographic_subdivision_subfield">
1569 <xslo:text> geographicsubdiv </xslo:text>
1574 <xslo:value-of select="substring(' ', 1, 1)"/>
1578 <xslo:value-of select="."/>
1582 <xslo:value-of select="normalize-space($raw_heading)"/>
1585 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='155']">
1586 <z:index name="Match-heading:p Match-heading:s">
1587 <xslo:variable name="raw_heading">
1588 <xslo:for-each select="marc:subfield">
1589 <xslo:if test="contains('avxyz', @code)" name="Match-heading:p Match-heading:s">
1590 <xslo:if test="position() > 1">
1592 <xslo:when test="contains('vxyz', @code)">
1594 <xslo:when test="@code = $general_subdivision_subfield">
1595 <xslo:text> generalsubdiv </xslo:text>
1597 <xslo:when test="@code = $form_subdivision_subfield">
1598 <xslo:text> formsubdiv </xslo:text>
1600 <xslo:when test="@code = $chronological_subdivision_subfield">
1601 <xslo:text> chronologicalsubdiv </xslo:text>
1603 <xslo:when test="@code = $geographic_subdivision_subfield">
1604 <xslo:text> geographicsubdiv </xslo:text>
1609 <xslo:value-of select="substring(' ', 1, 1)"/>
1613 <xslo:value-of select="."/>
1617 <xslo:value-of select="normalize-space($raw_heading)"/>
1620 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='455']">
1621 <z:index name="Match-heading-see-from:p Match-heading-see-from:s">
1622 <xslo:variable name="raw_heading">
1623 <xslo:for-each select="marc:subfield">
1624 <xslo:if test="contains('avxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s">
1625 <xslo:if test="position() > 1">
1627 <xslo:when test="contains('vxyz', @code)">
1629 <xslo:when test="@code = $general_subdivision_subfield">
1630 <xslo:text> generalsubdiv </xslo:text>
1632 <xslo:when test="@code = $form_subdivision_subfield">
1633 <xslo:text> formsubdiv </xslo:text>
1635 <xslo:when test="@code = $chronological_subdivision_subfield">
1636 <xslo:text> chronologicalsubdiv </xslo:text>
1638 <xslo:when test="@code = $geographic_subdivision_subfield">
1639 <xslo:text> geographicsubdiv </xslo:text>
1644 <xslo:value-of select="substring(' ', 1, 1)"/>
1648 <xslo:value-of select="."/>
1652 <xslo:value-of select="normalize-space($raw_heading)"/>
1655 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='180']">
1656 <z:index name="Match-subdivision:p Match-subdivision:s">
1657 <xslo:variable name="raw_heading">
1658 <xslo:for-each select="marc:subfield">
1659 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision:p Match-subdivision:s">
1660 <xslo:if test="position() > 1">
1662 <xslo:when test="contains('vxyz', @code)">
1664 <xslo:when test="@code = $general_subdivision_subfield">
1665 <xslo:text> generalsubdiv </xslo:text>
1667 <xslo:when test="@code = $form_subdivision_subfield">
1668 <xslo:text> formsubdiv </xslo:text>
1670 <xslo:when test="@code = $chronological_subdivision_subfield">
1671 <xslo:text> chronologicalsubdiv </xslo:text>
1673 <xslo:when test="@code = $geographic_subdivision_subfield">
1674 <xslo:text> geographicsubdiv </xslo:text>
1679 <xslo:value-of select="substring(' ', 1, 1)"/>
1683 <xslo:value-of select="."/>
1687 <xslo:value-of select="normalize-space($raw_heading)"/>
1690 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='480']">
1691 <z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
1692 <xslo:variable name="raw_heading">
1693 <xslo:for-each select="marc:subfield">
1694 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
1695 <xslo:if test="position() > 1">
1697 <xslo:when test="contains('vxyz', @code)">
1699 <xslo:when test="@code = $general_subdivision_subfield">
1700 <xslo:text> generalsubdiv </xslo:text>
1702 <xslo:when test="@code = $form_subdivision_subfield">
1703 <xslo:text> formsubdiv </xslo:text>
1705 <xslo:when test="@code = $chronological_subdivision_subfield">
1706 <xslo:text> chronologicalsubdiv </xslo:text>
1708 <xslo:when test="@code = $geographic_subdivision_subfield">
1709 <xslo:text> geographicsubdiv </xslo:text>
1714 <xslo:value-of select="substring(' ', 1, 1)"/>
1718 <xslo:value-of select="."/>
1722 <xslo:value-of select="normalize-space($raw_heading)"/>
1725 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='181']">
1726 <z:index name="Match-subdivision:p Match-subdivision:s">
1727 <xslo:variable name="raw_heading">
1728 <xslo:for-each select="marc:subfield">
1729 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision:p Match-subdivision:s">
1730 <xslo:if test="position() > 1">
1732 <xslo:when test="contains('vxyz', @code)">
1734 <xslo:when test="@code = $general_subdivision_subfield">
1735 <xslo:text> generalsubdiv </xslo:text>
1737 <xslo:when test="@code = $form_subdivision_subfield">
1738 <xslo:text> formsubdiv </xslo:text>
1740 <xslo:when test="@code = $chronological_subdivision_subfield">
1741 <xslo:text> chronologicalsubdiv </xslo:text>
1743 <xslo:when test="@code = $geographic_subdivision_subfield">
1744 <xslo:text> geographicsubdiv </xslo:text>
1749 <xslo:value-of select="substring(' ', 1, 1)"/>
1753 <xslo:value-of select="."/>
1757 <xslo:value-of select="normalize-space($raw_heading)"/>
1760 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='481']">
1761 <z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
1762 <xslo:variable name="raw_heading">
1763 <xslo:for-each select="marc:subfield">
1764 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
1765 <xslo:if test="position() > 1">
1767 <xslo:when test="contains('vxyz', @code)">
1769 <xslo:when test="@code = $general_subdivision_subfield">
1770 <xslo:text> generalsubdiv </xslo:text>
1772 <xslo:when test="@code = $form_subdivision_subfield">
1773 <xslo:text> formsubdiv </xslo:text>
1775 <xslo:when test="@code = $chronological_subdivision_subfield">
1776 <xslo:text> chronologicalsubdiv </xslo:text>
1778 <xslo:when test="@code = $geographic_subdivision_subfield">
1779 <xslo:text> geographicsubdiv </xslo:text>
1784 <xslo:value-of select="substring(' ', 1, 1)"/>
1788 <xslo:value-of select="."/>
1792 <xslo:value-of select="normalize-space($raw_heading)"/>
1795 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='182']">
1796 <z:index name="Match-subdivision:p Match-subdivision:s">
1797 <xslo:variable name="raw_heading">
1798 <xslo:for-each select="marc:subfield">
1799 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision:p Match-subdivision:s">
1800 <xslo:if test="position() > 1">
1802 <xslo:when test="contains('vxyz', @code)">
1804 <xslo:when test="@code = $general_subdivision_subfield">
1805 <xslo:text> generalsubdiv </xslo:text>
1807 <xslo:when test="@code = $form_subdivision_subfield">
1808 <xslo:text> formsubdiv </xslo:text>
1810 <xslo:when test="@code = $chronological_subdivision_subfield">
1811 <xslo:text> chronologicalsubdiv </xslo:text>
1813 <xslo:when test="@code = $geographic_subdivision_subfield">
1814 <xslo:text> geographicsubdiv </xslo:text>
1819 <xslo:value-of select="substring(' ', 1, 1)"/>
1823 <xslo:value-of select="."/>
1827 <xslo:value-of select="normalize-space($raw_heading)"/>
1830 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='482']">
1831 <z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
1832 <xslo:variable name="raw_heading">
1833 <xslo:for-each select="marc:subfield">
1834 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
1835 <xslo:if test="position() > 1">
1837 <xslo:when test="contains('vxyz', @code)">
1839 <xslo:when test="@code = $general_subdivision_subfield">
1840 <xslo:text> generalsubdiv </xslo:text>
1842 <xslo:when test="@code = $form_subdivision_subfield">
1843 <xslo:text> formsubdiv </xslo:text>
1845 <xslo:when test="@code = $chronological_subdivision_subfield">
1846 <xslo:text> chronologicalsubdiv </xslo:text>
1848 <xslo:when test="@code = $geographic_subdivision_subfield">
1849 <xslo:text> geographicsubdiv </xslo:text>
1854 <xslo:value-of select="substring(' ', 1, 1)"/>
1858 <xslo:value-of select="."/>
1862 <xslo:value-of select="normalize-space($raw_heading)"/>
1865 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='485']">
1866 <z:index name="Match-subdivision:p Match-subdivision:s">
1867 <xslo:variable name="raw_heading">
1868 <xslo:for-each select="marc:subfield">
1869 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision:p Match-subdivision:s">
1870 <xslo:if test="position() > 1">
1872 <xslo:when test="contains('vxyz', @code)">
1874 <xslo:when test="@code = $general_subdivision_subfield">
1875 <xslo:text> generalsubdiv </xslo:text>
1877 <xslo:when test="@code = $form_subdivision_subfield">
1878 <xslo:text> formsubdiv </xslo:text>
1880 <xslo:when test="@code = $chronological_subdivision_subfield">
1881 <xslo:text> chronologicalsubdiv </xslo:text>
1883 <xslo:when test="@code = $geographic_subdivision_subfield">
1884 <xslo:text> geographicsubdiv </xslo:text>
1889 <xslo:value-of select="substring(' ', 1, 1)"/>
1893 <xslo:value-of select="."/>
1897 <xslo:value-of select="normalize-space($raw_heading)"/>
1900 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='185']">
1901 <z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
1902 <xslo:variable name="raw_heading">
1903 <xslo:for-each select="marc:subfield">
1904 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
1905 <xslo:if test="position() > 1">
1907 <xslo:when test="contains('vxyz', @code)">
1909 <xslo:when test="@code = $general_subdivision_subfield">
1910 <xslo:text> generalsubdiv </xslo:text>
1912 <xslo:when test="@code = $form_subdivision_subfield">
1913 <xslo:text> formsubdiv </xslo:text>
1915 <xslo:when test="@code = $chronological_subdivision_subfield">
1916 <xslo:text> chronologicalsubdiv </xslo:text>
1918 <xslo:when test="@code = $geographic_subdivision_subfield">
1919 <xslo:text> geographicsubdiv </xslo:text>
1924 <xslo:value-of select="substring(' ', 1, 1)"/>
1928 <xslo:value-of select="."/>
1932 <xslo:value-of select="normalize-space($raw_heading)"/>
1935 <xslo:variable name="form_subdivision_subfield">v</xslo:variable>
1936 <xslo:variable name="general_subdivision_subfield">x</xslo:variable>
1937 <xslo:variable name="chronological_subdivision_subfield">y</xslo:variable>
1938 <xslo:variable name="geographic_subdivision_subfield">z</xslo:variable>
1939 <xslo:template mode="index_subject_thesaurus" match="marc:controlfield[@tag='008']">
1940 <xslo:variable name="thesaurus_code1" select="substring(., 12, 1)"/>
1941 <xslo:variable name="full_thesaurus_code">
1943 <xslo:when test="$thesaurus_code1 = 'a'">
1944 <xslo:text>lcsh</xslo:text>
1946 <xslo:when test="$thesaurus_code1 = 'b'">
1947 <xslo:text>lcac</xslo:text>
1949 <xslo:when test="$thesaurus_code1 = 'c'">
1950 <xslo:text>mesh</xslo:text>
1952 <xslo:when test="$thesaurus_code1 = 'd'">
1953 <xslo:text>nal</xslo:text>
1955 <xslo:when test="$thesaurus_code1 = 'k'">
1956 <xslo:text>cash</xslo:text>
1958 <xslo:when test="$thesaurus_code1 = 'n'">
1959 <xslo:text>notapplicable</xslo:text>
1961 <xslo:when test="$thesaurus_code1 = 'r'">
1962 <xslo:text>aat</xslo:text>
1964 <xslo:when test="$thesaurus_code1 = 's'">
1965 <xslo:text>sears</xslo:text>
1967 <xslo:when test="$thesaurus_code1 = 'v'">
1968 <xslo:text>rvm</xslo:text>
1970 <xslo:when test="$thesaurus_code1 = 'z'">
1972 <xslo:when test="//marc:datafield[@tag='040']/marc:subfield[@code='f']">
1973 <xslo:value-of select="//marc:datafield[@tag='040']/marc:subfield[@code='f']"/>
1976 <xslo:text>notdefined</xslo:text>
1981 <xslo:text>notdefined</xslo:text>
1985 <z:index name="Subject-heading-thesaurus:w">
1986 <xslo:value-of select="$full_thesaurus_code"/>
1989 <xslo:template match="*">
1990 <z:index name="Any:w Any:p">
1991 <xslo:value-of select="."/>