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)"/>
165 <xslo:template mode="index_heading" match="marc:datafield[@tag='400']">
166 <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">
167 <xslo:variable name="raw_heading">
168 <xslo:for-each select="marc:subfield">
169 <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">
170 <xslo:if test="position() > 1">
172 <xslo:when test="contains('vxyz', @code)">
173 <xslo:text>--</xslo:text>
176 <xslo:value-of select="substring(' ', 1, 1)"/>
180 <xslo:value-of select="."/>
184 <xslo:value-of select="normalize-space($raw_heading)"/>
187 <xslo:template mode="index_heading" match="marc:datafield[@tag='500']">
188 <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">
189 <xslo:variable name="raw_heading">
190 <xslo:for-each select="marc:subfield">
191 <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">
192 <xslo:if test="position() > 1">
194 <xslo:when test="contains('vxyz', @code)">
195 <xslo:text>--</xslo:text>
198 <xslo:value-of select="substring(' ', 1, 1)"/>
202 <xslo:value-of select="."/>
206 <xslo:value-of select="normalize-space($raw_heading)"/>
209 <xslo:template mode="index_heading" match="marc:datafield[@tag='110']">
210 <z:index name="Corporate-name-heading:w Corporate-name-heading:p Corporate-name-heading:s Heading:w Heading:p Heading:s">
211 <xslo:variable name="raw_heading">
212 <xslo:for-each select="marc:subfield">
213 <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">
214 <xslo:if test="position() > 1">
216 <xslo:when test="contains('vxyz', @code)">
217 <xslo:text>--</xslo:text>
220 <xslo:value-of select="substring(' ', 1, 1)"/>
224 <xslo:value-of select="."/>
228 <xslo:value-of select="normalize-space($raw_heading)"/>
231 <xslo:template mode="index_heading" match="marc:datafield[@tag='410']">
232 <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">
233 <xslo:variable name="raw_heading">
234 <xslo:for-each select="marc:subfield">
235 <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">
236 <xslo:if test="position() > 1">
238 <xslo:when test="contains('vxyz', @code)">
239 <xslo:text>--</xslo:text>
242 <xslo:value-of select="substring(' ', 1, 1)"/>
246 <xslo:value-of select="."/>
250 <xslo:value-of select="normalize-space($raw_heading)"/>
253 <xslo:template mode="index_heading" match="marc:datafield[@tag='510']">
254 <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">
255 <xslo:variable name="raw_heading">
256 <xslo:for-each select="marc:subfield">
257 <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">
258 <xslo:if test="position() > 1">
260 <xslo:when test="contains('vxyz', @code)">
261 <xslo:text>--</xslo:text>
264 <xslo:value-of select="substring(' ', 1, 1)"/>
268 <xslo:value-of select="."/>
272 <xslo:value-of select="normalize-space($raw_heading)"/>
275 <xslo:template mode="index_heading" match="marc:datafield[@tag='111']">
276 <z:index name="Meeting-name-heading:w Meeting-name-heading:p Meeting-name-heading:s Heading:w Heading:p Heading:s">
277 <xslo:variable name="raw_heading">
278 <xslo:for-each select="marc:subfield">
279 <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">
280 <xslo:if test="position() > 1">
282 <xslo:when test="contains('vxyz', @code)">
283 <xslo:text>--</xslo:text>
286 <xslo:value-of select="substring(' ', 1, 1)"/>
290 <xslo:value-of select="."/>
294 <xslo:value-of select="normalize-space($raw_heading)"/>
297 <xslo:template mode="index_heading" match="marc:datafield[@tag='411']">
298 <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">
299 <xslo:variable name="raw_heading">
300 <xslo:for-each select="marc:subfield">
301 <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">
302 <xslo:if test="position() > 1">
304 <xslo:when test="contains('vxyz', @code)">
305 <xslo:text>--</xslo:text>
308 <xslo:value-of select="substring(' ', 1, 1)"/>
312 <xslo:value-of select="."/>
316 <xslo:value-of select="normalize-space($raw_heading)"/>
319 <xslo:template mode="index_heading" match="marc:datafield[@tag='511']">
320 <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">
321 <xslo:variable name="raw_heading">
322 <xslo:for-each select="marc:subfield">
323 <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">
324 <xslo:if test="position() > 1">
326 <xslo:when test="contains('vxyz', @code)">
327 <xslo:text>--</xslo:text>
330 <xslo:value-of select="substring(' ', 1, 1)"/>
334 <xslo:value-of select="."/>
338 <xslo:value-of select="normalize-space($raw_heading)"/>
341 <xslo:template mode="index_heading" match="marc:datafield[@tag='130']">
342 <z:index name="Title-uniform-heading:w Title-uniform-heading:p Title-uniform-heading:s Heading:w Heading:p Heading:s">
343 <xslo:variable name="raw_heading">
344 <xslo:for-each select="marc:subfield">
345 <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">
346 <xslo:if test="position() > 1">
348 <xslo:when test="contains('vxyz', @code)">
349 <xslo:text>--</xslo:text>
352 <xslo:value-of select="substring(' ', 1, 1)"/>
356 <xslo:value-of select="."/>
360 <xslo:value-of select="normalize-space($raw_heading)"/>
363 <xslo:template mode="index_heading" match="marc:datafield[@tag='430']">
364 <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">
365 <xslo:variable name="raw_heading">
366 <xslo:for-each select="marc:subfield">
367 <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">
368 <xslo:if test="position() > 1">
370 <xslo:when test="contains('vxyz', @code)">
371 <xslo:text>--</xslo:text>
374 <xslo:value-of select="substring(' ', 1, 1)"/>
378 <xslo:value-of select="."/>
382 <xslo:value-of select="normalize-space($raw_heading)"/>
385 <xslo:template mode="index_heading" match="marc:datafield[@tag='530']">
386 <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">
387 <xslo:variable name="raw_heading">
388 <xslo:for-each select="marc:subfield">
389 <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">
390 <xslo:if test="position() > 1">
392 <xslo:when test="contains('vxyz', @code)">
393 <xslo:text>--</xslo:text>
396 <xslo:value-of select="substring(' ', 1, 1)"/>
400 <xslo:value-of select="."/>
404 <xslo:value-of select="normalize-space($raw_heading)"/>
407 <xslo:template mode="index_heading" match="marc:datafield[@tag='148']">
408 <z:index name="Chronological-term-heading:w Chronological-term-heading:p Chronological-term-heading:s Heading:w Heading:p Heading:s">
409 <xslo:variable name="raw_heading">
410 <xslo:for-each select="marc:subfield">
411 <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">
412 <xslo:if test="position() > 1">
414 <xslo:when test="contains('vxyz', @code)">
415 <xslo:text>--</xslo:text>
418 <xslo:value-of select="substring(' ', 1, 1)"/>
422 <xslo:value-of select="."/>
426 <xslo:value-of select="normalize-space($raw_heading)"/>
429 <xslo:template mode="index_heading" match="marc:datafield[@tag='448']">
430 <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">
431 <xslo:variable name="raw_heading">
432 <xslo:for-each select="marc:subfield">
433 <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">
434 <xslo:if test="position() > 1">
436 <xslo:when test="contains('vxyz', @code)">
437 <xslo:text>--</xslo:text>
440 <xslo:value-of select="substring(' ', 1, 1)"/>
444 <xslo:value-of select="."/>
448 <xslo:value-of select="normalize-space($raw_heading)"/>
451 <xslo:template mode="index_heading" match="marc:datafield[@tag='548']">
452 <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">
453 <xslo:variable name="raw_heading">
454 <xslo:for-each select="marc:subfield">
455 <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">
456 <xslo:if test="position() > 1">
458 <xslo:when test="contains('vxyz', @code)">
459 <xslo:text>--</xslo:text>
462 <xslo:value-of select="substring(' ', 1, 1)"/>
466 <xslo:value-of select="."/>
470 <xslo:value-of select="normalize-space($raw_heading)"/>
473 <xslo:template mode="index_heading" match="marc:datafield[@tag='150']">
474 <z:index name="Subject-topical-heading:w Subject-topical-heading:p Subject-topical-heading:s Heading:w Heading:p Heading:s">
475 <xslo:variable name="raw_heading">
476 <xslo:for-each select="marc:subfield">
477 <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">
478 <xslo:if test="position() > 1">
480 <xslo:when test="contains('vxyz', @code)">
481 <xslo:text>--</xslo:text>
484 <xslo:value-of select="substring(' ', 1, 1)"/>
488 <xslo:value-of select="."/>
492 <xslo:value-of select="normalize-space($raw_heading)"/>
495 <xslo:template mode="index_heading" match="marc:datafield[@tag='450']">
496 <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">
497 <xslo:variable name="raw_heading">
498 <xslo:for-each select="marc:subfield">
499 <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">
500 <xslo:if test="position() > 1">
502 <xslo:when test="contains('vxyz', @code)">
503 <xslo:text>--</xslo:text>
506 <xslo:value-of select="substring(' ', 1, 1)"/>
510 <xslo:value-of select="."/>
514 <xslo:value-of select="normalize-space($raw_heading)"/>
517 <xslo:template mode="index_heading" match="marc:datafield[@tag='550']">
518 <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">
519 <xslo:variable name="raw_heading">
520 <xslo:for-each select="marc:subfield">
521 <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">
522 <xslo:if test="position() > 1">
524 <xslo:when test="contains('vxyz', @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='151']">
540 <z:index name="Name-geographic-heading:w Name-geographic-heading:p Name-geographic-heading:s Heading:w Heading:p Heading:s">
541 <xslo:variable name="raw_heading">
542 <xslo:for-each select="marc:subfield">
543 <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">
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='451']">
562 <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">
563 <xslo:variable name="raw_heading">
564 <xslo:for-each select="marc:subfield">
565 <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">
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='551']">
584 <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">
585 <xslo:variable name="raw_heading">
586 <xslo:for-each select="marc:subfield">
587 <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">
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)"/>
605 <xslo:template mode="index_heading" match="marc:datafield[@tag='155']">
606 <z:index name="Term-genre-form-heading:w Term-genre-form-heading:p Term-genre-form-heading:s Heading:w Heading:p Heading:s">
607 <xslo:variable name="raw_heading">
608 <xslo:for-each select="marc:subfield">
609 <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">
610 <xslo:if test="position() > 1">
612 <xslo:when test="contains('vxyz', @code)">
613 <xslo:text>--</xslo:text>
616 <xslo:value-of select="substring(' ', 1, 1)"/>
620 <xslo:value-of select="."/>
624 <xslo:value-of select="normalize-space($raw_heading)"/>
627 <xslo:template mode="index_heading" match="marc:datafield[@tag='455']">
628 <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">
629 <xslo:variable name="raw_heading">
630 <xslo:for-each select="marc:subfield">
631 <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">
632 <xslo:if test="position() > 1">
634 <xslo:when test="contains('vxyz', @code)">
635 <xslo:text>--</xslo:text>
638 <xslo:value-of select="substring(' ', 1, 1)"/>
642 <xslo:value-of select="."/>
646 <xslo:value-of select="normalize-space($raw_heading)"/>
649 <xslo:template mode="index_heading" match="marc:datafield[@tag='555']">
650 <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">
651 <xslo:variable name="raw_heading">
652 <xslo:for-each select="marc:subfield">
653 <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">
654 <xslo:if test="position() > 1">
656 <xslo:when test="contains('vxyz', @code)">
657 <xslo:text>--</xslo:text>
660 <xslo:value-of select="substring(' ', 1, 1)"/>
664 <xslo:value-of select="."/>
668 <xslo:value-of select="normalize-space($raw_heading)"/>
671 <xslo:template mode="index_heading" match="marc:datafield[@tag='180']">
672 <z:index name="General-subdivision:w General-subdivision:p General-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
673 <xslo:variable name="raw_heading">
674 <xslo:for-each select="marc:subfield">
675 <xslo:if test="contains('vxyz', @code)" name="General-subdivision:w General-subdivision:p General-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
676 <xslo:if test="position() > 1">
678 <xslo:when test="contains('vxyz', @code)">
679 <xslo:text>--</xslo:text>
682 <xslo:value-of select="substring(' ', 1, 1)"/>
686 <xslo:value-of select="."/>
690 <xslo:value-of select="normalize-space($raw_heading)"/>
693 <xslo:template mode="index_heading" match="marc:datafield[@tag='480']">
694 <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">
695 <xslo:variable name="raw_heading">
696 <xslo:for-each select="marc:subfield">
697 <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">
698 <xslo:if test="position() > 1">
700 <xslo:when test="contains('vxyz', @code)">
701 <xslo:text>--</xslo:text>
704 <xslo:value-of select="substring(' ', 1, 1)"/>
708 <xslo:value-of select="."/>
712 <xslo:value-of select="normalize-space($raw_heading)"/>
715 <xslo:template mode="index_heading" match="marc:datafield[@tag='580']">
716 <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">
717 <xslo:variable name="raw_heading">
718 <xslo:for-each select="marc:subfield">
719 <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">
720 <xslo:if test="position() > 1">
722 <xslo:when test="contains('vxyz', @code)">
723 <xslo:text>--</xslo:text>
726 <xslo:value-of select="substring(' ', 1, 1)"/>
730 <xslo:value-of select="."/>
734 <xslo:value-of select="normalize-space($raw_heading)"/>
737 <xslo:template mode="index_heading" match="marc:datafield[@tag='181']">
738 <z:index name="Geographic-subdivision:w Geographic-subdivision:p Geographic-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
739 <xslo:variable name="raw_heading">
740 <xslo:for-each select="marc:subfield">
741 <xslo:if test="contains('vxyz', @code)" name="Geographic-subdivision:w Geographic-subdivision:p Geographic-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
742 <xslo:if test="position() > 1">
744 <xslo:when test="contains('vxyz', @code)">
745 <xslo:text>--</xslo:text>
748 <xslo:value-of select="substring(' ', 1, 1)"/>
752 <xslo:value-of select="."/>
756 <xslo:value-of select="normalize-space($raw_heading)"/>
759 <xslo:template mode="index_heading" match="marc:datafield[@tag='481']">
760 <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">
761 <xslo:variable name="raw_heading">
762 <xslo:for-each select="marc:subfield">
763 <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">
764 <xslo:if test="position() > 1">
766 <xslo:when test="contains('vxyz', @code)">
767 <xslo:text>--</xslo:text>
770 <xslo:value-of select="substring(' ', 1, 1)"/>
774 <xslo:value-of select="."/>
778 <xslo:value-of select="normalize-space($raw_heading)"/>
781 <xslo:template mode="index_heading" match="marc:datafield[@tag='581']">
782 <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">
783 <xslo:variable name="raw_heading">
784 <xslo:for-each select="marc:subfield">
785 <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">
786 <xslo:if test="position() > 1">
788 <xslo:when test="contains('vxyz', @code)">
789 <xslo:text>--</xslo:text>
792 <xslo:value-of select="substring(' ', 1, 1)"/>
796 <xslo:value-of select="."/>
800 <xslo:value-of select="normalize-space($raw_heading)"/>
803 <xslo:template mode="index_heading" match="marc:datafield[@tag='182']">
804 <z:index name="Chronological-subdivision:w Chronological-subdivision:p Chronological-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
805 <xslo:variable name="raw_heading">
806 <xslo:for-each select="marc:subfield">
807 <xslo:if test="contains('vxyz', @code)" name="Chronological-subdivision:w Chronological-subdivision:p Chronological-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
808 <xslo:if test="position() > 1">
810 <xslo:when test="contains('vxyz', @code)">
811 <xslo:text>--</xslo:text>
814 <xslo:value-of select="substring(' ', 1, 1)"/>
818 <xslo:value-of select="."/>
822 <xslo:value-of select="normalize-space($raw_heading)"/>
825 <xslo:template mode="index_heading" match="marc:datafield[@tag='482']">
826 <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">
827 <xslo:variable name="raw_heading">
828 <xslo:for-each select="marc:subfield">
829 <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">
830 <xslo:if test="position() > 1">
832 <xslo:when test="contains('vxyz', @code)">
833 <xslo:text>--</xslo:text>
836 <xslo:value-of select="substring(' ', 1, 1)"/>
840 <xslo:value-of select="."/>
844 <xslo:value-of select="normalize-space($raw_heading)"/>
847 <xslo:template mode="index_heading" match="marc:datafield[@tag='582']">
848 <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">
849 <xslo:variable name="raw_heading">
850 <xslo:for-each select="marc:subfield">
851 <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">
852 <xslo:if test="position() > 1">
854 <xslo:when test="contains('vxyz', @code)">
855 <xslo:text>--</xslo:text>
858 <xslo:value-of select="substring(' ', 1, 1)"/>
862 <xslo:value-of select="."/>
866 <xslo:value-of select="normalize-space($raw_heading)"/>
869 <xslo:template mode="index_heading" match="marc:datafield[@tag='185']">
870 <z:index name="Form-subdivision:w Form-subdivision:p Form-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
871 <xslo:variable name="raw_heading">
872 <xslo:for-each select="marc:subfield">
873 <xslo:if test="contains('vxyz', @code)" name="Form-subdivision:w Form-subdivision:p Form-subdivision:s Subdivision:w Subdivision:p Subdivision:s">
874 <xslo:if test="position() > 1">
876 <xslo:when test="contains('vxyz', @code)">
877 <xslo:text>--</xslo:text>
880 <xslo:value-of select="substring(' ', 1, 1)"/>
884 <xslo:value-of select="."/>
888 <xslo:value-of select="normalize-space($raw_heading)"/>
891 <xslo:template mode="index_heading" match="marc:datafield[@tag='485']">
892 <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">
893 <xslo:variable name="raw_heading">
894 <xslo:for-each select="marc:subfield">
895 <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">
896 <xslo:if test="position() > 1">
898 <xslo:when test="contains('vxyz', @code)">
899 <xslo:text>--</xslo:text>
902 <xslo:value-of select="substring(' ', 1, 1)"/>
906 <xslo:value-of select="."/>
910 <xslo:value-of select="normalize-space($raw_heading)"/>
913 <xslo:template mode="index_heading" match="marc:datafield[@tag='585']">
914 <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">
915 <xslo:variable name="raw_heading">
916 <xslo:for-each select="marc:subfield">
917 <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">
918 <xslo:if test="position() > 1">
920 <xslo:when test="contains('vxyz', @code)">
921 <xslo:text>--</xslo:text>
924 <xslo:value-of select="substring(' ', 1, 1)"/>
928 <xslo:value-of select="."/>
932 <xslo:value-of select="normalize-space($raw_heading)"/>
935 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='100']">
936 <z:index name="Match-heading:p Match-heading:s">
937 <xslo:variable name="raw_heading">
938 <xslo:for-each select="marc:subfield">
939 <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Match-heading:p Match-heading:s">
940 <xslo:if test="position() > 1">
942 <xslo:when test="contains('vxyz', @code)">
944 <xslo:when test="@code = $general_subdivision_subfield">
945 <xslo:text> generalsubdiv </xslo:text>
947 <xslo:when test="@code = $form_subdivision_subfield">
948 <xslo:text> formsubdiv </xslo:text>
950 <xslo:when test="@code = $chronological_subdivision_subfield">
951 <xslo:text> chronologicalsubdiv </xslo:text>
953 <xslo:when test="@code = $geographic_subdivision_subfield">
954 <xslo:text> geographicsubdiv </xslo:text>
959 <xslo:value-of select="substring(' ', 1, 1)"/>
963 <xslo:value-of select="."/>
967 <xslo:value-of select="normalize-space($raw_heading)"/>
970 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='400']">
971 <z:index name="Match-heading-see-from:p Match-heading-see-from:s">
972 <xslo:variable name="raw_heading">
973 <xslo:for-each select="marc:subfield">
974 <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s">
975 <xslo:if test="position() > 1">
977 <xslo:when test="contains('vxyz', @code)">
979 <xslo:when test="@code = $general_subdivision_subfield">
980 <xslo:text> generalsubdiv </xslo:text>
982 <xslo:when test="@code = $form_subdivision_subfield">
983 <xslo:text> formsubdiv </xslo:text>
985 <xslo:when test="@code = $chronological_subdivision_subfield">
986 <xslo:text> chronologicalsubdiv </xslo:text>
988 <xslo:when test="@code = $geographic_subdivision_subfield">
989 <xslo:text> geographicsubdiv </xslo:text>
994 <xslo:value-of select="substring(' ', 1, 1)"/>
998 <xslo:value-of select="."/>
1002 <xslo:value-of select="normalize-space($raw_heading)"/>
1005 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='110']">
1006 <z:index name="Match-heading:p Match-heading:s">
1007 <xslo:variable name="raw_heading">
1008 <xslo:for-each select="marc:subfield">
1009 <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Match-heading:p Match-heading:s">
1010 <xslo:if test="position() > 1">
1012 <xslo:when test="contains('vxyz', @code)">
1014 <xslo:when test="@code = $general_subdivision_subfield">
1015 <xslo:text> generalsubdiv </xslo:text>
1017 <xslo:when test="@code = $form_subdivision_subfield">
1018 <xslo:text> formsubdiv </xslo:text>
1020 <xslo:when test="@code = $chronological_subdivision_subfield">
1021 <xslo:text> chronologicalsubdiv </xslo:text>
1023 <xslo:when test="@code = $geographic_subdivision_subfield">
1024 <xslo:text> geographicsubdiv </xslo:text>
1029 <xslo:value-of select="substring(' ', 1, 1)"/>
1033 <xslo:value-of select="."/>
1037 <xslo:value-of select="normalize-space($raw_heading)"/>
1040 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='410']">
1041 <z:index name="Match-heading-see-from:p Match-heading-see-from:s">
1042 <xslo:variable name="raw_heading">
1043 <xslo:for-each select="marc:subfield">
1044 <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s">
1045 <xslo:if test="position() > 1">
1047 <xslo:when test="contains('vxyz', @code)">
1049 <xslo:when test="@code = $general_subdivision_subfield">
1050 <xslo:text> generalsubdiv </xslo:text>
1052 <xslo:when test="@code = $form_subdivision_subfield">
1053 <xslo:text> formsubdiv </xslo:text>
1055 <xslo:when test="@code = $chronological_subdivision_subfield">
1056 <xslo:text> chronologicalsubdiv </xslo:text>
1058 <xslo:when test="@code = $geographic_subdivision_subfield">
1059 <xslo:text> geographicsubdiv </xslo:text>
1064 <xslo:value-of select="substring(' ', 1, 1)"/>
1068 <xslo:value-of select="."/>
1072 <xslo:value-of select="normalize-space($raw_heading)"/>
1075 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='111']">
1076 <z:index name="Match-heading:p Match-heading:s">
1077 <xslo:variable name="raw_heading">
1078 <xslo:for-each select="marc:subfield">
1079 <xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Match-heading:p Match-heading:s">
1080 <xslo:if test="position() > 1">
1082 <xslo:when test="contains('vxyz', @code)">
1084 <xslo:when test="@code = $general_subdivision_subfield">
1085 <xslo:text> generalsubdiv </xslo:text>
1087 <xslo:when test="@code = $form_subdivision_subfield">
1088 <xslo:text> formsubdiv </xslo:text>
1090 <xslo:when test="@code = $chronological_subdivision_subfield">
1091 <xslo:text> chronologicalsubdiv </xslo:text>
1093 <xslo:when test="@code = $geographic_subdivision_subfield">
1094 <xslo:text> geographicsubdiv </xslo:text>
1099 <xslo:value-of select="substring(' ', 1, 1)"/>
1103 <xslo:value-of select="."/>
1107 <xslo:value-of select="normalize-space($raw_heading)"/>
1110 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='411']">
1111 <z:index name="Match-heading-see-from:p Match-heading-see-from:s">
1112 <xslo:variable name="raw_heading">
1113 <xslo:for-each select="marc:subfield">
1114 <xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s">
1115 <xslo:if test="position() > 1">
1117 <xslo:when test="contains('vxyz', @code)">
1119 <xslo:when test="@code = $general_subdivision_subfield">
1120 <xslo:text> generalsubdiv </xslo:text>
1122 <xslo:when test="@code = $form_subdivision_subfield">
1123 <xslo:text> formsubdiv </xslo:text>
1125 <xslo:when test="@code = $chronological_subdivision_subfield">
1126 <xslo:text> chronologicalsubdiv </xslo:text>
1128 <xslo:when test="@code = $geographic_subdivision_subfield">
1129 <xslo:text> geographicsubdiv </xslo:text>
1134 <xslo:value-of select="substring(' ', 1, 1)"/>
1138 <xslo:value-of select="."/>
1142 <xslo:value-of select="normalize-space($raw_heading)"/>
1145 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='130']">
1146 <z:index name="Match-heading:p Match-heading:s">
1147 <xslo:variable name="raw_heading">
1148 <xslo:for-each select="marc:subfield">
1149 <xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Match-heading:p Match-heading:s">
1150 <xslo:if test="position() > 1">
1152 <xslo:when test="contains('vxyz', @code)">
1154 <xslo:when test="@code = $general_subdivision_subfield">
1155 <xslo:text> generalsubdiv </xslo:text>
1157 <xslo:when test="@code = $form_subdivision_subfield">
1158 <xslo:text> formsubdiv </xslo:text>
1160 <xslo:when test="@code = $chronological_subdivision_subfield">
1161 <xslo:text> chronologicalsubdiv </xslo:text>
1163 <xslo:when test="@code = $geographic_subdivision_subfield">
1164 <xslo:text> geographicsubdiv </xslo:text>
1169 <xslo:value-of select="substring(' ', 1, 1)"/>
1173 <xslo:value-of select="."/>
1177 <xslo:value-of select="normalize-space($raw_heading)"/>
1180 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='430']">
1181 <z:index name="Match-heading-see-from:p Match-heading-see-from:s">
1182 <xslo:variable name="raw_heading">
1183 <xslo:for-each select="marc:subfield">
1184 <xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s">
1185 <xslo:if test="position() > 1">
1187 <xslo:when test="contains('vxyz', @code)">
1189 <xslo:when test="@code = $general_subdivision_subfield">
1190 <xslo:text> generalsubdiv </xslo:text>
1192 <xslo:when test="@code = $form_subdivision_subfield">
1193 <xslo:text> formsubdiv </xslo:text>
1195 <xslo:when test="@code = $chronological_subdivision_subfield">
1196 <xslo:text> chronologicalsubdiv </xslo:text>
1198 <xslo:when test="@code = $geographic_subdivision_subfield">
1199 <xslo:text> geographicsubdiv </xslo:text>
1204 <xslo:value-of select="substring(' ', 1, 1)"/>
1208 <xslo:value-of select="."/>
1212 <xslo:value-of select="normalize-space($raw_heading)"/>
1215 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='148']">
1216 <z:index name="Match-heading:p Match-heading:s">
1217 <xslo:variable name="raw_heading">
1218 <xslo:for-each select="marc:subfield">
1219 <xslo:if test="contains('avxyz', @code)" name="Match-heading:p Match-heading:s">
1220 <xslo:if test="position() > 1">
1222 <xslo:when test="contains('vxyz', @code)">
1224 <xslo:when test="@code = $general_subdivision_subfield">
1225 <xslo:text> generalsubdiv </xslo:text>
1227 <xslo:when test="@code = $form_subdivision_subfield">
1228 <xslo:text> formsubdiv </xslo:text>
1230 <xslo:when test="@code = $chronological_subdivision_subfield">
1231 <xslo:text> chronologicalsubdiv </xslo:text>
1233 <xslo:when test="@code = $geographic_subdivision_subfield">
1234 <xslo:text> geographicsubdiv </xslo:text>
1239 <xslo:value-of select="substring(' ', 1, 1)"/>
1243 <xslo:value-of select="."/>
1247 <xslo:value-of select="normalize-space($raw_heading)"/>
1250 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='448']">
1251 <z:index name="Match-heading-see-from:p Match-heading-see-from:s">
1252 <xslo:variable name="raw_heading">
1253 <xslo:for-each select="marc:subfield">
1254 <xslo:if test="contains('avxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s">
1255 <xslo:if test="position() > 1">
1257 <xslo:when test="contains('vxyz', @code)">
1259 <xslo:when test="@code = $general_subdivision_subfield">
1260 <xslo:text> generalsubdiv </xslo:text>
1262 <xslo:when test="@code = $form_subdivision_subfield">
1263 <xslo:text> formsubdiv </xslo:text>
1265 <xslo:when test="@code = $chronological_subdivision_subfield">
1266 <xslo:text> chronologicalsubdiv </xslo:text>
1268 <xslo:when test="@code = $geographic_subdivision_subfield">
1269 <xslo:text> geographicsubdiv </xslo:text>
1274 <xslo:value-of select="substring(' ', 1, 1)"/>
1278 <xslo:value-of select="."/>
1282 <xslo:value-of select="normalize-space($raw_heading)"/>
1285 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='150']">
1286 <z:index name="Match-heading:p Match-heading:s">
1287 <xslo:variable name="raw_heading">
1288 <xslo:for-each select="marc:subfield">
1289 <xslo:if test="contains('abvxyz', @code)" name="Match-heading:p Match-heading:s">
1290 <xslo:if test="position() > 1">
1292 <xslo:when test="contains('vxyz', @code)">
1294 <xslo:when test="@code = $general_subdivision_subfield">
1295 <xslo:text> generalsubdiv </xslo:text>
1297 <xslo:when test="@code = $form_subdivision_subfield">
1298 <xslo:text> formsubdiv </xslo:text>
1300 <xslo:when test="@code = $chronological_subdivision_subfield">
1301 <xslo:text> chronologicalsubdiv </xslo:text>
1303 <xslo:when test="@code = $geographic_subdivision_subfield">
1304 <xslo:text> geographicsubdiv </xslo:text>
1309 <xslo:value-of select="substring(' ', 1, 1)"/>
1313 <xslo:value-of select="."/>
1317 <xslo:value-of select="normalize-space($raw_heading)"/>
1320 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='450']">
1321 <z:index name="Match-heading-see-from:p Match-heading-see-from:s">
1322 <xslo:variable name="raw_heading">
1323 <xslo:for-each select="marc:subfield">
1324 <xslo:if test="contains('abvxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s">
1325 <xslo:if test="position() > 1">
1327 <xslo:when test="contains('vxyz', @code)">
1329 <xslo:when test="@code = $general_subdivision_subfield">
1330 <xslo:text> generalsubdiv </xslo:text>
1332 <xslo:when test="@code = $form_subdivision_subfield">
1333 <xslo:text> formsubdiv </xslo:text>
1335 <xslo:when test="@code = $chronological_subdivision_subfield">
1336 <xslo:text> chronologicalsubdiv </xslo:text>
1338 <xslo:when test="@code = $geographic_subdivision_subfield">
1339 <xslo:text> geographicsubdiv </xslo:text>
1344 <xslo:value-of select="substring(' ', 1, 1)"/>
1348 <xslo:value-of select="."/>
1352 <xslo:value-of select="normalize-space($raw_heading)"/>
1355 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='151']">
1356 <z:index name="Match-heading:p Match-heading:s">
1357 <xslo:variable name="raw_heading">
1358 <xslo:for-each select="marc:subfield">
1359 <xslo:if test="contains('avxyz', @code)" name="Match-heading:p Match-heading:s">
1360 <xslo:if test="position() > 1">
1362 <xslo:when test="contains('vxyz', @code)">
1364 <xslo:when test="@code = $general_subdivision_subfield">
1365 <xslo:text> generalsubdiv </xslo:text>
1367 <xslo:when test="@code = $form_subdivision_subfield">
1368 <xslo:text> formsubdiv </xslo:text>
1370 <xslo:when test="@code = $chronological_subdivision_subfield">
1371 <xslo:text> chronologicalsubdiv </xslo:text>
1373 <xslo:when test="@code = $geographic_subdivision_subfield">
1374 <xslo:text> geographicsubdiv </xslo:text>
1379 <xslo:value-of select="substring(' ', 1, 1)"/>
1383 <xslo:value-of select="."/>
1387 <xslo:value-of select="normalize-space($raw_heading)"/>
1390 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='451']">
1391 <z:index name="Match-heading-see-from:p Match-heading-see-from:s">
1392 <xslo:variable name="raw_heading">
1393 <xslo:for-each select="marc:subfield">
1394 <xslo:if test="contains('avxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s">
1395 <xslo:if test="position() > 1">
1397 <xslo:when test="contains('vxyz', @code)">
1399 <xslo:when test="@code = $general_subdivision_subfield">
1400 <xslo:text> generalsubdiv </xslo:text>
1402 <xslo:when test="@code = $form_subdivision_subfield">
1403 <xslo:text> formsubdiv </xslo:text>
1405 <xslo:when test="@code = $chronological_subdivision_subfield">
1406 <xslo:text> chronologicalsubdiv </xslo:text>
1408 <xslo:when test="@code = $geographic_subdivision_subfield">
1409 <xslo:text> geographicsubdiv </xslo:text>
1414 <xslo:value-of select="substring(' ', 1, 1)"/>
1418 <xslo:value-of select="."/>
1422 <xslo:value-of select="normalize-space($raw_heading)"/>
1425 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='155']">
1426 <z:index name="Match-heading:p Match-heading:s">
1427 <xslo:variable name="raw_heading">
1428 <xslo:for-each select="marc:subfield">
1429 <xslo:if test="contains('avxyz', @code)" name="Match-heading:p Match-heading:s">
1430 <xslo:if test="position() > 1">
1432 <xslo:when test="contains('vxyz', @code)">
1434 <xslo:when test="@code = $general_subdivision_subfield">
1435 <xslo:text> generalsubdiv </xslo:text>
1437 <xslo:when test="@code = $form_subdivision_subfield">
1438 <xslo:text> formsubdiv </xslo:text>
1440 <xslo:when test="@code = $chronological_subdivision_subfield">
1441 <xslo:text> chronologicalsubdiv </xslo:text>
1443 <xslo:when test="@code = $geographic_subdivision_subfield">
1444 <xslo:text> geographicsubdiv </xslo:text>
1449 <xslo:value-of select="substring(' ', 1, 1)"/>
1453 <xslo:value-of select="."/>
1457 <xslo:value-of select="normalize-space($raw_heading)"/>
1460 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='455']">
1461 <z:index name="Match-heading-see-from:p Match-heading-see-from:s">
1462 <xslo:variable name="raw_heading">
1463 <xslo:for-each select="marc:subfield">
1464 <xslo:if test="contains('avxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s">
1465 <xslo:if test="position() > 1">
1467 <xslo:when test="contains('vxyz', @code)">
1469 <xslo:when test="@code = $general_subdivision_subfield">
1470 <xslo:text> generalsubdiv </xslo:text>
1472 <xslo:when test="@code = $form_subdivision_subfield">
1473 <xslo:text> formsubdiv </xslo:text>
1475 <xslo:when test="@code = $chronological_subdivision_subfield">
1476 <xslo:text> chronologicalsubdiv </xslo:text>
1478 <xslo:when test="@code = $geographic_subdivision_subfield">
1479 <xslo:text> geographicsubdiv </xslo:text>
1484 <xslo:value-of select="substring(' ', 1, 1)"/>
1488 <xslo:value-of select="."/>
1492 <xslo:value-of select="normalize-space($raw_heading)"/>
1495 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='180']">
1496 <z:index name="Match-subdivision:p Match-subdivision:s">
1497 <xslo:variable name="raw_heading">
1498 <xslo:for-each select="marc:subfield">
1499 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision:p Match-subdivision: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:value-of select="."/>
1527 <xslo:value-of select="normalize-space($raw_heading)"/>
1530 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='480']">
1531 <z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
1532 <xslo:variable name="raw_heading">
1533 <xslo:for-each select="marc:subfield">
1534 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
1535 <xslo:if test="position() > 1">
1537 <xslo:when test="contains('vxyz', @code)">
1539 <xslo:when test="@code = $general_subdivision_subfield">
1540 <xslo:text> generalsubdiv </xslo:text>
1542 <xslo:when test="@code = $form_subdivision_subfield">
1543 <xslo:text> formsubdiv </xslo:text>
1545 <xslo:when test="@code = $chronological_subdivision_subfield">
1546 <xslo:text> chronologicalsubdiv </xslo:text>
1548 <xslo:when test="@code = $geographic_subdivision_subfield">
1549 <xslo:text> geographicsubdiv </xslo:text>
1554 <xslo:value-of select="substring(' ', 1, 1)"/>
1558 <xslo:value-of select="."/>
1562 <xslo:value-of select="normalize-space($raw_heading)"/>
1565 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='181']">
1566 <z:index name="Match-subdivision:p Match-subdivision:s">
1567 <xslo:variable name="raw_heading">
1568 <xslo:for-each select="marc:subfield">
1569 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision:p Match-subdivision:s">
1570 <xslo:if test="position() > 1">
1572 <xslo:when test="contains('vxyz', @code)">
1574 <xslo:when test="@code = $general_subdivision_subfield">
1575 <xslo:text> generalsubdiv </xslo:text>
1577 <xslo:when test="@code = $form_subdivision_subfield">
1578 <xslo:text> formsubdiv </xslo:text>
1580 <xslo:when test="@code = $chronological_subdivision_subfield">
1581 <xslo:text> chronologicalsubdiv </xslo:text>
1583 <xslo:when test="@code = $geographic_subdivision_subfield">
1584 <xslo:text> geographicsubdiv </xslo:text>
1589 <xslo:value-of select="substring(' ', 1, 1)"/>
1593 <xslo:value-of select="."/>
1597 <xslo:value-of select="normalize-space($raw_heading)"/>
1600 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='481']">
1601 <z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
1602 <xslo:variable name="raw_heading">
1603 <xslo:for-each select="marc:subfield">
1604 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
1605 <xslo:if test="position() > 1">
1607 <xslo:when test="contains('vxyz', @code)">
1609 <xslo:when test="@code = $general_subdivision_subfield">
1610 <xslo:text> generalsubdiv </xslo:text>
1612 <xslo:when test="@code = $form_subdivision_subfield">
1613 <xslo:text> formsubdiv </xslo:text>
1615 <xslo:when test="@code = $chronological_subdivision_subfield">
1616 <xslo:text> chronologicalsubdiv </xslo:text>
1618 <xslo:when test="@code = $geographic_subdivision_subfield">
1619 <xslo:text> geographicsubdiv </xslo:text>
1624 <xslo:value-of select="substring(' ', 1, 1)"/>
1628 <xslo:value-of select="."/>
1632 <xslo:value-of select="normalize-space($raw_heading)"/>
1635 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='182']">
1636 <z:index name="Match-subdivision:p Match-subdivision:s">
1637 <xslo:variable name="raw_heading">
1638 <xslo:for-each select="marc:subfield">
1639 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision:p Match-subdivision:s">
1640 <xslo:if test="position() > 1">
1642 <xslo:when test="contains('vxyz', @code)">
1644 <xslo:when test="@code = $general_subdivision_subfield">
1645 <xslo:text> generalsubdiv </xslo:text>
1647 <xslo:when test="@code = $form_subdivision_subfield">
1648 <xslo:text> formsubdiv </xslo:text>
1650 <xslo:when test="@code = $chronological_subdivision_subfield">
1651 <xslo:text> chronologicalsubdiv </xslo:text>
1653 <xslo:when test="@code = $geographic_subdivision_subfield">
1654 <xslo:text> geographicsubdiv </xslo:text>
1659 <xslo:value-of select="substring(' ', 1, 1)"/>
1663 <xslo:value-of select="."/>
1667 <xslo:value-of select="normalize-space($raw_heading)"/>
1670 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='482']">
1671 <z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
1672 <xslo:variable name="raw_heading">
1673 <xslo:for-each select="marc:subfield">
1674 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
1675 <xslo:if test="position() > 1">
1677 <xslo:when test="contains('vxyz', @code)">
1679 <xslo:when test="@code = $general_subdivision_subfield">
1680 <xslo:text> generalsubdiv </xslo:text>
1682 <xslo:when test="@code = $form_subdivision_subfield">
1683 <xslo:text> formsubdiv </xslo:text>
1685 <xslo:when test="@code = $chronological_subdivision_subfield">
1686 <xslo:text> chronologicalsubdiv </xslo:text>
1688 <xslo:when test="@code = $geographic_subdivision_subfield">
1689 <xslo:text> geographicsubdiv </xslo:text>
1694 <xslo:value-of select="substring(' ', 1, 1)"/>
1698 <xslo:value-of select="."/>
1702 <xslo:value-of select="normalize-space($raw_heading)"/>
1705 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='485']">
1706 <z:index name="Match-subdivision:p Match-subdivision:s">
1707 <xslo:variable name="raw_heading">
1708 <xslo:for-each select="marc:subfield">
1709 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision:p Match-subdivision:s">
1710 <xslo:if test="position() > 1">
1712 <xslo:when test="contains('vxyz', @code)">
1714 <xslo:when test="@code = $general_subdivision_subfield">
1715 <xslo:text> generalsubdiv </xslo:text>
1717 <xslo:when test="@code = $form_subdivision_subfield">
1718 <xslo:text> formsubdiv </xslo:text>
1720 <xslo:when test="@code = $chronological_subdivision_subfield">
1721 <xslo:text> chronologicalsubdiv </xslo:text>
1723 <xslo:when test="@code = $geographic_subdivision_subfield">
1724 <xslo:text> geographicsubdiv </xslo:text>
1729 <xslo:value-of select="substring(' ', 1, 1)"/>
1733 <xslo:value-of select="."/>
1737 <xslo:value-of select="normalize-space($raw_heading)"/>
1740 <xslo:template mode="index_match_heading" match="marc:datafield[@tag='185']">
1741 <z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
1742 <xslo:variable name="raw_heading">
1743 <xslo:for-each select="marc:subfield">
1744 <xslo:if test="contains('vxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
1745 <xslo:if test="position() > 1">
1747 <xslo:when test="contains('vxyz', @code)">
1749 <xslo:when test="@code = $general_subdivision_subfield">
1750 <xslo:text> generalsubdiv </xslo:text>
1752 <xslo:when test="@code = $form_subdivision_subfield">
1753 <xslo:text> formsubdiv </xslo:text>
1755 <xslo:when test="@code = $chronological_subdivision_subfield">
1756 <xslo:text> chronologicalsubdiv </xslo:text>
1758 <xslo:when test="@code = $geographic_subdivision_subfield">
1759 <xslo:text> geographicsubdiv </xslo:text>
1764 <xslo:value-of select="substring(' ', 1, 1)"/>
1768 <xslo:value-of select="."/>
1772 <xslo:value-of select="normalize-space($raw_heading)"/>
1775 <xslo:variable name="form_subdivision_subfield">v</xslo:variable>
1776 <xslo:variable name="general_subdivision_subfield">x</xslo:variable>
1777 <xslo:variable name="chronological_subdivision_subfield">y</xslo:variable>
1778 <xslo:variable name="geographic_subdivision_subfield">z</xslo:variable>
1779 <xslo:template mode="index_subject_thesaurus" match="marc:controlfield[@tag='008']">
1780 <xslo:variable name="thesaurus_code1" select="substring(., 12, 1)"/>
1781 <xslo:variable name="full_thesaurus_code">
1783 <xslo:when test="$thesaurus_code1 = 'a'">
1784 <xslo:text>lcsh</xslo:text>
1786 <xslo:when test="$thesaurus_code1 = 'b'">
1787 <xslo:text>lcac</xslo:text>
1789 <xslo:when test="$thesaurus_code1 = 'c'">
1790 <xslo:text>mesh</xslo:text>
1792 <xslo:when test="$thesaurus_code1 = 'd'">
1793 <xslo:text>nal</xslo:text>
1795 <xslo:when test="$thesaurus_code1 = 'k'">
1796 <xslo:text>cash</xslo:text>
1798 <xslo:when test="$thesaurus_code1 = 'n'">
1799 <xslo:text>notapplicable</xslo:text>
1801 <xslo:when test="$thesaurus_code1 = 'r'">
1802 <xslo:text>aat</xslo:text>
1804 <xslo:when test="$thesaurus_code1 = 's'">
1805 <xslo:text>sears</xslo:text>
1807 <xslo:when test="$thesaurus_code1 = 'v'">
1808 <xslo:text>rvm</xslo:text>
1810 <xslo:when test="$thesaurus_code1 = 'z'">
1812 <xslo:when test="//marc:datafield[@tag='040']/marc:subfield[@code='f']">
1813 <xslo:value-of select="//marc:datafield[@tag='040']/marc:subfield[@code='f']"/>
1816 <xslo:text>notdefined</xslo:text>
1821 <xslo:text>notdefined</xslo:text>
1825 <z:index name="Subject-heading-thesaurus:w">
1826 <xslo:value-of select="$full_thesaurus_code"/>