1 <?xml version="1.0" encoding="UTF-8"?>
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).
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_match_heading"/>
17 <xslo:template match="text()" mode="index_subject_thesaurus"/>
18 <xslo:template match="/">
19 <xslo:if test="marc:collection">
21 <xslo:apply-templates select="marc:collection/marc:record"/>
24 <xslo:if test="marc:record">
25 <xslo:apply-templates select="marc:record"/>
28 <xslo:template match="marc:record">
29 <xslo:variable name="controlField001" select="normalize-space(marc:controlfield[@tag='001'])"/>
30 <z:record type="update">
31 <xslo:attribute name="z:id">
32 <xslo:value-of select="$controlField001"/>
34 <xslo:apply-templates/>
35 <xslo:apply-templates mode="index_subfields"/>
36 <xslo:apply-templates mode="index_data_field"/>
37 <xslo:apply-templates mode="index_heading"/>
38 <xslo:apply-templates mode="index_match_heading"/>
39 <xslo:apply-templates mode="index_subject_thesaurus"/>
42 <xslo:template match="marc:leader">
43 <z:index name="Record-status:w">
44 <xslo:value-of select="substring(., 6, 1)"/>
46 <z:index name="Encoding-level:w">
47 <xslo:value-of select="substring(., 18, 1)"/>
50 <xslo:template match="marc:controlfield[@tag='001']">
51 <z:index name="Local-Number:w Local-Number:s">
52 <xslo:value-of select="."/>
55 <xslo:template match="marc:controlfield[@tag='008']">
56 <z:index name="Kind-of-record:w">
57 <xslo:value-of select="substring(., 10, 1)"/>
59 <z:index name="Descriptive-cataloging-rules:w">
60 <xslo:value-of select="substring(., 11, 1)"/>
62 <z:index name="Heading-use-main-or-added-entry:w">
63 <xslo:value-of select="substring(., 15, 1)"/>
65 <z:index name="Heading-use-subject-added-entry:w">
66 <xslo:value-of select="substring(., 16, 1)"/>
68 <z:index name="Heading-use-series-added-entry:w">
69 <xslo:value-of select="substring(., 17, 1)"/>
72 <xslo:template mode="index_subfields" match="marc:datafield[@tag='100']">
73 <xslo:for-each select="marc:subfield">
74 <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)">
75 <z:index name="Personal-name:w Personal-name:p Personal-name:s">
76 <xslo:value-of select="."/>
81 <xslo:template mode="index_subfields" match="marc:datafield[@tag='110']">
82 <xslo:for-each select="marc:subfield">
83 <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)">
84 <z:index name="Corporate-name:w Corporate-name:p">
85 <xslo:value-of select="."/>
90 <xslo:template mode="index_subfields" match="marc:datafield[@tag='111']">
91 <xslo:for-each select="marc:subfield">
92 <xslo:if test="contains('acdefghjklnpqstvxyz', @code)">
93 <z:index name="Meeting-name:w Meeting-name:p">
94 <xslo:value-of select="."/>
99 <xslo:template mode="index_subfields" match="marc:datafield[@tag='130']">
100 <xslo:for-each select="marc:subfield">
101 <xslo:if test="contains('adfghklmnoprstvxyz', @code)">
102 <z:index name="Title-uniform:w Title-uniform:p">
103 <xslo:value-of select="."/>
108 <xslo:template mode="index_subfields" match="marc:datafield[@tag='148']">
109 <xslo:for-each select="marc:subfield">
110 <xslo:if test="contains('avxyz', @code)">
111 <z:index name="Chronological-term:w Chronological-term:p">
112 <xslo:value-of select="."/>
117 <xslo:template mode="index_subfields" match="marc:datafield[@tag='150']">
118 <xslo:for-each select="marc:subfield">
119 <xslo:if test="contains('abvxyz', @code)">
120 <z:index name="Subject-topical:w Subject-topical:p">
121 <xslo:value-of select="."/>
126 <xslo:template mode="index_subfields" match="marc:datafield[@tag='151']">
127 <xslo:for-each select="marc:subfield">
128 <xslo:if test="contains('avxyz', @code)">
129 <z:index name="Name-geographic:w Name-geographic:p">
130 <xslo:value-of select="."/>
135 <xslo:template mode="index_subfields" match="marc:datafield[@tag='155']">
136 <xslo:for-each select="marc:subfield">
137 <xslo:if test="contains('avxyz', @code)">
138 <z:index name="Term-genre-form:w Term-genre-form:p">
139 <xslo:value-of select="."/>
144 <xslo:template mode="index_subfields" match="marc:datafield[@tag='942']">
145 <xslo:for-each select="marc:subfield">
146 <xslo:if test="contains('a', @code)">
147 <z:index name="authtype:w">
148 <xslo:value-of select="."/>
153 <xslo:template mode="index_heading" match="marc:datafield[@tag='100']">
154 <z:index name="Personal-name-heading:w Personal-name-heading:p Personal-name-heading:s Heading:w Heading:p Heading:s">
155 <xslo:variable name="raw_heading">
156 <xslo:for-each select="marc:subfield">
157 <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">
158 <xslo:if test="position() > 1">
160 <xslo:when test="contains('vxyz', @code)">
161 <xslo:text>--</xslo:text>
164 <xslo:value-of select="substring(' ', 1, 1)"/>
168 <xslo:value-of select="."/>
172 <xslo:value-of select="normalize-space($raw_heading)"/>
174 <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
175 <xslo:variable name="raw_heading">
176 <xslo:for-each select="marc:subfield">
177 <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
178 <xslo:if test="position() > 1">
180 <xslo:when test="contains('', @code)">
181 <xslo:text>--</xslo:text>
184 <xslo:value-of select="substring(' ', 1, 1)"/>
188 <xslo:value-of select="."/>
192 <xslo:value-of select="normalize-space($raw_heading)"/>
195 <xslo:template mode="index_heading" match="marc:datafield[@tag='400']">
196 <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">
197 <xslo:variable name="raw_heading">
198 <xslo:for-each select="marc:subfield">
199 <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">
200 <xslo:if test="position() > 1">
202 <xslo:when test="contains('vxyz', @code)">
203 <xslo:text>--</xslo:text>
206 <xslo:value-of select="substring(' ', 1, 1)"/>
210 <xslo:value-of select="."/>
214 <xslo:value-of select="normalize-space($raw_heading)"/>
217 <xslo:template mode="index_heading" match="marc:datafield[@tag='500']">
218 <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">
219 <xslo:variable name="raw_heading">
220 <xslo:for-each select="marc:subfield">
221 <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">
222 <xslo:if test="position() > 1">
224 <xslo:when test="contains('vxyz', @code)">
225 <xslo:text>--</xslo:text>
228 <xslo:value-of select="substring(' ', 1, 1)"/>
232 <xslo:value-of select="."/>
236 <xslo:value-of select="normalize-space($raw_heading)"/>
239 <xslo:template mode="index_heading" match="marc:datafield[@tag='110']">
240 <z:index name="Corporate-name-heading:w Corporate-name-heading:p Corporate-name-heading:s Heading:w Heading:p Heading:s">
241 <xslo:variable name="raw_heading">
242 <xslo:for-each select="marc:subfield">
243 <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">
244 <xslo:if test="position() > 1">
246 <xslo:when test="contains('vxyz', @code)">
247 <xslo:text>--</xslo:text>
250 <xslo:value-of select="substring(' ', 1, 1)"/>
254 <xslo:value-of select="."/>
258 <xslo:value-of select="normalize-space($raw_heading)"/>
260 <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
261 <xslo:variable name="raw_heading">
262 <xslo:for-each select="marc:subfield">
263 <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
264 <xslo:if test="position() > 1">
266 <xslo:when test="contains('', @code)">
267 <xslo:text>--</xslo:text>
270 <xslo:value-of select="substring(' ', 1, 1)"/>
274 <xslo:value-of select="."/>
278 <xslo:value-of select="normalize-space($raw_heading)"/>
281 <xslo:template mode="index_heading" match="marc:datafield[@tag='410']">
282 <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">
283 <xslo:variable name="raw_heading">
284 <xslo:for-each select="marc:subfield">
285 <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">
286 <xslo:if test="position() > 1">
288 <xslo:when test="contains('vxyz', @code)">
289 <xslo:text>--</xslo:text>
292 <xslo:value-of select="substring(' ', 1, 1)"/>
296 <xslo:value-of select="."/>
300 <xslo:value-of select="normalize-space($raw_heading)"/>
303 <xslo:template mode="index_heading" match="marc:datafield[@tag='510']">
304 <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">
305 <xslo:variable name="raw_heading">
306 <xslo:for-each select="marc:subfield">
307 <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">
308 <xslo:if test="position() > 1">
310 <xslo:when test="contains('vxyz', @code)">
311 <xslo:text>--</xslo:text>
314 <xslo:value-of select="substring(' ', 1, 1)"/>
318 <xslo:value-of select="."/>
322 <xslo:value-of select="normalize-space($raw_heading)"/>
325 <xslo:template mode="index_heading" match="marc:datafield[@tag='111']">
326 <z:index name="Meeting-name-heading:w Meeting-name-heading:p Meeting-name-heading:s Heading:w Heading:p Heading:s">
327 <xslo:variable name="raw_heading">
328 <xslo:for-each select="marc:subfield">
329 <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">
330 <xslo:if test="position() > 1">
332 <xslo:when test="contains('vxyz', @code)">
333 <xslo:text>--</xslo:text>
336 <xslo:value-of select="substring(' ', 1, 1)"/>
340 <xslo:value-of select="."/>
344 <xslo:value-of select="normalize-space($raw_heading)"/>
346 <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
347 <xslo:variable name="raw_heading">
348 <xslo:for-each select="marc:subfield">
349 <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
350 <xslo:if test="position() > 1">
352 <xslo:when test="contains('', @code)">
353 <xslo:text>--</xslo:text>
356 <xslo:value-of select="substring(' ', 1, 1)"/>
360 <xslo:value-of select="."/>
364 <xslo:value-of select="normalize-space($raw_heading)"/>
367 <xslo:template mode="index_heading" match="marc:datafield[@tag='411']">
368 <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">
369 <xslo:variable name="raw_heading">
370 <xslo:for-each select="marc:subfield">
371 <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">
372 <xslo:if test="position() > 1">
374 <xslo:when test="contains('vxyz', @code)">
375 <xslo:text>--</xslo:text>
378 <xslo:value-of select="substring(' ', 1, 1)"/>
382 <xslo:value-of select="."/>
386 <xslo:value-of select="normalize-space($raw_heading)"/>
389 <xslo:template mode="index_heading" match="marc:datafield[@tag='511']">
390 <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">
391 <xslo:variable name="raw_heading">
392 <xslo:for-each select="marc:subfield">
393 <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">
394 <xslo:if test="position() > 1">
396 <xslo:when test="contains('vxyz', @code)">
397 <xslo:text>--</xslo:text>
400 <xslo:value-of select="substring(' ', 1, 1)"/>
404 <xslo:value-of select="."/>
408 <xslo:value-of select="normalize-space($raw_heading)"/>
411 <xslo:template mode="index_heading" match="marc:datafield[@tag='130']">
412 <z:index name="Title-uniform-heading:w Title-uniform-heading:p Title-uniform-heading:s Heading:w Heading:p Heading:s">
413 <xslo:variable name="raw_heading">
414 <xslo:for-each select="marc:subfield">
415 <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">
416 <xslo:if test="position() > 1">
418 <xslo:when test="contains('vxyz', @code)">
419 <xslo:text>--</xslo:text>
422 <xslo:value-of select="substring(' ', 1, 1)"/>
426 <xslo:value-of select="."/>
430 <xslo:value-of select="normalize-space($raw_heading)"/>
432 <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
433 <xslo:variable name="raw_heading">
434 <xslo:for-each select="marc:subfield">
435 <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
436 <xslo:if test="position() > 1">
438 <xslo:when test="contains('', @code)">
439 <xslo:text>--</xslo:text>
442 <xslo:value-of select="substring(' ', 1, 1)"/>
446 <xslo:value-of select="."/>
450 <xslo:value-of select="normalize-space($raw_heading)"/>
453 <xslo:template mode="index_heading" match="marc:datafield[@tag='430']">
454 <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">
455 <xslo:variable name="raw_heading">
456 <xslo:for-each select="marc:subfield">
457 <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">
458 <xslo:if test="position() > 1">
460 <xslo:when test="contains('vxyz', @code)">
461 <xslo:text>--</xslo:text>
464 <xslo:value-of select="substring(' ', 1, 1)"/>
468 <xslo:value-of select="."/>
472 <xslo:value-of select="normalize-space($raw_heading)"/>
475 <xslo:template mode="index_heading" match="marc:datafield[@tag='530']">
476 <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">
477 <xslo:variable name="raw_heading">
478 <xslo:for-each select="marc:subfield">
479 <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">
480 <xslo:if test="position() > 1">
482 <xslo:when test="contains('vxyz', @code)">
483 <xslo:text>--</xslo:text>
486 <xslo:value-of select="substring(' ', 1, 1)"/>
490 <xslo:value-of select="."/>
494 <xslo:value-of select="normalize-space($raw_heading)"/>
497 <xslo:template mode="index_heading" match="marc:datafield[@tag='148']">
498 <z:index name="Chronological-term-heading:w Chronological-term-heading:p Chronological-term-heading:s Heading:w Heading:p Heading:s">
499 <xslo:variable name="raw_heading">
500 <xslo:for-each select="marc:subfield">
501 <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">
502 <xslo:if test="position() > 1">
504 <xslo:when test="contains('vxyz', @code)">
505 <xslo:text>--</xslo:text>
508 <xslo:value-of select="substring(' ', 1, 1)"/>
512 <xslo:value-of select="."/>
516 <xslo:value-of select="normalize-space($raw_heading)"/>
518 <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
519 <xslo:variable name="raw_heading">
520 <xslo:for-each select="marc:subfield">
521 <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
522 <xslo:if test="position() > 1">
524 <xslo:when test="contains('', @code)">
525 <xslo:text>--</xslo:text>
528 <xslo:value-of select="substring(' ', 1, 1)"/>
532 <xslo:value-of select="."/>
536 <xslo:value-of select="normalize-space($raw_heading)"/>
539 <xslo:template mode="index_heading" match="marc:datafield[@tag='448']">
540 <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">
541 <xslo:variable name="raw_heading">
542 <xslo:for-each select="marc:subfield">
543 <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">
544 <xslo:if test="position() > 1">
546 <xslo:when test="contains('vxyz', @code)">
547 <xslo:text>--</xslo:text>
550 <xslo:value-of select="substring(' ', 1, 1)"/>
554 <xslo:value-of select="."/>
558 <xslo:value-of select="normalize-space($raw_heading)"/>
561 <xslo:template mode="index_heading" match="marc:datafield[@tag='548']">
562 <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">
563 <xslo:variable name="raw_heading">
564 <xslo:for-each select="marc:subfield">
565 <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">
566 <xslo:if test="position() > 1">
568 <xslo:when test="contains('vxyz', @code)">
569 <xslo:text>--</xslo:text>
572 <xslo:value-of select="substring(' ', 1, 1)"/>
576 <xslo:value-of select="."/>
580 <xslo:value-of select="normalize-space($raw_heading)"/>
583 <xslo:template mode="index_heading" match="marc:datafield[@tag='150']">
584 <z:index name="Subject-topical-heading:w Subject-topical-heading:p Subject-topical-heading:s Heading:w Heading:p Heading:s">
585 <xslo:variable name="raw_heading">
586 <xslo:for-each select="marc:subfield">
587 <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">
588 <xslo:if test="position() > 1">
590 <xslo:when test="contains('vxyz', @code)">
591 <xslo:text>--</xslo:text>
594 <xslo:value-of select="substring(' ', 1, 1)"/>
598 <xslo:value-of select="."/>
602 <xslo:value-of select="normalize-space($raw_heading)"/>
604 <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
605 <xslo:variable name="raw_heading">
606 <xslo:for-each select="marc:subfield">
607 <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
608 <xslo:if test="position() > 1">
610 <xslo:when test="contains('', @code)">
611 <xslo:text>--</xslo:text>
614 <xslo:value-of select="substring(' ', 1, 1)"/>
618 <xslo:value-of select="."/>
622 <xslo:value-of select="normalize-space($raw_heading)"/>
625 <xslo:template mode="index_heading" match="marc:datafield[@tag='450']">
626 <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">
627 <xslo:variable name="raw_heading">
628 <xslo:for-each select="marc:subfield">
629 <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">
630 <xslo:if test="position() > 1">
632 <xslo:when test="contains('vxyz', @code)">
633 <xslo:text>--</xslo:text>
636 <xslo:value-of select="substring(' ', 1, 1)"/>
640 <xslo:value-of select="."/>
644 <xslo:value-of select="normalize-space($raw_heading)"/>
647 <xslo:template mode="index_heading" match="marc:datafield[@tag='550']">
648 <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">
649 <xslo:variable name="raw_heading">
650 <xslo:for-each select="marc:subfield">
651 <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">
652 <xslo:if test="position() > 1">
654 <xslo:when test="contains('vxyz', @code)">
655 <xslo:text>--</xslo:text>
658 <xslo:value-of select="substring(' ', 1, 1)"/>
662 <xslo:value-of select="."/>
666 <xslo:value-of select="normalize-space($raw_heading)"/>
669 <xslo:template mode="index_heading" match="marc:datafield[@tag='151']">
670 <z:index name="Name-geographic-heading:w Name-geographic-heading:p Name-geographic-heading:s Heading:w Heading:p Heading:s">
671 <xslo:variable name="raw_heading">
672 <xslo:for-each select="marc:subfield">
673 <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">
674 <xslo:if test="position() > 1">
676 <xslo:when test="contains('vxyz', @code)">
677 <xslo:text>--</xslo:text>
680 <xslo:value-of select="substring(' ', 1, 1)"/>
684 <xslo:value-of select="."/>
688 <xslo:value-of select="normalize-space($raw_heading)"/>
690 <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
691 <xslo:variable name="raw_heading">
692 <xslo:for-each select="marc:subfield">
693 <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
694 <xslo:if test="position() > 1">
696 <xslo:when test="contains('', @code)">
697 <xslo:text>--</xslo:text>
700 <xslo:value-of select="substring(' ', 1, 1)"/>
704 <xslo:value-of select="."/>
708 <xslo:value-of select="normalize-space($raw_heading)"/>
711 <xslo:template mode="index_heading" match="marc:datafield[@tag='451']">
712 <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">
713 <xslo:variable name="raw_heading">
714 <xslo:for-each select="marc:subfield">
715 <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">
716 <xslo:if test="position() > 1">
718 <xslo:when test="contains('vxyz', @code)">
719 <xslo:text>--</xslo:text>
722 <xslo:value-of select="substring(' ', 1, 1)"/>
726 <xslo:value-of select="."/>
730 <xslo:value-of select="normalize-space($raw_heading)"/>
733 <xslo:template mode="index_heading" match="marc:datafield[@tag='551']">
734 <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">
735 <xslo:variable name="raw_heading">
736 <xslo:for-each select="marc:subfield">
737 <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">
738 <xslo:if test="position() > 1">
740 <xslo:when test="contains('vxyz', @code)">
741 <xslo:text>--</xslo:text>
744 <xslo:value-of select="substring(' ', 1, 1)"/>
748 <xslo:value-of select="."/>
752 <xslo:value-of select="normalize-space($raw_heading)"/>
755 <xslo:template mode="index_heading" match="marc:datafield[@tag='155']">
756 <z:index name="Term-genre-form-heading:w Term-genre-form-heading:p Term-genre-form-heading:s Heading:w Heading:p Heading:s">
757 <xslo:variable name="raw_heading">
758 <xslo:for-each select="marc:subfield">
759 <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">
760 <xslo:if test="position() > 1">
762 <xslo:when test="contains('vxyz', @code)">
763 <xslo:text>--</xslo:text>
766 <xslo:value-of select="substring(' ', 1, 1)"/>
770 <xslo:value-of select="."/>
774 <xslo:value-of select="normalize-space($raw_heading)"/>
776 <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
777 <xslo:variable name="raw_heading">
778 <xslo:for-each select="marc:subfield">
779 <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
780 <xslo:if test="position() > 1">
782 <xslo:when test="contains('', @code)">
783 <xslo:text>--</xslo:text>
786 <xslo:value-of select="substring(' ', 1, 1)"/>
790 <xslo:value-of select="."/>
794 <xslo:value-of select="normalize-space($raw_heading)"/>
797 <xslo:template mode="index_heading" match="marc:datafield[@tag='455']">
798 <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">
799 <xslo:variable name="raw_heading">
800 <xslo:for-each select="marc:subfield">
801 <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">
802 <xslo:if test="position() > 1">
804 <xslo:when test="contains('vxyz', @code)">
805 <xslo:text>--</xslo:text>
808 <xslo:value-of select="substring(' ', 1, 1)"/>
812 <xslo:value-of select="."/>
816 <xslo:value-of select="normalize-space($raw_heading)"/>
819 <xslo:template mode="index_heading" match="marc:datafield[@tag='555']">
820 <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">
821 <xslo:variable name="raw_heading">
822 <xslo:for-each select="marc:subfield">
823 <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">
824 <xslo:if test="position() > 1">
826 <xslo:when test="contains('vxyz', @code)">
827 <xslo:text>--</xslo:text>
830 <xslo:value-of select="substring(' ', 1, 1)"/>
834 <xslo:value-of select="."/>
838 <xslo:value-of select="normalize-space($raw_heading)"/>
841 <xslo:template mode="index_heading" match="marc:datafield[@tag='180']">
842 <z:index name="General-subdivision:w General-subdivision:p General-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
843 <xslo:variable name="raw_heading">
844 <xslo:for-each select="marc:subfield">
845 <xslo:if test="contains('vxyz', @code)" name="General-subdivision:w General-subdivision:p General-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
846 <xslo:if test="position() > 1">
848 <xslo:when test="contains('vxyz', @code)">
849 <xslo:text>--</xslo:text>
852 <xslo:value-of select="substring(' ', 1, 1)"/>
856 <xslo:value-of select="."/>
860 <xslo:value-of select="normalize-space($raw_heading)"/>
863 <xslo:template mode="index_heading" match="marc:datafield[@tag='480']">
864 <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">
865 <xslo:variable name="raw_heading">
866 <xslo:for-each select="marc:subfield">
867 <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">
868 <xslo:if test="position() > 1">
870 <xslo:when test="contains('vxyz', @code)">
871 <xslo:text>--</xslo:text>
874 <xslo:value-of select="substring(' ', 1, 1)"/>
878 <xslo:value-of select="."/>
882 <xslo:value-of select="normalize-space($raw_heading)"/>
885 <xslo:template mode="index_heading" match="marc:datafield[@tag='580']">
886 <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">
887 <xslo:variable name="raw_heading">
888 <xslo:for-each select="marc:subfield">
889 <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">
890 <xslo:if test="position() > 1">
892 <xslo:when test="contains('vxyz', @code)">
893 <xslo:text>--</xslo:text>
896 <xslo:value-of select="substring(' ', 1, 1)"/>
900 <xslo:value-of select="."/>
904 <xslo:value-of select="normalize-space($raw_heading)"/>
907 <xslo:template mode="index_heading" match="marc:datafield[@tag='181']">
908 <z:index name="Geographic-subdivision:w Geographic-subdivision:p Geographic-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
909 <xslo:variable name="raw_heading">
910 <xslo:for-each select="marc:subfield">
911 <xslo:if test="contains('vxyz', @code)" name="Geographic-subdivision:w Geographic-subdivision:p Geographic-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
912 <xslo:if test="position() > 1">
914 <xslo:when test="contains('vxyz', @code)">
915 <xslo:text>--</xslo:text>
918 <xslo:value-of select="substring(' ', 1, 1)"/>
922 <xslo:value-of select="."/>
926 <xslo:value-of select="normalize-space($raw_heading)"/>
929 <xslo:template mode="index_heading" match="marc:datafield[@tag='481']">
930 <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">
931 <xslo:variable name="raw_heading">
932 <xslo:for-each select="marc:subfield">
933 <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">
934 <xslo:if test="position() > 1">
936 <xslo:when test="contains('vxyz', @code)">
937 <xslo:text>--</xslo:text>
940 <xslo:value-of select="substring(' ', 1, 1)"/>
944 <xslo:value-of select="."/>
948 <xslo:value-of select="normalize-space($raw_heading)"/>
951 <xslo:template mode="index_heading" match="marc:datafield[@tag='581']">
952 <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">
953 <xslo:variable name="raw_heading">
954 <xslo:for-each select="marc:subfield">
955 <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">
956 <xslo:if test="position() > 1">
958 <xslo:when test="contains('vxyz', @code)">
959 <xslo:text>--</xslo:text>
962 <xslo:value-of select="substring(' ', 1, 1)"/>
966 <xslo:value-of select="."/>
970 <xslo:value-of select="normalize-space($raw_heading)"/>
973 <xslo:template mode="index_heading" match="marc:datafield[@tag='182']">
974 <z:index name="Chronological-subdivision:w Chronological-subdivision:p Chronological-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
975 <xslo:variable name="raw_heading">
976 <xslo:for-each select="marc:subfield">
977 <xslo:if test="contains('vxyz', @code)" name="Chronological-subdivision:w Chronological-subdivision:p Chronological-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
978 <xslo:if test="position() > 1">
980 <xslo:when test="contains('vxyz', @code)">
981 <xslo:text>--</xslo:text>
984 <xslo:value-of select="substring(' ', 1, 1)"/>
988 <xslo:value-of select="."/>
992 <xslo:value-of select="normalize-space($raw_heading)"/>
995 <xslo:template mode="index_heading" match="marc:datafield[@tag='482']">
996 <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">
997 <xslo:variable name="raw_heading">
998 <xslo:for-each select="marc:subfield">
999 <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">
1000 <xslo:if test="position() > 1">
1002 <xslo:when test="contains('vxyz', @code)">
1003 <xslo:text>--</xslo:text>
1006 <xslo:value-of select="substring(' ', 1, 1)"/>
1010 <xslo:value-of select="."/>
1014 <xslo:value-of select="normalize-space($raw_heading)"/>
1017 <xslo:template mode="index_heading" match="marc:datafield[@tag='582']">
1018 <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">
1019 <xslo:variable name="raw_heading">
1020 <xslo:for-each select="marc:subfield">
1021 <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">
1022 <xslo:if test="position() > 1">
1024 <xslo:when test="contains('vxyz', @code)">
1025 <xslo:text>--</xslo:text>
1028 <xslo:value-of select="substring(' ', 1, 1)"/>
1032 <xslo:value-of select="."/>
1036 <xslo:value-of select="normalize-space($raw_heading)"/>
1039 <xslo:template mode="index_heading" match="marc:datafield[@tag='185']">
1040 <z:index name="Form-subdivision:w Form-subdivision:p Form-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
1041 <xslo:variable name="raw_heading">
1042 <xslo:for-each select="marc:subfield">
1043 <xslo:if test="contains('vxyz', @code)" name="Form-subdivision:w Form-subdivision:p Form-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
1044 <xslo:if test="position() > 1">
1046 <xslo:when test="contains('vxyz', @code)">
1047 <xslo:text>--</xslo:text>
1050 <xslo:value-of select="substring(' ', 1, 1)"/>
1054 <xslo:value-of select="."/>
1058 <xslo:value-of select="normalize-space($raw_heading)"/>
1061 <xslo:template mode="index_heading" match="marc:datafield[@tag='485']">
1062 <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">
1063 <xslo:variable name="raw_heading">
1064 <xslo:for-each select="marc:subfield">
1065 <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">
1066 <xslo:if test="position() > 1">
1068 <xslo:when test="contains('vxyz', @code)">
1069 <xslo:text>--</xslo:text>
1072 <xslo:value-of select="substring(' ', 1, 1)"/>
1076 <xslo:value-of select="."/>
1080 <xslo:value-of select="normalize-space($raw_heading)"/>
1083 <xslo:template mode="index_heading" match="marc:datafield[@tag='585']">
1084 <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">
1085 <xslo:variable name="raw_heading">
1086 <xslo:for-each select="marc:subfield">
1087 <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">
1088 <xslo:if test="position() > 1">
1090 <xslo:when test="contains('vxyz', @code)">
1091 <xslo:text>--</xslo:text>
1094 <xslo:value-of select="substring(' ', 1, 1)"/>
1098 <xslo:value-of select="."/>
1102 <xslo:value-of select="normalize-space($raw_heading)"/>
1105 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='100']">
1106 <z:index name="Match:w Match:p Match-heading:p Match-heading:s">
1107 <xslo:variable name="raw_heading">
1108 <xslo:for-each select="marc:subfield">
1109 <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Match:w Match:p Match-heading:p Match-heading:s">
1110 <xslo:if test="position() > 1">
1112 <xslo:when test="contains('vxyz', @code)">
1114 <xslo:when test="@code = $general_subdivision_subfield">
1115 <xslo:text> generalsubdiv </xslo:text>
1117 <xslo:when test="@code = $form_subdivision_subfield">
1118 <xslo:text> formsubdiv </xslo:text>
1120 <xslo:when test="@code = $chronological_subdivision_subfield">
1121 <xslo:text> chronologicalsubdiv </xslo:text>
1123 <xslo:when test="@code = $geographic_subdivision_subfield">
1124 <xslo:text> geographicsubdiv </xslo:text>
1129 <xslo:value-of select="substring(' ', 1, 1)"/>
1133 <xslo:call-template name="chopPunctuation">
1134 <xslo:with-param name="chopString">
1135 <xslo:value-of select="."/>
1137 </xslo:call-template>
1141 <xslo:value-of select="normalize-space($raw_heading)"/>
1144 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='400']">
1145 <z:index name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s">
1146 <xslo:variable name="raw_heading">
1147 <xslo:for-each select="marc:subfield">
1148 <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s">
1149 <xslo:if test="position() > 1">
1151 <xslo:when test="contains('vxyz', @code)">
1153 <xslo:when test="@code = $general_subdivision_subfield">
1154 <xslo:text> generalsubdiv </xslo:text>
1156 <xslo:when test="@code = $form_subdivision_subfield">
1157 <xslo:text> formsubdiv </xslo:text>
1159 <xslo:when test="@code = $chronological_subdivision_subfield">
1160 <xslo:text> chronologicalsubdiv </xslo:text>
1162 <xslo:when test="@code = $geographic_subdivision_subfield">
1163 <xslo:text> geographicsubdiv </xslo:text>
1168 <xslo:value-of select="substring(' ', 1, 1)"/>
1172 <xslo:call-template name="chopPunctuation">
1173 <xslo:with-param name="chopString">
1174 <xslo:value-of select="."/>
1176 </xslo:call-template>
1180 <xslo:value-of select="normalize-space($raw_heading)"/>
1183 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='500']">
1184 <z:index name="Match:w Match:p">
1185 <xslo:variable name="raw_heading">
1186 <xslo:for-each select="marc:subfield">
1187 <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Match:w Match:p">
1188 <xslo:if test="position() > 1">
1190 <xslo:when test="contains('vxyz', @code)">
1192 <xslo:when test="@code = $general_subdivision_subfield">
1193 <xslo:text> generalsubdiv </xslo:text>
1195 <xslo:when test="@code = $form_subdivision_subfield">
1196 <xslo:text> formsubdiv </xslo:text>
1198 <xslo:when test="@code = $chronological_subdivision_subfield">
1199 <xslo:text> chronologicalsubdiv </xslo:text>
1201 <xslo:when test="@code = $geographic_subdivision_subfield">
1202 <xslo:text> geographicsubdiv </xslo:text>
1207 <xslo:value-of select="substring(' ', 1, 1)"/>
1211 <xslo:call-template name="chopPunctuation">
1212 <xslo:with-param name="chopString">
1213 <xslo:value-of select="."/>
1215 </xslo:call-template>
1219 <xslo:value-of select="normalize-space($raw_heading)"/>
1222 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='110']">
1223 <z:index name="Match:w Match:p Match-heading:p Match-heading:s">
1224 <xslo:variable name="raw_heading">
1225 <xslo:for-each select="marc:subfield">
1226 <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Match:w Match:p Match-heading:p Match-heading:s">
1227 <xslo:if test="position() > 1">
1229 <xslo:when test="contains('vxyz', @code)">
1231 <xslo:when test="@code = $general_subdivision_subfield">
1232 <xslo:text> generalsubdiv </xslo:text>
1234 <xslo:when test="@code = $form_subdivision_subfield">
1235 <xslo:text> formsubdiv </xslo:text>
1237 <xslo:when test="@code = $chronological_subdivision_subfield">
1238 <xslo:text> chronologicalsubdiv </xslo:text>
1240 <xslo:when test="@code = $geographic_subdivision_subfield">
1241 <xslo:text> geographicsubdiv </xslo:text>
1246 <xslo:value-of select="substring(' ', 1, 1)"/>
1250 <xslo:call-template name="chopPunctuation">
1251 <xslo:with-param name="chopString">
1252 <xslo:value-of select="."/>
1254 </xslo:call-template>
1258 <xslo:value-of select="normalize-space($raw_heading)"/>
1261 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='410']">
1262 <z:index name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s">
1263 <xslo:variable name="raw_heading">
1264 <xslo:for-each select="marc:subfield">
1265 <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s">
1266 <xslo:if test="position() > 1">
1268 <xslo:when test="contains('vxyz', @code)">
1270 <xslo:when test="@code = $general_subdivision_subfield">
1271 <xslo:text> generalsubdiv </xslo:text>
1273 <xslo:when test="@code = $form_subdivision_subfield">
1274 <xslo:text> formsubdiv </xslo:text>
1276 <xslo:when test="@code = $chronological_subdivision_subfield">
1277 <xslo:text> chronologicalsubdiv </xslo:text>
1279 <xslo:when test="@code = $geographic_subdivision_subfield">
1280 <xslo:text> geographicsubdiv </xslo:text>
1285 <xslo:value-of select="substring(' ', 1, 1)"/>
1289 <xslo:call-template name="chopPunctuation">
1290 <xslo:with-param name="chopString">
1291 <xslo:value-of select="."/>
1293 </xslo:call-template>
1297 <xslo:value-of select="normalize-space($raw_heading)"/>
1300 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='510']">
1301 <z:index name="Match:w Match:p">
1302 <xslo:variable name="raw_heading">
1303 <xslo:for-each select="marc:subfield">
1304 <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Match:w Match:p">
1305 <xslo:if test="position() > 1">
1307 <xslo:when test="contains('vxyz', @code)">
1309 <xslo:when test="@code = $general_subdivision_subfield">
1310 <xslo:text> generalsubdiv </xslo:text>
1312 <xslo:when test="@code = $form_subdivision_subfield">
1313 <xslo:text> formsubdiv </xslo:text>
1315 <xslo:when test="@code = $chronological_subdivision_subfield">
1316 <xslo:text> chronologicalsubdiv </xslo:text>
1318 <xslo:when test="@code = $geographic_subdivision_subfield">
1319 <xslo:text> geographicsubdiv </xslo:text>
1324 <xslo:value-of select="substring(' ', 1, 1)"/>
1328 <xslo:call-template name="chopPunctuation">
1329 <xslo:with-param name="chopString">
1330 <xslo:value-of select="."/>
1332 </xslo:call-template>
1336 <xslo:value-of select="normalize-space($raw_heading)"/>
1339 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='111']">
1340 <z:index name="Match:w Match:p Match-heading:p Match-heading:s">
1341 <xslo:variable name="raw_heading">
1342 <xslo:for-each select="marc:subfield">
1343 <xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Match:w Match:p Match-heading:p Match-heading:s">
1344 <xslo:if test="position() > 1">
1346 <xslo:when test="contains('vxyz', @code)">
1348 <xslo:when test="@code = $general_subdivision_subfield">
1349 <xslo:text> generalsubdiv </xslo:text>
1351 <xslo:when test="@code = $form_subdivision_subfield">
1352 <xslo:text> formsubdiv </xslo:text>
1354 <xslo:when test="@code = $chronological_subdivision_subfield">
1355 <xslo:text> chronologicalsubdiv </xslo:text>
1357 <xslo:when test="@code = $geographic_subdivision_subfield">
1358 <xslo:text> geographicsubdiv </xslo:text>
1363 <xslo:value-of select="substring(' ', 1, 1)"/>
1367 <xslo:call-template name="chopPunctuation">
1368 <xslo:with-param name="chopString">
1369 <xslo:value-of select="."/>
1371 </xslo:call-template>
1375 <xslo:value-of select="normalize-space($raw_heading)"/>
1378 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='411']">
1379 <z:index name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s">
1380 <xslo:variable name="raw_heading">
1381 <xslo:for-each select="marc:subfield">
1382 <xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s">
1383 <xslo:if test="position() > 1">
1385 <xslo:when test="contains('vxyz', @code)">
1387 <xslo:when test="@code = $general_subdivision_subfield">
1388 <xslo:text> generalsubdiv </xslo:text>
1390 <xslo:when test="@code = $form_subdivision_subfield">
1391 <xslo:text> formsubdiv </xslo:text>
1393 <xslo:when test="@code = $chronological_subdivision_subfield">
1394 <xslo:text> chronologicalsubdiv </xslo:text>
1396 <xslo:when test="@code = $geographic_subdivision_subfield">
1397 <xslo:text> geographicsubdiv </xslo:text>
1402 <xslo:value-of select="substring(' ', 1, 1)"/>
1406 <xslo:call-template name="chopPunctuation">
1407 <xslo:with-param name="chopString">
1408 <xslo:value-of select="."/>
1410 </xslo:call-template>
1414 <xslo:value-of select="normalize-space($raw_heading)"/>
1417 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='511']">
1418 <z:index name="Match:w Match:p">
1419 <xslo:variable name="raw_heading">
1420 <xslo:for-each select="marc:subfield">
1421 <xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Match:w Match:p">
1422 <xslo:if test="position() > 1">
1424 <xslo:when test="contains('vxyz', @code)">
1426 <xslo:when test="@code = $general_subdivision_subfield">
1427 <xslo:text> generalsubdiv </xslo:text>
1429 <xslo:when test="@code = $form_subdivision_subfield">
1430 <xslo:text> formsubdiv </xslo:text>
1432 <xslo:when test="@code = $chronological_subdivision_subfield">
1433 <xslo:text> chronologicalsubdiv </xslo:text>
1435 <xslo:when test="@code = $geographic_subdivision_subfield">
1436 <xslo:text> geographicsubdiv </xslo:text>
1441 <xslo:value-of select="substring(' ', 1, 1)"/>
1445 <xslo:call-template name="chopPunctuation">
1446 <xslo:with-param name="chopString">
1447 <xslo:value-of select="."/>
1449 </xslo:call-template>
1453 <xslo:value-of select="normalize-space($raw_heading)"/>
1456 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='130']">
1457 <z:index name="Match:w Match:p Match-heading:p Match-heading:s">
1458 <xslo:variable name="raw_heading">
1459 <xslo:for-each select="marc:subfield">
1460 <xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Match:w Match:p Match-heading:p Match-heading:s">
1461 <xslo:if test="position() > 1">
1463 <xslo:when test="contains('vxyz', @code)">
1465 <xslo:when test="@code = $general_subdivision_subfield">
1466 <xslo:text> generalsubdiv </xslo:text>
1468 <xslo:when test="@code = $form_subdivision_subfield">
1469 <xslo:text> formsubdiv </xslo:text>
1471 <xslo:when test="@code = $chronological_subdivision_subfield">
1472 <xslo:text> chronologicalsubdiv </xslo:text>
1474 <xslo:when test="@code = $geographic_subdivision_subfield">
1475 <xslo:text> geographicsubdiv </xslo:text>
1480 <xslo:value-of select="substring(' ', 1, 1)"/>
1484 <xslo:call-template name="chopPunctuation">
1485 <xslo:with-param name="chopString">
1486 <xslo:value-of select="."/>
1488 </xslo:call-template>
1492 <xslo:value-of select="normalize-space($raw_heading)"/>
1495 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='430']">
1496 <z:index name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s">
1497 <xslo:variable name="raw_heading">
1498 <xslo:for-each select="marc:subfield">
1499 <xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s">
1500 <xslo:if test="position() > 1">
1502 <xslo:when test="contains('vxyz', @code)">
1504 <xslo:when test="@code = $general_subdivision_subfield">
1505 <xslo:text> generalsubdiv </xslo:text>
1507 <xslo:when test="@code = $form_subdivision_subfield">
1508 <xslo:text> formsubdiv </xslo:text>
1510 <xslo:when test="@code = $chronological_subdivision_subfield">
1511 <xslo:text> chronologicalsubdiv </xslo:text>
1513 <xslo:when test="@code = $geographic_subdivision_subfield">
1514 <xslo:text> geographicsubdiv </xslo:text>
1519 <xslo:value-of select="substring(' ', 1, 1)"/>
1523 <xslo:call-template name="chopPunctuation">
1524 <xslo:with-param name="chopString">
1525 <xslo:value-of select="."/>
1527 </xslo:call-template>
1531 <xslo:value-of select="normalize-space($raw_heading)"/>
1534 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='530']">
1535 <z:index name="Match:w Match:p">
1536 <xslo:variable name="raw_heading">
1537 <xslo:for-each select="marc:subfield">
1538 <xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Match:w Match:p">
1539 <xslo:if test="position() > 1">
1541 <xslo:when test="contains('vxyz', @code)">
1543 <xslo:when test="@code = $general_subdivision_subfield">
1544 <xslo:text> generalsubdiv </xslo:text>
1546 <xslo:when test="@code = $form_subdivision_subfield">
1547 <xslo:text> formsubdiv </xslo:text>
1549 <xslo:when test="@code = $chronological_subdivision_subfield">
1550 <xslo:text> chronologicalsubdiv </xslo:text>
1552 <xslo:when test="@code = $geographic_subdivision_subfield">
1553 <xslo:text> geographicsubdiv </xslo:text>
1558 <xslo:value-of select="substring(' ', 1, 1)"/>
1562 <xslo:call-template name="chopPunctuation">
1563 <xslo:with-param name="chopString">
1564 <xslo:value-of select="."/>
1566 </xslo:call-template>
1570 <xslo:value-of select="normalize-space($raw_heading)"/>
1573 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='148']">
1574 <z:index name="Match:w Match:p Match-heading:p Match-heading:s">
1575 <xslo:variable name="raw_heading">
1576 <xslo:for-each select="marc:subfield">
1577 <xslo:if test="contains('avxyz', @code)" name="Match:w Match:p Match-heading:p Match-heading:s">
1578 <xslo:if test="position() > 1">
1580 <xslo:when test="contains('vxyz', @code)">
1582 <xslo:when test="@code = $general_subdivision_subfield">
1583 <xslo:text> generalsubdiv </xslo:text>
1585 <xslo:when test="@code = $form_subdivision_subfield">
1586 <xslo:text> formsubdiv </xslo:text>
1588 <xslo:when test="@code = $chronological_subdivision_subfield">
1589 <xslo:text> chronologicalsubdiv </xslo:text>
1591 <xslo:when test="@code = $geographic_subdivision_subfield">
1592 <xslo:text> geographicsubdiv </xslo:text>
1597 <xslo:value-of select="substring(' ', 1, 1)"/>
1601 <xslo:call-template name="chopPunctuation">
1602 <xslo:with-param name="chopString">
1603 <xslo:value-of select="."/>
1605 </xslo:call-template>
1609 <xslo:value-of select="normalize-space($raw_heading)"/>
1612 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='448']">
1613 <z:index name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s">
1614 <xslo:variable name="raw_heading">
1615 <xslo:for-each select="marc:subfield">
1616 <xslo:if test="contains('avxyz', @code)" name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s">
1617 <xslo:if test="position() > 1">
1619 <xslo:when test="contains('vxyz', @code)">
1621 <xslo:when test="@code = $general_subdivision_subfield">
1622 <xslo:text> generalsubdiv </xslo:text>
1624 <xslo:when test="@code = $form_subdivision_subfield">
1625 <xslo:text> formsubdiv </xslo:text>
1627 <xslo:when test="@code = $chronological_subdivision_subfield">
1628 <xslo:text> chronologicalsubdiv </xslo:text>
1630 <xslo:when test="@code = $geographic_subdivision_subfield">
1631 <xslo:text> geographicsubdiv </xslo:text>
1636 <xslo:value-of select="substring(' ', 1, 1)"/>
1640 <xslo:call-template name="chopPunctuation">
1641 <xslo:with-param name="chopString">
1642 <xslo:value-of select="."/>
1644 </xslo:call-template>
1648 <xslo:value-of select="normalize-space($raw_heading)"/>
1651 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='548']">
1652 <z:index name="Match:w Match:p">
1653 <xslo:variable name="raw_heading">
1654 <xslo:for-each select="marc:subfield">
1655 <xslo:if test="contains('avxyz', @code)" name="Match:w Match:p">
1656 <xslo:if test="position() > 1">
1658 <xslo:when test="contains('vxyz', @code)">
1660 <xslo:when test="@code = $general_subdivision_subfield">
1661 <xslo:text> generalsubdiv </xslo:text>
1663 <xslo:when test="@code = $form_subdivision_subfield">
1664 <xslo:text> formsubdiv </xslo:text>
1666 <xslo:when test="@code = $chronological_subdivision_subfield">
1667 <xslo:text> chronologicalsubdiv </xslo:text>
1669 <xslo:when test="@code = $geographic_subdivision_subfield">
1670 <xslo:text> geographicsubdiv </xslo:text>
1675 <xslo:value-of select="substring(' ', 1, 1)"/>
1679 <xslo:call-template name="chopPunctuation">
1680 <xslo:with-param name="chopString">
1681 <xslo:value-of select="."/>
1683 </xslo:call-template>
1687 <xslo:value-of select="normalize-space($raw_heading)"/>
1690 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='150']">
1691 <z:index name="Match:w Match:p Match-heading:p Match-heading:s">
1692 <xslo:variable name="raw_heading">
1693 <xslo:for-each select="marc:subfield">
1694 <xslo:if test="contains('abvxyz', @code)" name="Match:w Match:p Match-heading:p Match-heading: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:call-template name="chopPunctuation">
1719 <xslo:with-param name="chopString">
1720 <xslo:value-of select="."/>
1722 </xslo:call-template>
1726 <xslo:value-of select="normalize-space($raw_heading)"/>
1729 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='450']">
1730 <z:index name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s">
1731 <xslo:variable name="raw_heading">
1732 <xslo:for-each select="marc:subfield">
1733 <xslo:if test="contains('abvxyz', @code)" name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s">
1734 <xslo:if test="position() > 1">
1736 <xslo:when test="contains('vxyz', @code)">
1738 <xslo:when test="@code = $general_subdivision_subfield">
1739 <xslo:text> generalsubdiv </xslo:text>
1741 <xslo:when test="@code = $form_subdivision_subfield">
1742 <xslo:text> formsubdiv </xslo:text>
1744 <xslo:when test="@code = $chronological_subdivision_subfield">
1745 <xslo:text> chronologicalsubdiv </xslo:text>
1747 <xslo:when test="@code = $geographic_subdivision_subfield">
1748 <xslo:text> geographicsubdiv </xslo:text>
1753 <xslo:value-of select="substring(' ', 1, 1)"/>
1757 <xslo:call-template name="chopPunctuation">
1758 <xslo:with-param name="chopString">
1759 <xslo:value-of select="."/>
1761 </xslo:call-template>
1765 <xslo:value-of select="normalize-space($raw_heading)"/>
1768 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='550']">
1769 <z:index name="Match:w Match:p">
1770 <xslo:variable name="raw_heading">
1771 <xslo:for-each select="marc:subfield">
1772 <xslo:if test="contains('abvxyz', @code)" name="Match:w Match:p">
1773 <xslo:if test="position() > 1">
1775 <xslo:when test="contains('vxyz', @code)">
1777 <xslo:when test="@code = $general_subdivision_subfield">
1778 <xslo:text> generalsubdiv </xslo:text>
1780 <xslo:when test="@code = $form_subdivision_subfield">
1781 <xslo:text> formsubdiv </xslo:text>
1783 <xslo:when test="@code = $chronological_subdivision_subfield">
1784 <xslo:text> chronologicalsubdiv </xslo:text>
1786 <xslo:when test="@code = $geographic_subdivision_subfield">
1787 <xslo:text> geographicsubdiv </xslo:text>
1792 <xslo:value-of select="substring(' ', 1, 1)"/>
1796 <xslo:call-template name="chopPunctuation">
1797 <xslo:with-param name="chopString">
1798 <xslo:value-of select="."/>
1800 </xslo:call-template>
1804 <xslo:value-of select="normalize-space($raw_heading)"/>
1807 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='151']">
1808 <z:index name="Match:w Match:p Match-heading:p Match-heading:s">
1809 <xslo:variable name="raw_heading">
1810 <xslo:for-each select="marc:subfield">
1811 <xslo:if test="contains('avxyz', @code)" name="Match:w Match:p Match-heading:p Match-heading:s">
1812 <xslo:if test="position() > 1">
1814 <xslo:when test="contains('vxyz', @code)">
1816 <xslo:when test="@code = $general_subdivision_subfield">
1817 <xslo:text> generalsubdiv </xslo:text>
1819 <xslo:when test="@code = $form_subdivision_subfield">
1820 <xslo:text> formsubdiv </xslo:text>
1822 <xslo:when test="@code = $chronological_subdivision_subfield">
1823 <xslo:text> chronologicalsubdiv </xslo:text>
1825 <xslo:when test="@code = $geographic_subdivision_subfield">
1826 <xslo:text> geographicsubdiv </xslo:text>
1831 <xslo:value-of select="substring(' ', 1, 1)"/>
1835 <xslo:call-template name="chopPunctuation">
1836 <xslo:with-param name="chopString">
1837 <xslo:value-of select="."/>
1839 </xslo:call-template>
1843 <xslo:value-of select="normalize-space($raw_heading)"/>
1846 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='451']">
1847 <z:index name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s">
1848 <xslo:variable name="raw_heading">
1849 <xslo:for-each select="marc:subfield">
1850 <xslo:if test="contains('avxyz', @code)" name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s">
1851 <xslo:if test="position() > 1">
1853 <xslo:when test="contains('vxyz', @code)">
1855 <xslo:when test="@code = $general_subdivision_subfield">
1856 <xslo:text> generalsubdiv </xslo:text>
1858 <xslo:when test="@code = $form_subdivision_subfield">
1859 <xslo:text> formsubdiv </xslo:text>
1861 <xslo:when test="@code = $chronological_subdivision_subfield">
1862 <xslo:text> chronologicalsubdiv </xslo:text>
1864 <xslo:when test="@code = $geographic_subdivision_subfield">
1865 <xslo:text> geographicsubdiv </xslo:text>
1870 <xslo:value-of select="substring(' ', 1, 1)"/>
1874 <xslo:call-template name="chopPunctuation">
1875 <xslo:with-param name="chopString">
1876 <xslo:value-of select="."/>
1878 </xslo:call-template>
1882 <xslo:value-of select="normalize-space($raw_heading)"/>
1885 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='551']">
1886 <z:index name="Match:w Match:p">
1887 <xslo:variable name="raw_heading">
1888 <xslo:for-each select="marc:subfield">
1889 <xslo:if test="contains('avxyz', @code)" name="Match:w Match:p">
1890 <xslo:if test="position() > 1">
1892 <xslo:when test="contains('vxyz', @code)">
1894 <xslo:when test="@code = $general_subdivision_subfield">
1895 <xslo:text> generalsubdiv </xslo:text>
1897 <xslo:when test="@code = $form_subdivision_subfield">
1898 <xslo:text> formsubdiv </xslo:text>
1900 <xslo:when test="@code = $chronological_subdivision_subfield">
1901 <xslo:text> chronologicalsubdiv </xslo:text>
1903 <xslo:when test="@code = $geographic_subdivision_subfield">
1904 <xslo:text> geographicsubdiv </xslo:text>
1909 <xslo:value-of select="substring(' ', 1, 1)"/>
1913 <xslo:call-template name="chopPunctuation">
1914 <xslo:with-param name="chopString">
1915 <xslo:value-of select="."/>
1917 </xslo:call-template>
1921 <xslo:value-of select="normalize-space($raw_heading)"/>
1924 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='155']">
1925 <z:index name="Match:w Match:p Match-heading:p Match-heading:s">
1926 <xslo:variable name="raw_heading">
1927 <xslo:for-each select="marc:subfield">
1928 <xslo:if test="contains('avxyz', @code)" name="Match:w Match:p Match-heading:p Match-heading:s">
1929 <xslo:if test="position() > 1">
1931 <xslo:when test="contains('vxyz', @code)">
1933 <xslo:when test="@code = $general_subdivision_subfield">
1934 <xslo:text> generalsubdiv </xslo:text>
1936 <xslo:when test="@code = $form_subdivision_subfield">
1937 <xslo:text> formsubdiv </xslo:text>
1939 <xslo:when test="@code = $chronological_subdivision_subfield">
1940 <xslo:text> chronologicalsubdiv </xslo:text>
1942 <xslo:when test="@code = $geographic_subdivision_subfield">
1943 <xslo:text> geographicsubdiv </xslo:text>
1948 <xslo:value-of select="substring(' ', 1, 1)"/>
1952 <xslo:call-template name="chopPunctuation">
1953 <xslo:with-param name="chopString">
1954 <xslo:value-of select="."/>
1956 </xslo:call-template>
1960 <xslo:value-of select="normalize-space($raw_heading)"/>
1963 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='455']">
1964 <z:index name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s">
1965 <xslo:variable name="raw_heading">
1966 <xslo:for-each select="marc:subfield">
1967 <xslo:if test="contains('avxyz', @code)" name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s">
1968 <xslo:if test="position() > 1">
1970 <xslo:when test="contains('vxyz', @code)">
1972 <xslo:when test="@code = $general_subdivision_subfield">
1973 <xslo:text> generalsubdiv </xslo:text>
1975 <xslo:when test="@code = $form_subdivision_subfield">
1976 <xslo:text> formsubdiv </xslo:text>
1978 <xslo:when test="@code = $chronological_subdivision_subfield">
1979 <xslo:text> chronologicalsubdiv </xslo:text>
1981 <xslo:when test="@code = $geographic_subdivision_subfield">
1982 <xslo:text> geographicsubdiv </xslo:text>
1987 <xslo:value-of select="substring(' ', 1, 1)"/>
1991 <xslo:call-template name="chopPunctuation">
1992 <xslo:with-param name="chopString">
1993 <xslo:value-of select="."/>
1995 </xslo:call-template>
1999 <xslo:value-of select="normalize-space($raw_heading)"/>
2002 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='555']">
2003 <z:index name="Match:w Match:p">
2004 <xslo:variable name="raw_heading">
2005 <xslo:for-each select="marc:subfield">
2006 <xslo:if test="contains('avxyz', @code)" name="Match:w Match:p">
2007 <xslo:if test="position() > 1">
2009 <xslo:when test="contains('vxyz', @code)">
2011 <xslo:when test="@code = $general_subdivision_subfield">
2012 <xslo:text> generalsubdiv </xslo:text>
2014 <xslo:when test="@code = $form_subdivision_subfield">
2015 <xslo:text> formsubdiv </xslo:text>
2017 <xslo:when test="@code = $chronological_subdivision_subfield">
2018 <xslo:text> chronologicalsubdiv </xslo:text>
2020 <xslo:when test="@code = $geographic_subdivision_subfield">
2021 <xslo:text> geographicsubdiv </xslo:text>
2026 <xslo:value-of select="substring(' ', 1, 1)"/>
2030 <xslo:call-template name="chopPunctuation">
2031 <xslo:with-param name="chopString">
2032 <xslo:value-of select="."/>
2034 </xslo:call-template>
2038 <xslo:value-of select="normalize-space($raw_heading)"/>
2041 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='180']">
2042 <z:index name="Match-subdivision:p Match-subdivision:s">
2043 <xslo:variable name="raw_heading">
2044 <xslo:for-each select="marc:subfield">
2045 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision:p Match-subdivision:s">
2046 <xslo:if test="position() > 1">
2048 <xslo:when test="contains('vxyz', @code)">
2050 <xslo:when test="@code = $general_subdivision_subfield">
2051 <xslo:text> generalsubdiv </xslo:text>
2053 <xslo:when test="@code = $form_subdivision_subfield">
2054 <xslo:text> formsubdiv </xslo:text>
2056 <xslo:when test="@code = $chronological_subdivision_subfield">
2057 <xslo:text> chronologicalsubdiv </xslo:text>
2059 <xslo:when test="@code = $geographic_subdivision_subfield">
2060 <xslo:text> geographicsubdiv </xslo:text>
2065 <xslo:value-of select="substring(' ', 1, 1)"/>
2069 <xslo:call-template name="chopPunctuation">
2070 <xslo:with-param name="chopString">
2071 <xslo:value-of select="."/>
2073 </xslo:call-template>
2077 <xslo:value-of select="normalize-space($raw_heading)"/>
2080 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='480']">
2081 <z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
2082 <xslo:variable name="raw_heading">
2083 <xslo:for-each select="marc:subfield">
2084 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
2085 <xslo:if test="position() > 1">
2087 <xslo:when test="contains('vxyz', @code)">
2089 <xslo:when test="@code = $general_subdivision_subfield">
2090 <xslo:text> generalsubdiv </xslo:text>
2092 <xslo:when test="@code = $form_subdivision_subfield">
2093 <xslo:text> formsubdiv </xslo:text>
2095 <xslo:when test="@code = $chronological_subdivision_subfield">
2096 <xslo:text> chronologicalsubdiv </xslo:text>
2098 <xslo:when test="@code = $geographic_subdivision_subfield">
2099 <xslo:text> geographicsubdiv </xslo:text>
2104 <xslo:value-of select="substring(' ', 1, 1)"/>
2108 <xslo:call-template name="chopPunctuation">
2109 <xslo:with-param name="chopString">
2110 <xslo:value-of select="."/>
2112 </xslo:call-template>
2116 <xslo:value-of select="normalize-space($raw_heading)"/>
2119 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='181']">
2120 <z:index name="Match-subdivision:p Match-subdivision:s">
2121 <xslo:variable name="raw_heading">
2122 <xslo:for-each select="marc:subfield">
2123 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision:p Match-subdivision:s">
2124 <xslo:if test="position() > 1">
2126 <xslo:when test="contains('vxyz', @code)">
2128 <xslo:when test="@code = $general_subdivision_subfield">
2129 <xslo:text> generalsubdiv </xslo:text>
2131 <xslo:when test="@code = $form_subdivision_subfield">
2132 <xslo:text> formsubdiv </xslo:text>
2134 <xslo:when test="@code = $chronological_subdivision_subfield">
2135 <xslo:text> chronologicalsubdiv </xslo:text>
2137 <xslo:when test="@code = $geographic_subdivision_subfield">
2138 <xslo:text> geographicsubdiv </xslo:text>
2143 <xslo:value-of select="substring(' ', 1, 1)"/>
2147 <xslo:call-template name="chopPunctuation">
2148 <xslo:with-param name="chopString">
2149 <xslo:value-of select="."/>
2151 </xslo:call-template>
2155 <xslo:value-of select="normalize-space($raw_heading)"/>
2158 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='481']">
2159 <z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
2160 <xslo:variable name="raw_heading">
2161 <xslo:for-each select="marc:subfield">
2162 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
2163 <xslo:if test="position() > 1">
2165 <xslo:when test="contains('vxyz', @code)">
2167 <xslo:when test="@code = $general_subdivision_subfield">
2168 <xslo:text> generalsubdiv </xslo:text>
2170 <xslo:when test="@code = $form_subdivision_subfield">
2171 <xslo:text> formsubdiv </xslo:text>
2173 <xslo:when test="@code = $chronological_subdivision_subfield">
2174 <xslo:text> chronologicalsubdiv </xslo:text>
2176 <xslo:when test="@code = $geographic_subdivision_subfield">
2177 <xslo:text> geographicsubdiv </xslo:text>
2182 <xslo:value-of select="substring(' ', 1, 1)"/>
2186 <xslo:call-template name="chopPunctuation">
2187 <xslo:with-param name="chopString">
2188 <xslo:value-of select="."/>
2190 </xslo:call-template>
2194 <xslo:value-of select="normalize-space($raw_heading)"/>
2197 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='182']">
2198 <z:index name="Match-subdivision:p Match-subdivision:s">
2199 <xslo:variable name="raw_heading">
2200 <xslo:for-each select="marc:subfield">
2201 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision:p Match-subdivision:s">
2202 <xslo:if test="position() > 1">
2204 <xslo:when test="contains('vxyz', @code)">
2206 <xslo:when test="@code = $general_subdivision_subfield">
2207 <xslo:text> generalsubdiv </xslo:text>
2209 <xslo:when test="@code = $form_subdivision_subfield">
2210 <xslo:text> formsubdiv </xslo:text>
2212 <xslo:when test="@code = $chronological_subdivision_subfield">
2213 <xslo:text> chronologicalsubdiv </xslo:text>
2215 <xslo:when test="@code = $geographic_subdivision_subfield">
2216 <xslo:text> geographicsubdiv </xslo:text>
2221 <xslo:value-of select="substring(' ', 1, 1)"/>
2225 <xslo:call-template name="chopPunctuation">
2226 <xslo:with-param name="chopString">
2227 <xslo:value-of select="."/>
2229 </xslo:call-template>
2233 <xslo:value-of select="normalize-space($raw_heading)"/>
2236 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='482']">
2237 <z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
2238 <xslo:variable name="raw_heading">
2239 <xslo:for-each select="marc:subfield">
2240 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
2241 <xslo:if test="position() > 1">
2243 <xslo:when test="contains('vxyz', @code)">
2245 <xslo:when test="@code = $general_subdivision_subfield">
2246 <xslo:text> generalsubdiv </xslo:text>
2248 <xslo:when test="@code = $form_subdivision_subfield">
2249 <xslo:text> formsubdiv </xslo:text>
2251 <xslo:when test="@code = $chronological_subdivision_subfield">
2252 <xslo:text> chronologicalsubdiv </xslo:text>
2254 <xslo:when test="@code = $geographic_subdivision_subfield">
2255 <xslo:text> geographicsubdiv </xslo:text>
2260 <xslo:value-of select="substring(' ', 1, 1)"/>
2264 <xslo:call-template name="chopPunctuation">
2265 <xslo:with-param name="chopString">
2266 <xslo:value-of select="."/>
2268 </xslo:call-template>
2272 <xslo:value-of select="normalize-space($raw_heading)"/>
2275 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='485']">
2276 <z:index name="Match-subdivision:p Match-subdivision:s">
2277 <xslo:variable name="raw_heading">
2278 <xslo:for-each select="marc:subfield">
2279 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision:p Match-subdivision:s">
2280 <xslo:if test="position() > 1">
2282 <xslo:when test="contains('vxyz', @code)">
2284 <xslo:when test="@code = $general_subdivision_subfield">
2285 <xslo:text> generalsubdiv </xslo:text>
2287 <xslo:when test="@code = $form_subdivision_subfield">
2288 <xslo:text> formsubdiv </xslo:text>
2290 <xslo:when test="@code = $chronological_subdivision_subfield">
2291 <xslo:text> chronologicalsubdiv </xslo:text>
2293 <xslo:when test="@code = $geographic_subdivision_subfield">
2294 <xslo:text> geographicsubdiv </xslo:text>
2299 <xslo:value-of select="substring(' ', 1, 1)"/>
2303 <xslo:call-template name="chopPunctuation">
2304 <xslo:with-param name="chopString">
2305 <xslo:value-of select="."/>
2307 </xslo:call-template>
2311 <xslo:value-of select="normalize-space($raw_heading)"/>
2314 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='185']">
2315 <z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
2316 <xslo:variable name="raw_heading">
2317 <xslo:for-each select="marc:subfield">
2318 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
2319 <xslo:if test="position() > 1">
2321 <xslo:when test="contains('vxyz', @code)">
2323 <xslo:when test="@code = $general_subdivision_subfield">
2324 <xslo:text> generalsubdiv </xslo:text>
2326 <xslo:when test="@code = $form_subdivision_subfield">
2327 <xslo:text> formsubdiv </xslo:text>
2329 <xslo:when test="@code = $chronological_subdivision_subfield">
2330 <xslo:text> chronologicalsubdiv </xslo:text>
2332 <xslo:when test="@code = $geographic_subdivision_subfield">
2333 <xslo:text> geographicsubdiv </xslo:text>
2338 <xslo:value-of select="substring(' ', 1, 1)"/>
2342 <xslo:call-template name="chopPunctuation">
2343 <xslo:with-param name="chopString">
2344 <xslo:value-of select="."/>
2346 </xslo:call-template>
2350 <xslo:value-of select="normalize-space($raw_heading)"/>
2353 <xslo:variable name="form_subdivision_subfield">v</xslo:variable>
2354 <xslo:variable name="general_subdivision_subfield">x</xslo:variable>
2355 <xslo:variable name="chronological_subdivision_subfield">y</xslo:variable>
2356 <xslo:variable name="geographic_subdivision_subfield">z</xslo:variable>
2357 <xslo:template mode="index_subject_thesaurus" match="marc:controlfield[@tag='008']">
2358 <xslo:variable name="thesaurus_code1" select="substring(., 12, 1)"/>
2359 <xslo:variable name="full_thesaurus_code">
2361 <xslo:when test="$thesaurus_code1 = 'a'">
2362 <xslo:text>lcsh</xslo:text>
2364 <xslo:when test="$thesaurus_code1 = 'b'">
2365 <xslo:text>lcac</xslo:text>
2367 <xslo:when test="$thesaurus_code1 = 'c'">
2368 <xslo:text>mesh</xslo:text>
2370 <xslo:when test="$thesaurus_code1 = 'd'">
2371 <xslo:text>nal</xslo:text>
2373 <xslo:when test="$thesaurus_code1 = 'k'">
2374 <xslo:text>cash</xslo:text>
2376 <xslo:when test="$thesaurus_code1 = 'n'">
2377 <xslo:text>notapplicable</xslo:text>
2379 <xslo:when test="$thesaurus_code1 = 'r'">
2380 <xslo:text>aat</xslo:text>
2382 <xslo:when test="$thesaurus_code1 = 's'">
2383 <xslo:text>sears</xslo:text>
2385 <xslo:when test="$thesaurus_code1 = 'v'">
2386 <xslo:text>rvm</xslo:text>
2388 <xslo:when test="$thesaurus_code1 = 'z'">
2390 <xslo:when test="//marc:datafield[@tag='040']/marc:subfield[@code='f']">
2391 <xslo:value-of select="//marc:datafield[@tag='040']/marc:subfield[@code='f']"/>
2394 <xslo:text>notdefined</xslo:text>
2399 <xslo:text>notdefined</xslo:text>
2403 <z:index name="Subject-heading-thesaurus:w">
2404 <xslo:value-of select="$full_thesaurus_code"/>
2407 <xslo:template match="*">
2408 <z:index name="Any:w Any:p">
2409 <xslo:value-of select="."/>
2412 <xslo:template name="chopPunctuation">
2413 <xslo:param name="chopString"/>
2414 <xslo:variable name="length" select="string-length($chopString)"/>
2416 <xslo:when test="$length=0"/>
2417 <xslo:when test="contains('-,.:=;!%/', substring($chopString,$length,1))">
2418 <xslo:call-template name="chopPunctuation">
2419 <xslo:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>
2420 </xslo:call-template>
2422 <xslo:when test="not($chopString)"/>
2424 <xslo:value-of select="$chopString"/>