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_facets"/>
16 <xslo:template match="text()" mode="index_heading"/>
17 <xslo:template match="text()" mode="index_heading_conditional"/>
18 <xslo:template match="text()" mode="index_match_heading"/>
19 <xslo:template match="text()" mode="index_subject_thesaurus"/>
20 <xslo:template match="/">
21 <xslo:if test="marc:collection">
23 <xslo:apply-templates select="marc:collection/marc:record"/>
26 <xslo:if test="marc:record">
27 <xslo:apply-templates select="marc:record"/>
30 <xslo:template match="marc:record">
31 <xslo:variable name="idfield" select="normalize-space(marc:controlfield[@tag='001'])"/>
32 <z:record type="update">
33 <xslo:attribute name="z:id">
34 <xslo:value-of select="$idfield"/>
36 <xslo:apply-templates/>
37 <xslo:apply-templates mode="index_subfields"/>
38 <xslo:apply-templates mode="index_data_field"/>
39 <xslo:apply-templates mode="index_facets"/>
40 <xslo:apply-templates mode="index_heading"/>
41 <xslo:apply-templates mode="index_heading_conditional"/>
42 <xslo:apply-templates mode="index_match_heading"/>
43 <xslo:apply-templates mode="index_subject_thesaurus"/>
44 <xslo:apply-templates mode="index_all"/>
47 <xslo:template match="marc:controlfield[@tag='001']">
48 <z:index name="Local-Number:w Local-Number:s Local-Number:n">
49 <xslo:value-of select="."/>
52 <xslo:template mode="index_subfields" match="marc:datafield[@tag='200']">
53 <xslo:for-each select="marc:subfield">
54 <xslo:if test="contains('abcdfgjxyz', @code)">
55 <z:index name="Personal-name:w Personal-name:p Heading:w Heading:p Match:w Match:p Match-heading:w Match-heading:p">
56 <xslo:value-of select="."/>
60 <xslo:for-each select="marc:subfield">
61 <xslo:if test="contains('a', @code)">
62 <z:index name="Heading:s Heading-Main:w Heading-Main:p Heading-Main:s Personal-name-heading:w Personal-name-heading:p Personal-name-heading:s">
63 <xslo:value-of select="."/>
68 <xslo:template mode="index_subfields" match="marc:datafield[@tag='400']">
69 <xslo:for-each select="marc:subfield">
70 <xslo:if test="contains('abcdfgjxyz', @code)">
71 <z:index name="Personal-name-see:w Personal-name-see:p See:w See:p Match:w Match:p Match-heading-see-form:w Match-heading-see-form:p">
72 <xslo:value-of select="."/>
77 <xslo:template mode="index_subfields" match="marc:datafield[@tag='500']">
78 <xslo:for-each select="marc:subfield">
79 <xslo:if test="contains('abcdfgjxyz', @code)">
80 <z:index name="Personal-name-see-also:w Personal-name-see-also:p See-also:w See-also:p Match:w Match:p">
81 <xslo:value-of select="."/>
86 <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']">
87 <xslo:for-each select="marc:subfield">
88 <xslo:if test="contains('a', @code)">
89 <z:index name="Personal-name-parallel:w Personal-name-parallel:s Parallel:w Parallel:p Match:w Match:p">
90 <xslo:value-of select="."/>
95 <xslo:template mode="index_subfields" match="marc:datafield[@tag='210']">
96 <xslo:for-each select="marc:subfield">
97 <xslo:if test="contains('abcdefgjxyz', @code)">
98 <z:index name="Corporate-name:w Corporate-name:p Conference-name:w Conference-name:p Heading:w Heading:p Match:w Match:p Match-heading:w Match-heading:p">
99 <xslo:value-of select="."/>
103 <xslo:for-each select="marc:subfield">
104 <xslo:if test="contains('a', @code)">
105 <z:index name="Heading:s Heading-Main:w Heading-Main:p Heading-Main:s Corporate-name-heading:w Corporate-name-heading:p Corporate-name-heading:s Conference-name-heading:w Conference-name-heading:p Conference-name-heading:s">
106 <xslo:value-of select="."/>
111 <xslo:template mode="index_subfields" match="marc:datafield[@tag='410']">
112 <xslo:for-each select="marc:subfield">
113 <xslo:if test="contains('abcdefgjxyz', @code)">
114 <z:index name="Corporate-name-see:w Corporate-name-see:p Conference-name-see:w Conference-name-see:p See:w See:p Match:w Match:p Match-heading-see-form:w Match-heading-see-form:p">
115 <xslo:value-of select="."/>
120 <xslo:template mode="index_subfields" match="marc:datafield[@tag='510']">
121 <xslo:for-each select="marc:subfield">
122 <xslo:if test="contains('abcdefgjxyz', @code)">
123 <z:index name="Corporate-name-see-also:w Corporate-name-see-also:p Conference-name-see-also:w Conference-name-see-also:p See-also:w See-also:p Match:w Match:p">
124 <xslo:value-of select="."/>
129 <xslo:template mode="index_subfields" match="marc:datafield[@tag='710']">
130 <xslo:for-each select="marc:subfield">
131 <xslo:if test="contains('abcdefgjxyz', @code)">
132 <z:index name="Corporate-name-parallel:w Corporate-name-parallel:s Conference-name-parallel:w Conference-name-parallel:s Parallel:w Parallel:p Match:w Match:p">
133 <xslo:value-of select="."/>
138 <xslo:template mode="index_subfields" match="marc:datafield[@tag='215']">
139 <xslo:for-each select="marc:subfield">
140 <xslo:if test="contains('ajxyz', @code)">
141 <z:index name="Name-geographic:w Name-geographic:p Name-geographic:s Term-geographic:w Term-geographic:p Term-geographic:s Heading:w Heading:p Heading:s Match:w Match:p Match-heading:w Match-heading:p">
142 <xslo:value-of select="."/>
146 <xslo:for-each select="marc:subfield">
147 <xslo:if test="contains('a', @code)">
148 <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s Name-geographic-heading:w Name-geographic-heading:p Name-geographic-heading:s Term-geographic-heading:w Term-geographic-heading:p Term-geographic-heading:s">
149 <xslo:value-of select="."/>
154 <xslo:template mode="index_subfields" match="marc:datafield[@tag='415']">
155 <xslo:for-each select="marc:subfield">
156 <xslo:if test="contains('ajxyz', @code)">
157 <z:index name="Name-geographic-see:w Name-geographic-see:p Term-geographic-see:w Term-geographic-see:p Term-geographic-see:s See:w See:p See:s Match:w Match:p Match-heading-see-form:w Match-heading-see-form:p">
158 <xslo:value-of select="."/>
163 <xslo:template mode="index_subfields" match="marc:datafield[@tag='515']">
164 <xslo:for-each select="marc:subfield">
165 <xslo:if test="contains('ajxyz', @code)">
166 <z:index name="Name-geographic-see-also:w Name-geographic-see-also:p Term-geographic-see-also:w Term-geographic-see-also:p Term-geographic-see-also:s See-also:w See-also:p Match:w Match:p">
167 <xslo:value-of select="."/>
172 <xslo:template mode="index_subfields" match="marc:datafield[@tag='715']">
173 <xslo:for-each select="marc:subfield">
174 <xslo:if test="contains('ajxyz', @code)">
175 <z:index name="Name-geographic-parallel:w Name-geographic-parallel:s Term-geographic-parallel:w Term-geographic-parallel:s Term-geographic-parallel:p Parallel:w Parallel:p Match:w Match:p">
176 <xslo:value-of select="."/>
181 <xslo:template mode="index_subfields" match="marc:datafield[@tag='216']">
182 <xslo:for-each select="marc:subfield">
183 <xslo:if test="contains('afcjxyz', @code)">
184 <z:index name="Trademark:w Trademark:p Heading:w Heading:p Match:w Match:p Match-heading:w Match-heading:p">
185 <xslo:value-of select="."/>
189 <xslo:for-each select="marc:subfield">
190 <xslo:if test="contains('a', @code)">
191 <z:index name="Heading:s Heading-Main:w Heading-Main:p Heading-Main:s Trademark-heading:w Trademark-heading:p Trademark-heading:s">
192 <xslo:value-of select="."/>
197 <xslo:template mode="index_subfields" match="marc:datafield[@tag='416']">
198 <xslo:for-each select="marc:subfield">
199 <xslo:if test="contains('afcjxyz', @code)">
200 <z:index name="Trademark-see:w Trademark-see:p See:w See:p Match:w Match:p Match-heading-see-form:w Match-heading-see-form:p">
201 <xslo:value-of select="."/>
206 <xslo:template mode="index_subfields" match="marc:datafield[@tag='516']">
207 <xslo:for-each select="marc:subfield">
208 <xslo:if test="contains('afcjxyz', @code)">
209 <z:index name="Trademark-see-also:w Trademark-see-also:p See-also:w See-also:p Match:w Match:p">
210 <xslo:value-of select="."/>
215 <xslo:template mode="index_subfields" match="marc:datafield[@tag='716']">
216 <xslo:for-each select="marc:subfield">
217 <xslo:if test="contains('afcjxyz', @code)">
218 <z:index name="Trademark-parallel:w Trademark-parallel:s Parallel:w Parallel:p Match:w Match:p">
219 <xslo:value-of select="."/>
224 <xslo:template mode="index_subfields" match="marc:datafield[@tag='220']">
225 <xslo:for-each select="marc:subfield">
226 <xslo:if test="contains('afjxyz', @code)">
227 <z:index name="Name:w Name:p Heading:w Heading:p Match:w Match:p Match-heading:w Match-heading:p">
228 <xslo:value-of select="."/>
232 <xslo:for-each select="marc:subfield">
233 <xslo:if test="contains('a', @code)">
234 <z:index name="Heading:s Heading-Main:w Heading-Main:p Heading-Main:s Name-heading:w Name-heading:p Name-heading:s">
235 <xslo:value-of select="."/>
240 <xslo:template mode="index_subfields" match="marc:datafield[@tag='420']">
241 <xslo:for-each select="marc:subfield">
242 <xslo:if test="contains('afjxyz', @code)">
243 <z:index name="Name-see:w Name-see:p See:w See:p Match:w Match:p Match-heading-see-form:w Match-heading-see-form:p">
244 <xslo:value-of select="."/>
249 <xslo:template mode="index_subfields" match="marc:datafield[@tag='520']">
250 <xslo:for-each select="marc:subfield">
251 <xslo:if test="contains('afjxyz', @code)">
252 <z:index name="Name-see-also:w Name-see-also:p See-also:w See-also:p Match:w Match:p">
253 <xslo:value-of select="."/>
258 <xslo:template mode="index_subfields" match="marc:datafield[@tag='720']">
259 <xslo:for-each select="marc:subfield">
260 <xslo:if test="contains('afjxyz', @code)">
261 <z:index name="Name-parallel:w Name-parallel:s Parallel:w Parallel:p Match:w Match:p">
262 <xslo:value-of select="."/>
267 <xslo:template mode="index_subfields" match="marc:datafield[@tag='230']">
268 <xslo:for-each select="marc:subfield">
269 <xslo:if test="contains('abhiklmnqrsuwjxyz', @code)">
270 <z:index name="Title-uniform:w Title-uniform:p Heading:w Heading:p Match:w Match:p Match-heading:w Match-heading:p">
271 <xslo:value-of select="."/>
275 <xslo:for-each select="marc:subfield">
276 <xslo:if test="contains('a', @code)">
277 <z:index name="Heading:s Heading-Main:w Heading-Main:p Heading-Main:s Title-uniform-heading:w Title-uniform-heading:p Title-uniform-heading:s">
278 <xslo:value-of select="."/>
283 <xslo:template mode="index_subfields" match="marc:datafield[@tag='430']">
284 <xslo:for-each select="marc:subfield">
285 <xslo:if test="contains('abhiklmnqrsuwjxyz', @code)">
286 <z:index name="Title-uniform-see:w Title-uniform-see:p See:w See:p Match:w Match:p Match-heading-see-form:w Match-heading-see-form:p">
287 <xslo:value-of select="."/>
292 <xslo:template mode="index_subfields" match="marc:datafield[@tag='530']">
293 <xslo:for-each select="marc:subfield">
294 <xslo:if test="contains('abhiklmnqrsuwjxyz', @code)">
295 <z:index name="Title-uniform-see-also:w Title-uniform-see-also:p See-also:w See-also:p Match:w Match:p">
296 <xslo:value-of select="."/>
301 <xslo:template mode="index_subfields" match="marc:datafield[@tag='730']">
302 <xslo:for-each select="marc:subfield">
303 <xslo:if test="contains('a', @code)">
304 <z:index name="Title-uniform-parallel:w Title-uniform-parallel:s Parallel:w Parallel:p Match:w Match:p">
305 <xslo:value-of select="."/>
310 <xslo:template mode="index_subfields" match="marc:datafield[@tag='235']">
311 <xslo:for-each select="marc:subfield">
312 <xslo:if test="contains('abekmrsuwjxyz', @code)">
313 <z:index name="Title-uniform:w Title-uniform:p Heading:w Heading:p Match:w Match:p Match-heading:w Match-heading:p">
314 <xslo:value-of select="."/>
318 <xslo:for-each select="marc:subfield">
319 <xslo:if test="contains('a', @code)">
320 <z:index name="Heading:s Heading-Main:w Heading-Main:p Heading-Main:s Title-uniform-heading:w Title-uniform-heading:p Title-uniform-heading:s">
321 <xslo:value-of select="."/>
326 <xslo:template mode="index_subfields" match="marc:datafield[@tag='435']">
327 <xslo:for-each select="marc:subfield">
328 <xslo:if test="contains('abekmrsuwjxyz', @code)">
329 <z:index name="Title-uniform-see:w Title-uniform-see:p See:w See:p Match:w Match:p Match-heading-see-form:w Match-heading-see-form:p">
330 <xslo:value-of select="."/>
335 <xslo:template mode="index_subfields" match="marc:datafield[@tag='535']">
336 <xslo:for-each select="marc:subfield">
337 <xslo:if test="contains('abekmrsuwjxyz', @code)">
338 <z:index name="Title-uniform-see-also:w Title-uniform-see-also:p See-also:w See-also:p Match:w Match:p">
339 <xslo:value-of select="."/>
344 <xslo:template mode="index_subfields" match="marc:datafield[@tag='735']">
345 <xslo:for-each select="marc:subfield">
346 <xslo:if test="contains('a', @code)">
347 <z:index name="Title-uniform-parallel:w Title-uniform-parallel:s Parallel:w Parallel:p Match:w Match:p">
348 <xslo:value-of select="."/>
353 <xslo:template mode="index_subfields" match="marc:datafield[@tag='240']">
354 <xslo:for-each select="marc:subfield">
355 <xslo:if test="contains('atjxyz', @code)">
356 <z:index name="Name-Title:w Name-Title:p Heading:w Heading:p Match:w Match:p Match-heading:w Match-heading:p">
357 <xslo:value-of select="."/>
361 <xslo:for-each select="marc:subfield">
362 <xslo:if test="contains('a', @code)">
363 <z:index name="Heading:s Heading-Main:w Heading-Main:p Heading-Main:s Name-Title-heading:w Name-Title-heading:p Name-Title-heading:s">
364 <xslo:value-of select="."/>
369 <xslo:template mode="index_subfields" match="marc:datafield[@tag='440']">
370 <xslo:for-each select="marc:subfield">
371 <xslo:if test="contains('atjxyz', @code)">
372 <z:index name="Name-Title-see:w Name-Title-see:p See:w See:p Match:w Match:p Match-heading-see-form:w Match-heading-see-form:p">
373 <xslo:value-of select="."/>
378 <xslo:template mode="index_subfields" match="marc:datafield[@tag='540']">
379 <xslo:for-each select="marc:subfield">
380 <xslo:if test="contains('atjxyz', @code)">
381 <z:index name="Name-Title-see-also:w Name-Title-see-also:p See-also:w See-also:p Match:w Match:p">
382 <xslo:value-of select="."/>
387 <xslo:template mode="index_subfields" match="marc:datafield[@tag='740']">
388 <xslo:for-each select="marc:subfield">
389 <xslo:if test="contains('a', @code)">
390 <z:index name="Name-Title-parallel:w Name-Title-parallel:s Parallel:w Parallel:p Match:w Match:p">
391 <xslo:value-of select="."/>
396 <xslo:template mode="index_subfields" match="marc:datafield[@tag='245']">
397 <xslo:for-each select="marc:subfield">
398 <xslo:if test="contains('atjxyz', @code)">
399 <z:index name="Title-uniform:w Title-uniform:p Heading:w Heading:p Match:w Match:p Match-heading:w Match-heading:p">
400 <xslo:value-of select="."/>
404 <xslo:for-each select="marc:subfield">
405 <xslo:if test="contains('a', @code)">
406 <z:index name="Heading:s Heading-Main:w Heading-Main:p Heading-Main:s Title-uniform-heading:w Title-uniform-heading:p Title-uniform-heading:s">
407 <xslo:value-of select="."/>
412 <xslo:template mode="index_subfields" match="marc:datafield[@tag='445']">
413 <xslo:for-each select="marc:subfield">
414 <xslo:if test="contains('atjxyz', @code)">
415 <z:index name="Title-uniform-see:w Title-uniform-see:p See:w See:p Match:w Match:p Match-heading-see-form:w Match-heading-see-form:p">
416 <xslo:value-of select="."/>
421 <xslo:template mode="index_subfields" match="marc:datafield[@tag='545']">
422 <xslo:for-each select="marc:subfield">
423 <xslo:if test="contains('atjxyz', @code)">
424 <z:index name="Title-uniform-see-also:w Title-uniform-see-also:p See-also:w See-also:p Match:w Match:p">
425 <xslo:value-of select="."/>
430 <xslo:template mode="index_subfields" match="marc:datafield[@tag='745']">
431 <xslo:for-each select="marc:subfield">
432 <xslo:if test="contains('a', @code)">
433 <z:index name="Title-uniform-parallel:w Title-uniform-parallel:s Parallel:w Parallel:p Match:w Match:p">
434 <xslo:value-of select="."/>
439 <xslo:template mode="index_subfields" match="marc:datafield[@tag='250']">
440 <xslo:for-each select="marc:subfield">
441 <xslo:if test="contains('ajxyz', @code)">
442 <z:index name="Subject:w Subject:p Heading:w Heading:p Match:w Match:p Match-heading:w Match-heading:p Subject-heading:w Subject-heading:p Subject-heading:s">
443 <xslo:value-of select="."/>
447 <xslo:for-each select="marc:subfield">
448 <xslo:if test="contains('a', @code)">
449 <z:index name="Heading:s Heading-Main:w Heading-Main:p Heading-Main:s">
450 <xslo:value-of select="."/>
455 <xslo:template mode="index_subfields" match="marc:datafield[@tag='450']">
456 <xslo:for-each select="marc:subfield">
457 <xslo:if test="contains('ajxyz', @code)">
458 <z:index name="Subject-see:w Subject-see:p See:w See:p Match:w Match:p Match-heading-see-form:w Match-heading-see-form:p">
459 <xslo:value-of select="."/>
464 <xslo:template mode="index_subfields" match="marc:datafield[@tag='550']">
465 <xslo:for-each select="marc:subfield">
466 <xslo:if test="contains('ajxyz', @code)">
467 <z:index name="Subject-see-also:w Subject-see-also:p See-also:w See-also:p Match:w Match:p">
468 <xslo:value-of select="."/>
473 <xslo:template mode="index_subfields" match="marc:datafield[@tag='750']">
474 <xslo:for-each select="marc:subfield">
475 <xslo:if test="contains('a', @code)">
476 <z:index name="Subject-parallel:w Subject-parallel:s Parallel:w Parallel:p Match:w Match:p">
477 <xslo:value-of select="."/>
482 <xslo:template mode="index_subfields" match="marc:datafield[@tag='260']">
483 <xslo:for-each select="marc:subfield">
484 <xslo:if test="contains('abcdjxyz', @code)">
485 <z:index name="Place:w Place:p Heading:w Heading:p Match:w Match:p Match-heading:w Match-heading:p Place-heading:w Place-heading:p Place-heading:s">
486 <xslo:value-of select="."/>
490 <xslo:for-each select="marc:subfield">
491 <xslo:if test="contains('a', @code)">
492 <z:index name="Heading:s Heading-Main:w Heading-Main:p Heading-Main:s">
493 <xslo:value-of select="."/>
498 <xslo:template mode="index_subfields" match="marc:datafield[@tag='460']">
499 <xslo:for-each select="marc:subfield">
500 <xslo:if test="contains('abcdjxyz', @code)">
501 <z:index name="Place-see:w Place-see:p See:w See:p Match:w Match:p Match-heading-see-form:w Match-heading-see-form:p">
502 <xslo:value-of select="."/>
507 <xslo:template mode="index_subfields" match="marc:datafield[@tag='560']">
508 <xslo:for-each select="marc:subfield">
509 <xslo:if test="contains('abcdjxyz', @code)">
510 <z:index name="Place-see-also:w Place-see-also:p See-also:w See-also:p Match:w Match:p">
511 <xslo:value-of select="."/>
516 <xslo:template mode="index_subfields" match="marc:datafield[@tag='760']">
517 <xslo:for-each select="marc:subfield">
518 <xslo:if test="contains('a', @code)">
519 <z:index name="Place-parallel:w Place-parallel:s Parallel:w Parallel:p Match:w Match:p">
520 <xslo:value-of select="."/>
525 <xslo:template mode="index_subfields" match="marc:datafield[@tag='280']">
526 <xslo:for-each select="marc:subfield">
527 <xslo:if test="contains('ajxyz', @code)">
528 <z:index name="Form:w Form:p Heading:w Heading:p Match:w Match:p Match-heading:w Match-heading:p Form-heading:w Form-heading:p Form-heading:s">
529 <xslo:value-of select="."/>
533 <xslo:for-each select="marc:subfield">
534 <xslo:if test="contains('a', @code)">
535 <z:index name="Heading:s Heading-Main:w Heading-Main:p Heading-Main:s">
536 <xslo:value-of select="."/>
541 <xslo:template mode="index_subfields" match="marc:datafield[@tag='480']">
542 <xslo:for-each select="marc:subfield">
543 <xslo:if test="contains('ajxyz', @code)">
544 <z:index name="Form-see:w Form-see:p See:w See:p Match:w Match:p Match-heading-see-form:w Match-heading-see-form:p">
545 <xslo:value-of select="."/>
550 <xslo:template mode="index_subfields" match="marc:datafield[@tag='580']">
551 <xslo:for-each select="marc:subfield">
552 <xslo:if test="contains('ajxyz', @code)">
553 <z:index name="Form-see-also:w Form-see-also:p See-also:w See-also:p Match:w Match:p">
554 <xslo:value-of select="."/>
559 <xslo:template mode="index_subfields" match="marc:datafield[@tag='780']">
560 <xslo:for-each select="marc:subfield">
561 <xslo:if test="contains('a', @code)">
562 <z:index name="Form-parallel:w Form-parallel:s Parallel:w Parallel:p Match:w Match:p">
563 <xslo:value-of select="."/>
568 <xslo:template mode="index_subfields" match="marc:datafield[@tag='300']">
569 <xslo:for-each select="marc:subfield">
570 <xslo:if test="contains('a', @code)">
571 <z:index name="Note:w Note:p">
572 <xslo:value-of select="."/>
577 <xslo:template mode="index_subfields" match="marc:datafield[@tag='305']">
578 <xslo:for-each select="marc:subfield">
579 <xslo:if test="contains('a', @code)">
580 <z:index name="Note:w Note:p">
581 <xslo:value-of select="."/>
586 <xslo:template mode="index_subfields" match="marc:datafield[@tag='310']">
587 <xslo:for-each select="marc:subfield">
588 <xslo:if test="contains('a', @code)">
589 <z:index name="Note:w Note:p">
590 <xslo:value-of select="."/>
595 <xslo:template mode="index_subfields" match="marc:datafield[@tag='320']">
596 <xslo:for-each select="marc:subfield">
597 <xslo:if test="contains('a', @code)">
598 <z:index name="Note:w Note:p">
599 <xslo:value-of select="."/>
604 <xslo:template mode="index_subfields" match="marc:datafield[@tag='330']">
605 <xslo:for-each select="marc:subfield">
606 <xslo:if test="contains('a', @code)">
607 <z:index name="Note:w Note:p">
608 <xslo:value-of select="."/>
613 <xslo:template mode="index_subfields" match="marc:datafield[@tag='340']">
614 <xslo:for-each select="marc:subfield">
615 <xslo:if test="contains('a', @code)">
616 <z:index name="Note:w Note:p">
617 <xslo:value-of select="."/>
622 <xslo:template mode="index_subfields" match="marc:datafield[@tag='356']">
623 <xslo:for-each select="marc:subfield">
624 <xslo:if test="contains('a', @code)">
625 <z:index name="Note:w Note:p">
626 <xslo:value-of select="."/>
631 <xslo:template mode="index_subfields" match="marc:datafield[@tag='152']">
632 <xslo:for-each select="marc:subfield">
633 <xslo:if test="contains('b', @code)">
634 <z:index name="authtype:w authtype:p">
635 <xslo:value-of select="."/>
640 <xslo:template mode="index_subfields" match="marc:datafield[@tag='942']">
641 <xslo:for-each select="marc:subfield">
642 <xslo:if test="contains('a', @code)">
643 <z:index name="authtype:w">
644 <xslo:value-of select="."/>
649 <xslo:template mode="index_all" match="text()">
650 <z:index name="Any:w Any:p">
651 <xslo:value-of select="."/>
654 <xslo:template name="chopPunctuation">
655 <xslo:param name="chopString"/>
656 <xslo:variable name="length" select="string-length($chopString)"/>
658 <xslo:when test="$length=0"/>
659 <xslo:when test="contains('-,.:=;!%/', substring($chopString,$length,1))">
660 <xslo:call-template name="chopPunctuation">
661 <xslo:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>
662 </xslo:call-template>
664 <xslo:when test="not($chopString)"/>
666 <xslo:value-of select="$chopString"/>