Line 0
Link Here
|
0 |
- |
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
|
2 |
<!-- |
3 |
This file has been automatically generated from a Koha index definition file |
4 |
with the stylesheet koha-indexdefs-to-zebra.xsl. Do not manually edit this file, |
5 |
as it may be overwritten. To regenerate, edit the appropriate Koha index |
6 |
definition file (probably something like {biblio,authority}-koha-indexdefs.xml) and run: |
7 |
`xsltproc koha-indexdefs-to-zebra.xsl {biblio,authority}-koha-indexdefs.xml > |
8 |
{biblio,authority}-zebra-indexdefs.xsl` (substituting the appropriate file names). |
9 |
--> |
10 |
<xslo:stylesheet xmlns:xslo="http://www.w3.org/1999/XSL/Transform" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:z="http://indexdata.com/zebra-2.0" xmlns:kohaidx="http://www.koha-community.org/schemas/index-defs" version="1.0"> |
11 |
<xslo:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/> |
12 |
<xslo:template match="text()"/> |
13 |
<xslo:template match="text()" mode="index_subfields"/> |
14 |
<xslo:template match="text()" mode="index_data_field"/> |
15 |
<xslo:template match="text()" mode="index_heading"/> |
16 |
<xslo:template match="text()" mode="index_heading_conditional"/> |
17 |
<xslo:template match="text()" mode="index_match_heading"/> |
18 |
<xslo:template match="text()" mode="index_subject_thesaurus"/> |
19 |
<xslo:template match="/"> |
20 |
<xslo:if test="marc:collection"> |
21 |
<collection> |
22 |
<xslo:apply-templates select="marc:collection/marc:record"/> |
23 |
</collection> |
24 |
</xslo:if> |
25 |
<xslo:if test="marc:record"> |
26 |
<xslo:apply-templates select="marc:record"/> |
27 |
</xslo:if> |
28 |
</xslo:template> |
29 |
<xslo:template match="marc:record"> |
30 |
<xslo:variable name="controlField001" select="normalize-space(marc:controlfield[@tag='001'])"/> |
31 |
<z:record type="update"> |
32 |
<xslo:attribute name="z:id"> |
33 |
<xslo:value-of select="$controlField001"/> |
34 |
</xslo:attribute> |
35 |
<xslo:apply-templates/> |
36 |
<xslo:apply-templates mode="index_subfields"/> |
37 |
<xslo:apply-templates mode="index_data_field"/> |
38 |
<xslo:apply-templates mode="index_heading"/> |
39 |
<xslo:apply-templates mode="index_heading_conditional"/> |
40 |
<xslo:apply-templates mode="index_match_heading"/> |
41 |
<xslo:apply-templates mode="index_subject_thesaurus"/> |
42 |
</z:record> |
43 |
</xslo:template> |
44 |
<xslo:template match="marc:leader"> |
45 |
<z:index name="Record-status:w"> |
46 |
<xslo:value-of select="substring(., 6, 1)"/> |
47 |
</z:index> |
48 |
<z:index name="Encoding-level:w"> |
49 |
<xslo:value-of select="substring(., 18, 1)"/> |
50 |
</z:index> |
51 |
</xslo:template> |
52 |
<xslo:template match="marc:controlfield[@tag='001']"> |
53 |
<z:index name="Local-Number:w Local-Number:s"> |
54 |
<xslo:value-of select="."/> |
55 |
</z:index> |
56 |
</xslo:template> |
57 |
<xslo:template match="marc:controlfield[@tag='008']"> |
58 |
<z:index name="Kind-of-record:w"> |
59 |
<xslo:value-of select="substring(., 10, 1)"/> |
60 |
</z:index> |
61 |
<z:index name="Descriptive-cataloging-rules:w"> |
62 |
<xslo:value-of select="substring(., 11, 1)"/> |
63 |
</z:index> |
64 |
<z:index name="Heading-use-main-or-added-entry:w"> |
65 |
<xslo:value-of select="substring(., 15, 1)"/> |
66 |
</z:index> |
67 |
<z:index name="Heading-use-subject-added-entry:w"> |
68 |
<xslo:value-of select="substring(., 16, 1)"/> |
69 |
</z:index> |
70 |
<z:index name="Heading-use-series-added-entry:w"> |
71 |
<xslo:value-of select="substring(., 17, 1)"/> |
72 |
</z:index> |
73 |
</xslo:template> |
74 |
<xslo:template mode="index_subfields" match="marc:datafield[@tag='010']"> |
75 |
<xslo:for-each select="marc:subfield"> |
76 |
<xslo:if test="contains('az', @code)"> |
77 |
<z:index name="LC-card-number:w LC-card-number:p"> |
78 |
<xslo:value-of select="."/> |
79 |
</z:index> |
80 |
</xslo:if> |
81 |
</xslo:for-each> |
82 |
</xslo:template> |
83 |
<xslo:template mode="index_subfields" match="marc:datafield[@tag='040']"> |
84 |
<xslo:for-each select="marc:subfield"> |
85 |
<xslo:if test="contains('acd', @code)"> |
86 |
<z:index name="Record-source:w Record-source:p"> |
87 |
<xslo:value-of select="."/> |
88 |
</z:index> |
89 |
</xslo:if> |
90 |
</xslo:for-each> |
91 |
</xslo:template> |
92 |
<xslo:template mode="index_subfields" match="marc:datafield[@tag='200']"> |
93 |
<xslo:for-each select="marc:subfield"> |
94 |
<xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)"> |
95 |
<z:index name="Personal-name:w Personal-name:p Personal-name:s"> |
96 |
<xslo:value-of select="."/> |
97 |
</z:index> |
98 |
</xslo:if> |
99 |
</xslo:for-each> |
100 |
</xslo:template> |
101 |
<xslo:template mode="index_subfields" match="marc:datafield[@tag='210']"> |
102 |
<xslo:for-each select="marc:subfield"> |
103 |
<xslo:if test="contains('abcdefghklmnoprstvxyz', @code)"> |
104 |
<z:index name="Corporate-name:w Corporate-name:p"> |
105 |
<xslo:value-of select="."/> |
106 |
</z:index> |
107 |
</xslo:if> |
108 |
</xslo:for-each> |
109 |
</xslo:template> |
110 |
<xslo:template mode="index_subfields" match="marc:datafield[@tag='211']"> |
111 |
<xslo:for-each select="marc:subfield"> |
112 |
<xslo:if test="contains('acdefghjklnpqstvxyz', @code)"> |
113 |
<z:index name="Meeting-name:w Meeting-name:p"> |
114 |
<xslo:value-of select="."/> |
115 |
</z:index> |
116 |
</xslo:if> |
117 |
</xslo:for-each> |
118 |
</xslo:template> |
119 |
<xslo:template mode="index_subfields" match="marc:datafield[@tag='230']"> |
120 |
<xslo:for-each select="marc:subfield"> |
121 |
<xslo:if test="contains('adfghklmnoprstvxyz', @code)"> |
122 |
<z:index name="Title-uniform:w Title-uniform:p"> |
123 |
<xslo:value-of select="."/> |
124 |
</z:index> |
125 |
</xslo:if> |
126 |
</xslo:for-each> |
127 |
</xslo:template> |
128 |
<xslo:template mode="index_subfields" match="marc:datafield[@tag='250']"> |
129 |
<xslo:for-each select="marc:subfield"> |
130 |
<xslo:if test="contains('abjxyz', @code)"> |
131 |
<z:index name="Subject-topical:w Subject-topical:p"> |
132 |
<xslo:value-of select="."/> |
133 |
</z:index> |
134 |
</xslo:if> |
135 |
</xslo:for-each> |
136 |
</xslo:template> |
137 |
<xslo:template mode="index_subfields" match="marc:datafield[@tag='251']"> |
138 |
<xslo:for-each select="marc:subfield"> |
139 |
<xslo:if test="contains('ajxyz', @code)"> |
140 |
<z:index name="Name-geographic:w Name-geographic:p"> |
141 |
<xslo:value-of select="."/> |
142 |
</z:index> |
143 |
</xslo:if> |
144 |
</xslo:for-each> |
145 |
</xslo:template> |
146 |
<xslo:template mode="index_subfields" match="marc:datafield[@tag='155']"> |
147 |
<xslo:for-each select="marc:subfield"> |
148 |
<xslo:if test="contains('ajxyz', @code)"> |
149 |
<z:index name="Term-genre-form:w Term-genre-form:p"> |
150 |
<xslo:value-of select="."/> |
151 |
</z:index> |
152 |
</xslo:if> |
153 |
</xslo:for-each> |
154 |
</xslo:template> |
155 |
<xslo:template mode="index_subfields" match="marc:datafield[@tag='152']"> |
156 |
<xslo:for-each select="marc:subfield"> |
157 |
<xslo:if test="contains('b', @code)"> |
158 |
<z:index name="authtype:w"> |
159 |
<xslo:value-of select="."/> |
160 |
</z:index> |
161 |
</xslo:if> |
162 |
</xslo:for-each> |
163 |
</xslo:template> |
164 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='200']"> |
165 |
<z:index name="Personal-name-heading:w Personal-name-heading:p Personal-name-heading:s Heading:w Heading:p Heading:s"> |
166 |
<xslo:variable name="raw_heading"> |
167 |
<xslo:for-each select="marc:subfield"> |
168 |
<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"> |
169 |
<xslo:if test="position() > 1"> |
170 |
<xslo:choose> |
171 |
<xslo:when test="contains('jxyz', @code)"> |
172 |
<xslo:text>--</xslo:text> |
173 |
</xslo:when> |
174 |
<xslo:otherwise> |
175 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
176 |
</xslo:otherwise> |
177 |
</xslo:choose> |
178 |
</xslo:if> |
179 |
<xslo:value-of select="."/> |
180 |
</xslo:if> |
181 |
</xslo:for-each> |
182 |
</xslo:variable> |
183 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
184 |
</z:index> |
185 |
<z:index name="Heading-Main:w Heading-Main:p Heading-Main:s"> |
186 |
<xslo:variable name="raw_heading"> |
187 |
<xslo:for-each select="marc:subfield"> |
188 |
<xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s"> |
189 |
<xslo:if test="position() > 1"> |
190 |
<xslo:choose> |
191 |
<xslo:when test="contains('', @code)"> |
192 |
<xslo:text>--</xslo:text> |
193 |
</xslo:when> |
194 |
<xslo:otherwise> |
195 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
196 |
</xslo:otherwise> |
197 |
</xslo:choose> |
198 |
</xslo:if> |
199 |
<xslo:value-of select="."/> |
200 |
</xslo:if> |
201 |
</xslo:for-each> |
202 |
</xslo:variable> |
203 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
204 |
</z:index> |
205 |
</xslo:template> |
206 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='400']"> |
207 |
<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"> |
208 |
<xslo:variable name="raw_heading"> |
209 |
<xslo:for-each select="marc:subfield"> |
210 |
<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"> |
211 |
<xslo:if test="position() > 1"> |
212 |
<xslo:choose> |
213 |
<xslo:when test="contains('jxyz', @code)"> |
214 |
<xslo:text>--</xslo:text> |
215 |
</xslo:when> |
216 |
<xslo:otherwise> |
217 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
218 |
</xslo:otherwise> |
219 |
</xslo:choose> |
220 |
</xslo:if> |
221 |
<xslo:value-of select="."/> |
222 |
</xslo:if> |
223 |
</xslo:for-each> |
224 |
</xslo:variable> |
225 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
226 |
</z:index> |
227 |
</xslo:template> |
228 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='500']"> |
229 |
<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"> |
230 |
<xslo:variable name="raw_heading"> |
231 |
<xslo:for-each select="marc:subfield"> |
232 |
<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"> |
233 |
<xslo:if test="position() > 1"> |
234 |
<xslo:choose> |
235 |
<xslo:when test="contains('jxyz', @code)"> |
236 |
<xslo:text>--</xslo:text> |
237 |
</xslo:when> |
238 |
<xslo:otherwise> |
239 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
240 |
</xslo:otherwise> |
241 |
</xslo:choose> |
242 |
</xslo:if> |
243 |
<xslo:value-of select="."/> |
244 |
</xslo:if> |
245 |
</xslo:for-each> |
246 |
</xslo:variable> |
247 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
248 |
</z:index> |
249 |
</xslo:template> |
250 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='210']"> |
251 |
<z:index name="Corporate-name-heading:w Corporate-name-heading:p Corporate-name-heading:s Heading:w Heading:p Heading:s"> |
252 |
<xslo:variable name="raw_heading"> |
253 |
<xslo:for-each select="marc:subfield"> |
254 |
<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"> |
255 |
<xslo:if test="position() > 1"> |
256 |
<xslo:choose> |
257 |
<xslo:when test="contains('jxyz', @code)"> |
258 |
<xslo:text>--</xslo:text> |
259 |
</xslo:when> |
260 |
<xslo:otherwise> |
261 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
262 |
</xslo:otherwise> |
263 |
</xslo:choose> |
264 |
</xslo:if> |
265 |
<xslo:value-of select="."/> |
266 |
</xslo:if> |
267 |
</xslo:for-each> |
268 |
</xslo:variable> |
269 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
270 |
</z:index> |
271 |
<z:index name="Heading-Main:w Heading-Main:p Heading-Main:s"> |
272 |
<xslo:variable name="raw_heading"> |
273 |
<xslo:for-each select="marc:subfield"> |
274 |
<xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s"> |
275 |
<xslo:if test="position() > 1"> |
276 |
<xslo:choose> |
277 |
<xslo:when test="contains('', @code)"> |
278 |
<xslo:text>--</xslo:text> |
279 |
</xslo:when> |
280 |
<xslo:otherwise> |
281 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
282 |
</xslo:otherwise> |
283 |
</xslo:choose> |
284 |
</xslo:if> |
285 |
<xslo:value-of select="."/> |
286 |
</xslo:if> |
287 |
</xslo:for-each> |
288 |
</xslo:variable> |
289 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
290 |
</z:index> |
291 |
</xslo:template> |
292 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='410']"> |
293 |
<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"> |
294 |
<xslo:variable name="raw_heading"> |
295 |
<xslo:for-each select="marc:subfield"> |
296 |
<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"> |
297 |
<xslo:if test="position() > 1"> |
298 |
<xslo:choose> |
299 |
<xslo:when test="contains('jxyz', @code)"> |
300 |
<xslo:text>--</xslo:text> |
301 |
</xslo:when> |
302 |
<xslo:otherwise> |
303 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
304 |
</xslo:otherwise> |
305 |
</xslo:choose> |
306 |
</xslo:if> |
307 |
<xslo:value-of select="."/> |
308 |
</xslo:if> |
309 |
</xslo:for-each> |
310 |
</xslo:variable> |
311 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
312 |
</z:index> |
313 |
</xslo:template> |
314 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='510']"> |
315 |
<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"> |
316 |
<xslo:variable name="raw_heading"> |
317 |
<xslo:for-each select="marc:subfield"> |
318 |
<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"> |
319 |
<xslo:if test="position() > 1"> |
320 |
<xslo:choose> |
321 |
<xslo:when test="contains('jxyz', @code)"> |
322 |
<xslo:text>--</xslo:text> |
323 |
</xslo:when> |
324 |
<xslo:otherwise> |
325 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
326 |
</xslo:otherwise> |
327 |
</xslo:choose> |
328 |
</xslo:if> |
329 |
<xslo:value-of select="."/> |
330 |
</xslo:if> |
331 |
</xslo:for-each> |
332 |
</xslo:variable> |
333 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
334 |
</z:index> |
335 |
</xslo:template> |
336 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='211']"> |
337 |
<z:index name="Meeting-name-heading:w Meeting-name-heading:p Meeting-name-heading:s Heading:w Heading:p Heading:s"> |
338 |
<xslo:variable name="raw_heading"> |
339 |
<xslo:for-each select="marc:subfield"> |
340 |
<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"> |
341 |
<xslo:if test="position() > 1"> |
342 |
<xslo:choose> |
343 |
<xslo:when test="contains('jxyz', @code)"> |
344 |
<xslo:text>--</xslo:text> |
345 |
</xslo:when> |
346 |
<xslo:otherwise> |
347 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
348 |
</xslo:otherwise> |
349 |
</xslo:choose> |
350 |
</xslo:if> |
351 |
<xslo:value-of select="."/> |
352 |
</xslo:if> |
353 |
</xslo:for-each> |
354 |
</xslo:variable> |
355 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
356 |
</z:index> |
357 |
<z:index name="Heading-Main:w Heading-Main:p Heading-Main:s"> |
358 |
<xslo:variable name="raw_heading"> |
359 |
<xslo:for-each select="marc:subfield"> |
360 |
<xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s"> |
361 |
<xslo:if test="position() > 1"> |
362 |
<xslo:choose> |
363 |
<xslo:when test="contains('', @code)"> |
364 |
<xslo:text>--</xslo:text> |
365 |
</xslo:when> |
366 |
<xslo:otherwise> |
367 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
368 |
</xslo:otherwise> |
369 |
</xslo:choose> |
370 |
</xslo:if> |
371 |
<xslo:value-of select="."/> |
372 |
</xslo:if> |
373 |
</xslo:for-each> |
374 |
</xslo:variable> |
375 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
376 |
</z:index> |
377 |
</xslo:template> |
378 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='411']"> |
379 |
<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"> |
380 |
<xslo:variable name="raw_heading"> |
381 |
<xslo:for-each select="marc:subfield"> |
382 |
<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"> |
383 |
<xslo:if test="position() > 1"> |
384 |
<xslo:choose> |
385 |
<xslo:when test="contains('jxyz', @code)"> |
386 |
<xslo:text>--</xslo:text> |
387 |
</xslo:when> |
388 |
<xslo:otherwise> |
389 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
390 |
</xslo:otherwise> |
391 |
</xslo:choose> |
392 |
</xslo:if> |
393 |
<xslo:value-of select="."/> |
394 |
</xslo:if> |
395 |
</xslo:for-each> |
396 |
</xslo:variable> |
397 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
398 |
</z:index> |
399 |
</xslo:template> |
400 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='511']"> |
401 |
<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"> |
402 |
<xslo:variable name="raw_heading"> |
403 |
<xslo:for-each select="marc:subfield"> |
404 |
<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"> |
405 |
<xslo:if test="position() > 1"> |
406 |
<xslo:choose> |
407 |
<xslo:when test="contains('jxyz', @code)"> |
408 |
<xslo:text>--</xslo:text> |
409 |
</xslo:when> |
410 |
<xslo:otherwise> |
411 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
412 |
</xslo:otherwise> |
413 |
</xslo:choose> |
414 |
</xslo:if> |
415 |
<xslo:value-of select="."/> |
416 |
</xslo:if> |
417 |
</xslo:for-each> |
418 |
</xslo:variable> |
419 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
420 |
</z:index> |
421 |
</xslo:template> |
422 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='230']"> |
423 |
<z:index name="Title-uniform-heading:w Title-uniform-heading:p Title-uniform-heading:s Heading:w Heading:p Heading:s"> |
424 |
<xslo:variable name="raw_heading"> |
425 |
<xslo:for-each select="marc:subfield"> |
426 |
<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"> |
427 |
<xslo:if test="position() > 1"> |
428 |
<xslo:choose> |
429 |
<xslo:when test="contains('jxyz', @code)"> |
430 |
<xslo:text>--</xslo:text> |
431 |
</xslo:when> |
432 |
<xslo:otherwise> |
433 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
434 |
</xslo:otherwise> |
435 |
</xslo:choose> |
436 |
</xslo:if> |
437 |
<xslo:value-of select="."/> |
438 |
</xslo:if> |
439 |
</xslo:for-each> |
440 |
</xslo:variable> |
441 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
442 |
</z:index> |
443 |
<z:index name="Heading-Main:w Heading-Main:p Heading-Main:s"> |
444 |
<xslo:variable name="raw_heading"> |
445 |
<xslo:for-each select="marc:subfield"> |
446 |
<xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s"> |
447 |
<xslo:if test="position() > 1"> |
448 |
<xslo:choose> |
449 |
<xslo:when test="contains('', @code)"> |
450 |
<xslo:text>--</xslo:text> |
451 |
</xslo:when> |
452 |
<xslo:otherwise> |
453 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
454 |
</xslo:otherwise> |
455 |
</xslo:choose> |
456 |
</xslo:if> |
457 |
<xslo:value-of select="."/> |
458 |
</xslo:if> |
459 |
</xslo:for-each> |
460 |
</xslo:variable> |
461 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
462 |
</z:index> |
463 |
</xslo:template> |
464 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='430']"> |
465 |
<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"> |
466 |
<xslo:variable name="raw_heading"> |
467 |
<xslo:for-each select="marc:subfield"> |
468 |
<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"> |
469 |
<xslo:if test="position() > 1"> |
470 |
<xslo:choose> |
471 |
<xslo:when test="contains('jxyz', @code)"> |
472 |
<xslo:text>--</xslo:text> |
473 |
</xslo:when> |
474 |
<xslo:otherwise> |
475 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
476 |
</xslo:otherwise> |
477 |
</xslo:choose> |
478 |
</xslo:if> |
479 |
<xslo:value-of select="."/> |
480 |
</xslo:if> |
481 |
</xslo:for-each> |
482 |
</xslo:variable> |
483 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
484 |
</z:index> |
485 |
</xslo:template> |
486 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='530']"> |
487 |
<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"> |
488 |
<xslo:variable name="raw_heading"> |
489 |
<xslo:for-each select="marc:subfield"> |
490 |
<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"> |
491 |
<xslo:if test="position() > 1"> |
492 |
<xslo:choose> |
493 |
<xslo:when test="contains('jxyz', @code)"> |
494 |
<xslo:text>--</xslo:text> |
495 |
</xslo:when> |
496 |
<xslo:otherwise> |
497 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
498 |
</xslo:otherwise> |
499 |
</xslo:choose> |
500 |
</xslo:if> |
501 |
<xslo:value-of select="."/> |
502 |
</xslo:if> |
503 |
</xslo:for-each> |
504 |
</xslo:variable> |
505 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
506 |
</z:index> |
507 |
</xslo:template> |
508 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='250']"> |
509 |
<z:index name="Subject-topical-heading:w Subject-topical-heading:p Subject-topical-heading:s Heading:w Heading:p Heading:s"> |
510 |
<xslo:variable name="raw_heading"> |
511 |
<xslo:for-each select="marc:subfield"> |
512 |
<xslo:if test="contains('abjxyz', @code)" name="Subject-topical-heading:w Subject-topical-heading:p Subject-topical-heading:s Heading:w Heading:p Heading:s"> |
513 |
<xslo:if test="position() > 1"> |
514 |
<xslo:choose> |
515 |
<xslo:when test="contains('jxyz', @code)"> |
516 |
<xslo:text>--</xslo:text> |
517 |
</xslo:when> |
518 |
<xslo:otherwise> |
519 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
520 |
</xslo:otherwise> |
521 |
</xslo:choose> |
522 |
</xslo:if> |
523 |
<xslo:value-of select="."/> |
524 |
</xslo:if> |
525 |
</xslo:for-each> |
526 |
</xslo:variable> |
527 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
528 |
</z:index> |
529 |
<z:index name="Heading-Main:w Heading-Main:p Heading-Main:s"> |
530 |
<xslo:variable name="raw_heading"> |
531 |
<xslo:for-each select="marc:subfield"> |
532 |
<xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s"> |
533 |
<xslo:if test="position() > 1"> |
534 |
<xslo:choose> |
535 |
<xslo:when test="contains('', @code)"> |
536 |
<xslo:text>--</xslo:text> |
537 |
</xslo:when> |
538 |
<xslo:otherwise> |
539 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
540 |
</xslo:otherwise> |
541 |
</xslo:choose> |
542 |
</xslo:if> |
543 |
<xslo:value-of select="."/> |
544 |
</xslo:if> |
545 |
</xslo:for-each> |
546 |
</xslo:variable> |
547 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
548 |
</z:index> |
549 |
</xslo:template> |
550 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='450']"> |
551 |
<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"> |
552 |
<xslo:variable name="raw_heading"> |
553 |
<xslo:for-each select="marc:subfield"> |
554 |
<xslo:if test="contains('abvjyz', @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"> |
555 |
<xslo:if test="position() > 1"> |
556 |
<xslo:choose> |
557 |
<xslo:when test="contains('jxyz', @code)"> |
558 |
<xslo:text>--</xslo:text> |
559 |
</xslo:when> |
560 |
<xslo:otherwise> |
561 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
562 |
</xslo:otherwise> |
563 |
</xslo:choose> |
564 |
</xslo:if> |
565 |
<xslo:value-of select="."/> |
566 |
</xslo:if> |
567 |
</xslo:for-each> |
568 |
</xslo:variable> |
569 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
570 |
</z:index> |
571 |
</xslo:template> |
572 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='550']"> |
573 |
<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"> |
574 |
<xslo:variable name="raw_heading"> |
575 |
<xslo:for-each select="marc:subfield"> |
576 |
<xslo:if test="contains('abjxyz', @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"> |
577 |
<xslo:if test="position() > 1"> |
578 |
<xslo:choose> |
579 |
<xslo:when test="contains('jxyz', @code)"> |
580 |
<xslo:text>--</xslo:text> |
581 |
</xslo:when> |
582 |
<xslo:otherwise> |
583 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
584 |
</xslo:otherwise> |
585 |
</xslo:choose> |
586 |
</xslo:if> |
587 |
<xslo:value-of select="."/> |
588 |
</xslo:if> |
589 |
</xslo:for-each> |
590 |
</xslo:variable> |
591 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
592 |
</z:index> |
593 |
</xslo:template> |
594 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='251']"> |
595 |
<z:index name="Name-geographic-heading:w Name-geographic-heading:p Name-geographic-heading:s Heading:w Heading:p Heading:s"> |
596 |
<xslo:variable name="raw_heading"> |
597 |
<xslo:for-each select="marc:subfield"> |
598 |
<xslo:if test="contains('ajxyz', @code)" name="Name-geographic-heading:w Name-geographic-heading:p Name-geographic-heading:s Heading:w Heading:p Heading:s"> |
599 |
<xslo:if test="position() > 1"> |
600 |
<xslo:choose> |
601 |
<xslo:when test="contains('jxyz', @code)"> |
602 |
<xslo:text>--</xslo:text> |
603 |
</xslo:when> |
604 |
<xslo:otherwise> |
605 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
606 |
</xslo:otherwise> |
607 |
</xslo:choose> |
608 |
</xslo:if> |
609 |
<xslo:value-of select="."/> |
610 |
</xslo:if> |
611 |
</xslo:for-each> |
612 |
</xslo:variable> |
613 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
614 |
</z:index> |
615 |
<z:index name="Heading-Main:w Heading-Main:p Heading-Main:s"> |
616 |
<xslo:variable name="raw_heading"> |
617 |
<xslo:for-each select="marc:subfield"> |
618 |
<xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s"> |
619 |
<xslo:if test="position() > 1"> |
620 |
<xslo:choose> |
621 |
<xslo:when test="contains('', @code)"> |
622 |
<xslo:text>--</xslo:text> |
623 |
</xslo:when> |
624 |
<xslo:otherwise> |
625 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
626 |
</xslo:otherwise> |
627 |
</xslo:choose> |
628 |
</xslo:if> |
629 |
<xslo:value-of select="."/> |
630 |
</xslo:if> |
631 |
</xslo:for-each> |
632 |
</xslo:variable> |
633 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
634 |
</z:index> |
635 |
</xslo:template> |
636 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='451']"> |
637 |
<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"> |
638 |
<xslo:variable name="raw_heading"> |
639 |
<xslo:for-each select="marc:subfield"> |
640 |
<xslo:if test="contains('ajxyz', @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"> |
641 |
<xslo:if test="position() > 1"> |
642 |
<xslo:choose> |
643 |
<xslo:when test="contains('jxyz', @code)"> |
644 |
<xslo:text>--</xslo:text> |
645 |
</xslo:when> |
646 |
<xslo:otherwise> |
647 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
648 |
</xslo:otherwise> |
649 |
</xslo:choose> |
650 |
</xslo:if> |
651 |
<xslo:value-of select="."/> |
652 |
</xslo:if> |
653 |
</xslo:for-each> |
654 |
</xslo:variable> |
655 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
656 |
</z:index> |
657 |
</xslo:template> |
658 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='551']"> |
659 |
<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"> |
660 |
<xslo:variable name="raw_heading"> |
661 |
<xslo:for-each select="marc:subfield"> |
662 |
<xslo:if test="contains('ajxyz', @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"> |
663 |
<xslo:if test="position() > 1"> |
664 |
<xslo:choose> |
665 |
<xslo:when test="contains('jxyz', @code)"> |
666 |
<xslo:text>--</xslo:text> |
667 |
</xslo:when> |
668 |
<xslo:otherwise> |
669 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
670 |
</xslo:otherwise> |
671 |
</xslo:choose> |
672 |
</xslo:if> |
673 |
<xslo:value-of select="."/> |
674 |
</xslo:if> |
675 |
</xslo:for-each> |
676 |
</xslo:variable> |
677 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
678 |
</z:index> |
679 |
</xslo:template> |
680 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='155']"> |
681 |
<z:index name="Term-genre-form-heading:w Term-genre-form-heading:p Term-genre-form-heading:s Heading:w Heading:p Heading:s"> |
682 |
<xslo:variable name="raw_heading"> |
683 |
<xslo:for-each select="marc:subfield"> |
684 |
<xslo:if test="contains('ajxyz', @code)" name="Term-genre-form-heading:w Term-genre-form-heading:p Term-genre-form-heading:s Heading:w Heading:p Heading:s"> |
685 |
<xslo:if test="position() > 1"> |
686 |
<xslo:choose> |
687 |
<xslo:when test="contains('jxyz', @code)"> |
688 |
<xslo:text>--</xslo:text> |
689 |
</xslo:when> |
690 |
<xslo:otherwise> |
691 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
692 |
</xslo:otherwise> |
693 |
</xslo:choose> |
694 |
</xslo:if> |
695 |
<xslo:value-of select="."/> |
696 |
</xslo:if> |
697 |
</xslo:for-each> |
698 |
</xslo:variable> |
699 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
700 |
</z:index> |
701 |
<z:index name="Heading-Main:w Heading-Main:p Heading-Main:s"> |
702 |
<xslo:variable name="raw_heading"> |
703 |
<xslo:for-each select="marc:subfield"> |
704 |
<xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s"> |
705 |
<xslo:if test="position() > 1"> |
706 |
<xslo:choose> |
707 |
<xslo:when test="contains('', @code)"> |
708 |
<xslo:text>--</xslo:text> |
709 |
</xslo:when> |
710 |
<xslo:otherwise> |
711 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
712 |
</xslo:otherwise> |
713 |
</xslo:choose> |
714 |
</xslo:if> |
715 |
<xslo:value-of select="."/> |
716 |
</xslo:if> |
717 |
</xslo:for-each> |
718 |
</xslo:variable> |
719 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
720 |
</z:index> |
721 |
</xslo:template> |
722 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='455']"> |
723 |
<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"> |
724 |
<xslo:variable name="raw_heading"> |
725 |
<xslo:for-each select="marc:subfield"> |
726 |
<xslo:if test="contains('ajxyz', @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"> |
727 |
<xslo:if test="position() > 1"> |
728 |
<xslo:choose> |
729 |
<xslo:when test="contains('jxyz', @code)"> |
730 |
<xslo:text>--</xslo:text> |
731 |
</xslo:when> |
732 |
<xslo:otherwise> |
733 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
734 |
</xslo:otherwise> |
735 |
</xslo:choose> |
736 |
</xslo:if> |
737 |
<xslo:value-of select="."/> |
738 |
</xslo:if> |
739 |
</xslo:for-each> |
740 |
</xslo:variable> |
741 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
742 |
</z:index> |
743 |
</xslo:template> |
744 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='555']"> |
745 |
<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"> |
746 |
<xslo:variable name="raw_heading"> |
747 |
<xslo:for-each select="marc:subfield"> |
748 |
<xslo:if test="contains('ajxyz', @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"> |
749 |
<xslo:if test="position() > 1"> |
750 |
<xslo:choose> |
751 |
<xslo:when test="contains('jxyz', @code)"> |
752 |
<xslo:text>--</xslo:text> |
753 |
</xslo:when> |
754 |
<xslo:otherwise> |
755 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
756 |
</xslo:otherwise> |
757 |
</xslo:choose> |
758 |
</xslo:if> |
759 |
<xslo:value-of select="."/> |
760 |
</xslo:if> |
761 |
</xslo:for-each> |
762 |
</xslo:variable> |
763 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
764 |
</z:index> |
765 |
</xslo:template> |
766 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='280']"> |
767 |
<z:index name="General-subdivision:w General-subdivision:p General-subdivision:s Subdivision:w Subdivision:p Subdivision:s"> |
768 |
<xslo:variable name="raw_heading"> |
769 |
<xslo:for-each select="marc:subfield"> |
770 |
<xslo:if test="contains('jxyz', @code)" name="General-subdivision:w General-subdivision:p General-subdivision:s Subdivision:w Subdivision:p Subdivision:s"> |
771 |
<xslo:if test="position() > 1"> |
772 |
<xslo:choose> |
773 |
<xslo:when test="contains('jxyz', @code)"> |
774 |
<xslo:text>--</xslo:text> |
775 |
</xslo:when> |
776 |
<xslo:otherwise> |
777 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
778 |
</xslo:otherwise> |
779 |
</xslo:choose> |
780 |
</xslo:if> |
781 |
<xslo:value-of select="."/> |
782 |
</xslo:if> |
783 |
</xslo:for-each> |
784 |
</xslo:variable> |
785 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
786 |
</z:index> |
787 |
</xslo:template> |
788 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='480']"> |
789 |
<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"> |
790 |
<xslo:variable name="raw_heading"> |
791 |
<xslo:for-each select="marc:subfield"> |
792 |
<xslo:if test="contains('jxyz', @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"> |
793 |
<xslo:if test="position() > 1"> |
794 |
<xslo:choose> |
795 |
<xslo:when test="contains('jxyz', @code)"> |
796 |
<xslo:text>--</xslo:text> |
797 |
</xslo:when> |
798 |
<xslo:otherwise> |
799 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
800 |
</xslo:otherwise> |
801 |
</xslo:choose> |
802 |
</xslo:if> |
803 |
<xslo:value-of select="."/> |
804 |
</xslo:if> |
805 |
</xslo:for-each> |
806 |
</xslo:variable> |
807 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
808 |
</z:index> |
809 |
</xslo:template> |
810 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='580']"> |
811 |
<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"> |
812 |
<xslo:variable name="raw_heading"> |
813 |
<xslo:for-each select="marc:subfield"> |
814 |
<xslo:if test="contains('jxyz', @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"> |
815 |
<xslo:if test="position() > 1"> |
816 |
<xslo:choose> |
817 |
<xslo:when test="contains('jxyz', @code)"> |
818 |
<xslo:text>--</xslo:text> |
819 |
</xslo:when> |
820 |
<xslo:otherwise> |
821 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
822 |
</xslo:otherwise> |
823 |
</xslo:choose> |
824 |
</xslo:if> |
825 |
<xslo:value-of select="."/> |
826 |
</xslo:if> |
827 |
</xslo:for-each> |
828 |
</xslo:variable> |
829 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
830 |
</z:index> |
831 |
</xslo:template> |
832 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='281']"> |
833 |
<z:index name="Geographic-subdivision:w Geographic-subdivision:p Geographic-subdivision:s Subdivision:w Subdivision:p Subdivision:s"> |
834 |
<xslo:variable name="raw_heading"> |
835 |
<xslo:for-each select="marc:subfield"> |
836 |
<xslo:if test="contains('jxyz', @code)" name="Geographic-subdivision:w Geographic-subdivision:p Geographic-subdivision:s Subdivision:w Subdivision:p Subdivision:s"> |
837 |
<xslo:if test="position() > 1"> |
838 |
<xslo:choose> |
839 |
<xslo:when test="contains('jxyz', @code)"> |
840 |
<xslo:text>--</xslo:text> |
841 |
</xslo:when> |
842 |
<xslo:otherwise> |
843 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
844 |
</xslo:otherwise> |
845 |
</xslo:choose> |
846 |
</xslo:if> |
847 |
<xslo:value-of select="."/> |
848 |
</xslo:if> |
849 |
</xslo:for-each> |
850 |
</xslo:variable> |
851 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
852 |
</z:index> |
853 |
</xslo:template> |
854 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='481']"> |
855 |
<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"> |
856 |
<xslo:variable name="raw_heading"> |
857 |
<xslo:for-each select="marc:subfield"> |
858 |
<xslo:if test="contains('jxyz', @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"> |
859 |
<xslo:if test="position() > 1"> |
860 |
<xslo:choose> |
861 |
<xslo:when test="contains('jxyz', @code)"> |
862 |
<xslo:text>--</xslo:text> |
863 |
</xslo:when> |
864 |
<xslo:otherwise> |
865 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
866 |
</xslo:otherwise> |
867 |
</xslo:choose> |
868 |
</xslo:if> |
869 |
<xslo:value-of select="."/> |
870 |
</xslo:if> |
871 |
</xslo:for-each> |
872 |
</xslo:variable> |
873 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
874 |
</z:index> |
875 |
</xslo:template> |
876 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='581']"> |
877 |
<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"> |
878 |
<xslo:variable name="raw_heading"> |
879 |
<xslo:for-each select="marc:subfield"> |
880 |
<xslo:if test="contains('jxyz', @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"> |
881 |
<xslo:if test="position() > 1"> |
882 |
<xslo:choose> |
883 |
<xslo:when test="contains('jxyz', @code)"> |
884 |
<xslo:text>--</xslo:text> |
885 |
</xslo:when> |
886 |
<xslo:otherwise> |
887 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
888 |
</xslo:otherwise> |
889 |
</xslo:choose> |
890 |
</xslo:if> |
891 |
<xslo:value-of select="."/> |
892 |
</xslo:if> |
893 |
</xslo:for-each> |
894 |
</xslo:variable> |
895 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
896 |
</z:index> |
897 |
</xslo:template> |
898 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='282']"> |
899 |
<z:index name="Chronological-subdivision:w Chronological-subdivision:p Chronological-subdivision:s Subdivision:w Subdivision:p Subdivision:s"> |
900 |
<xslo:variable name="raw_heading"> |
901 |
<xslo:for-each select="marc:subfield"> |
902 |
<xslo:if test="contains('jxyz', @code)" name="Chronological-subdivision:w Chronological-subdivision:p Chronological-subdivision:s Subdivision:w Subdivision:p Subdivision:s"> |
903 |
<xslo:if test="position() > 1"> |
904 |
<xslo:choose> |
905 |
<xslo:when test="contains('jxyz', @code)"> |
906 |
<xslo:text>--</xslo:text> |
907 |
</xslo:when> |
908 |
<xslo:otherwise> |
909 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
910 |
</xslo:otherwise> |
911 |
</xslo:choose> |
912 |
</xslo:if> |
913 |
<xslo:value-of select="."/> |
914 |
</xslo:if> |
915 |
</xslo:for-each> |
916 |
</xslo:variable> |
917 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
918 |
</z:index> |
919 |
</xslo:template> |
920 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='482']"> |
921 |
<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"> |
922 |
<xslo:variable name="raw_heading"> |
923 |
<xslo:for-each select="marc:subfield"> |
924 |
<xslo:if test="contains('jxyz', @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"> |
925 |
<xslo:if test="position() > 1"> |
926 |
<xslo:choose> |
927 |
<xslo:when test="contains('jxyz', @code)"> |
928 |
<xslo:text>--</xslo:text> |
929 |
</xslo:when> |
930 |
<xslo:otherwise> |
931 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
932 |
</xslo:otherwise> |
933 |
</xslo:choose> |
934 |
</xslo:if> |
935 |
<xslo:value-of select="."/> |
936 |
</xslo:if> |
937 |
</xslo:for-each> |
938 |
</xslo:variable> |
939 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
940 |
</z:index> |
941 |
</xslo:template> |
942 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='582']"> |
943 |
<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"> |
944 |
<xslo:variable name="raw_heading"> |
945 |
<xslo:for-each select="marc:subfield"> |
946 |
<xslo:if test="contains('jxyz', @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"> |
947 |
<xslo:if test="position() > 1"> |
948 |
<xslo:choose> |
949 |
<xslo:when test="contains('jxyz', @code)"> |
950 |
<xslo:text>--</xslo:text> |
951 |
</xslo:when> |
952 |
<xslo:otherwise> |
953 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
954 |
</xslo:otherwise> |
955 |
</xslo:choose> |
956 |
</xslo:if> |
957 |
<xslo:value-of select="."/> |
958 |
</xslo:if> |
959 |
</xslo:for-each> |
960 |
</xslo:variable> |
961 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
962 |
</z:index> |
963 |
</xslo:template> |
964 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='185']"> |
965 |
<z:index name="Form-subdivision:w Form-subdivision:p Form-subdivision:s Subdivision:w Subdivision:p Subdivision:s"> |
966 |
<xslo:variable name="raw_heading"> |
967 |
<xslo:for-each select="marc:subfield"> |
968 |
<xslo:if test="contains('jxyz', @code)" name="Form-subdivision:w Form-subdivision:p Form-subdivision:s Subdivision:w Subdivision:p Subdivision:s"> |
969 |
<xslo:if test="position() > 1"> |
970 |
<xslo:choose> |
971 |
<xslo:when test="contains('jxyz', @code)"> |
972 |
<xslo:text>--</xslo:text> |
973 |
</xslo:when> |
974 |
<xslo:otherwise> |
975 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
976 |
</xslo:otherwise> |
977 |
</xslo:choose> |
978 |
</xslo:if> |
979 |
<xslo:value-of select="."/> |
980 |
</xslo:if> |
981 |
</xslo:for-each> |
982 |
</xslo:variable> |
983 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
984 |
</z:index> |
985 |
</xslo:template> |
986 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='485']"> |
987 |
<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"> |
988 |
<xslo:variable name="raw_heading"> |
989 |
<xslo:for-each select="marc:subfield"> |
990 |
<xslo:if test="contains('jxyz', @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"> |
991 |
<xslo:if test="position() > 1"> |
992 |
<xslo:choose> |
993 |
<xslo:when test="contains('jxyz', @code)"> |
994 |
<xslo:text>--</xslo:text> |
995 |
</xslo:when> |
996 |
<xslo:otherwise> |
997 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
998 |
</xslo:otherwise> |
999 |
</xslo:choose> |
1000 |
</xslo:if> |
1001 |
<xslo:value-of select="."/> |
1002 |
</xslo:if> |
1003 |
</xslo:for-each> |
1004 |
</xslo:variable> |
1005 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1006 |
</z:index> |
1007 |
</xslo:template> |
1008 |
<xslo:template mode="index_heading" match="marc:datafield[@tag='585']"> |
1009 |
<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"> |
1010 |
<xslo:variable name="raw_heading"> |
1011 |
<xslo:for-each select="marc:subfield"> |
1012 |
<xslo:if test="contains('jxyz', @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"> |
1013 |
<xslo:if test="position() > 1"> |
1014 |
<xslo:choose> |
1015 |
<xslo:when test="contains('jxyz', @code)"> |
1016 |
<xslo:text>--</xslo:text> |
1017 |
</xslo:when> |
1018 |
<xslo:otherwise> |
1019 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1020 |
</xslo:otherwise> |
1021 |
</xslo:choose> |
1022 |
</xslo:if> |
1023 |
<xslo:value-of select="."/> |
1024 |
</xslo:if> |
1025 |
</xslo:for-each> |
1026 |
</xslo:variable> |
1027 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1028 |
</z:index> |
1029 |
</xslo:template> |
1030 |
<xslo:template mode="index_heading_conditional"> |
1031 |
<xslo:if test="substring(marc:subfield[@code='w']/text(), 2, 1)"> |
1032 |
<z:index name="Previous-heading-see-from:p"> |
1033 |
<xslo:variable name="raw_heading"> |
1034 |
<xslo:for-each select="marc:subfield"> |
1035 |
<xslo:if test="contains('abvxyz', @code)" name="Previous-heading-see-from:p"> |
1036 |
<xslo:if test="position() > 1"> |
1037 |
<xslo:choose> |
1038 |
<xslo:when test="contains('jxyz', @code)"> |
1039 |
<xslo:text>--</xslo:text> |
1040 |
</xslo:when> |
1041 |
<xslo:otherwise> |
1042 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1043 |
</xslo:otherwise> |
1044 |
</xslo:choose> |
1045 |
</xslo:if> |
1046 |
<xslo:value-of select="."/> |
1047 |
</xslo:if> |
1048 |
</xslo:for-each> |
1049 |
</xslo:variable> |
1050 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1051 |
</z:index> |
1052 |
</xslo:if> |
1053 |
</xslo:template> |
1054 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='100']"> |
1055 |
<z:index name="Match:w Match:p Match-heading:p Match-heading:s"> |
1056 |
<xslo:variable name="raw_heading"> |
1057 |
<xslo:for-each select="marc:subfield"> |
1058 |
<xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Match:w Match:p Match-heading:p Match-heading:s"> |
1059 |
<xslo:if test="position() > 1"> |
1060 |
<xslo:choose> |
1061 |
<xslo:when test="contains('jxyz', @code)"> |
1062 |
<xslo:choose> |
1063 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1064 |
<xslo:text> generalsubdiv </xslo:text> |
1065 |
</xslo:when> |
1066 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1067 |
<xslo:text> formsubdiv </xslo:text> |
1068 |
</xslo:when> |
1069 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1070 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1071 |
</xslo:when> |
1072 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1073 |
<xslo:text> geographicsubdiv </xslo:text> |
1074 |
</xslo:when> |
1075 |
</xslo:choose> |
1076 |
</xslo:when> |
1077 |
<xslo:otherwise> |
1078 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1079 |
</xslo:otherwise> |
1080 |
</xslo:choose> |
1081 |
</xslo:if> |
1082 |
<xslo:call-template name="chopPunctuation"> |
1083 |
<xslo:with-param name="chopString"> |
1084 |
<xslo:value-of select="."/> |
1085 |
</xslo:with-param> |
1086 |
</xslo:call-template> |
1087 |
</xslo:if> |
1088 |
</xslo:for-each> |
1089 |
</xslo:variable> |
1090 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1091 |
</z:index> |
1092 |
</xslo:template> |
1093 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='400']"> |
1094 |
<z:index name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s"> |
1095 |
<xslo:variable name="raw_heading"> |
1096 |
<xslo:for-each select="marc:subfield"> |
1097 |
<xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s"> |
1098 |
<xslo:if test="position() > 1"> |
1099 |
<xslo:choose> |
1100 |
<xslo:when test="contains('jxyz', @code)"> |
1101 |
<xslo:choose> |
1102 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1103 |
<xslo:text> generalsubdiv </xslo:text> |
1104 |
</xslo:when> |
1105 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1106 |
<xslo:text> formsubdiv </xslo:text> |
1107 |
</xslo:when> |
1108 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1109 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1110 |
</xslo:when> |
1111 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1112 |
<xslo:text> geographicsubdiv </xslo:text> |
1113 |
</xslo:when> |
1114 |
</xslo:choose> |
1115 |
</xslo:when> |
1116 |
<xslo:otherwise> |
1117 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1118 |
</xslo:otherwise> |
1119 |
</xslo:choose> |
1120 |
</xslo:if> |
1121 |
<xslo:call-template name="chopPunctuation"> |
1122 |
<xslo:with-param name="chopString"> |
1123 |
<xslo:value-of select="."/> |
1124 |
</xslo:with-param> |
1125 |
</xslo:call-template> |
1126 |
</xslo:if> |
1127 |
</xslo:for-each> |
1128 |
</xslo:variable> |
1129 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1130 |
</z:index> |
1131 |
</xslo:template> |
1132 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='500']"> |
1133 |
<z:index name="Match:w Match:p"> |
1134 |
<xslo:variable name="raw_heading"> |
1135 |
<xslo:for-each select="marc:subfield"> |
1136 |
<xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Match:w Match:p"> |
1137 |
<xslo:if test="position() > 1"> |
1138 |
<xslo:choose> |
1139 |
<xslo:when test="contains('jxyz', @code)"> |
1140 |
<xslo:choose> |
1141 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1142 |
<xslo:text> generalsubdiv </xslo:text> |
1143 |
</xslo:when> |
1144 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1145 |
<xslo:text> formsubdiv </xslo:text> |
1146 |
</xslo:when> |
1147 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1148 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1149 |
</xslo:when> |
1150 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1151 |
<xslo:text> geographicsubdiv </xslo:text> |
1152 |
</xslo:when> |
1153 |
</xslo:choose> |
1154 |
</xslo:when> |
1155 |
<xslo:otherwise> |
1156 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1157 |
</xslo:otherwise> |
1158 |
</xslo:choose> |
1159 |
</xslo:if> |
1160 |
<xslo:call-template name="chopPunctuation"> |
1161 |
<xslo:with-param name="chopString"> |
1162 |
<xslo:value-of select="."/> |
1163 |
</xslo:with-param> |
1164 |
</xslo:call-template> |
1165 |
</xslo:if> |
1166 |
</xslo:for-each> |
1167 |
</xslo:variable> |
1168 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1169 |
</z:index> |
1170 |
</xslo:template> |
1171 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='210']"> |
1172 |
<z:index name="Match:w Match:p Match-heading:p Match-heading:s"> |
1173 |
<xslo:variable name="raw_heading"> |
1174 |
<xslo:for-each select="marc:subfield"> |
1175 |
<xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Match:w Match:p Match-heading:p Match-heading:s"> |
1176 |
<xslo:if test="position() > 1"> |
1177 |
<xslo:choose> |
1178 |
<xslo:when test="contains('jxyz', @code)"> |
1179 |
<xslo:choose> |
1180 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1181 |
<xslo:text> generalsubdiv </xslo:text> |
1182 |
</xslo:when> |
1183 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1184 |
<xslo:text> formsubdiv </xslo:text> |
1185 |
</xslo:when> |
1186 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1187 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1188 |
</xslo:when> |
1189 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1190 |
<xslo:text> geographicsubdiv </xslo:text> |
1191 |
</xslo:when> |
1192 |
</xslo:choose> |
1193 |
</xslo:when> |
1194 |
<xslo:otherwise> |
1195 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1196 |
</xslo:otherwise> |
1197 |
</xslo:choose> |
1198 |
</xslo:if> |
1199 |
<xslo:call-template name="chopPunctuation"> |
1200 |
<xslo:with-param name="chopString"> |
1201 |
<xslo:value-of select="."/> |
1202 |
</xslo:with-param> |
1203 |
</xslo:call-template> |
1204 |
</xslo:if> |
1205 |
</xslo:for-each> |
1206 |
</xslo:variable> |
1207 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1208 |
</z:index> |
1209 |
</xslo:template> |
1210 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='410']"> |
1211 |
<z:index name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s"> |
1212 |
<xslo:variable name="raw_heading"> |
1213 |
<xslo:for-each select="marc:subfield"> |
1214 |
<xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s"> |
1215 |
<xslo:if test="position() > 1"> |
1216 |
<xslo:choose> |
1217 |
<xslo:when test="contains('jxyz', @code)"> |
1218 |
<xslo:choose> |
1219 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1220 |
<xslo:text> generalsubdiv </xslo:text> |
1221 |
</xslo:when> |
1222 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1223 |
<xslo:text> formsubdiv </xslo:text> |
1224 |
</xslo:when> |
1225 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1226 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1227 |
</xslo:when> |
1228 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1229 |
<xslo:text> geographicsubdiv </xslo:text> |
1230 |
</xslo:when> |
1231 |
</xslo:choose> |
1232 |
</xslo:when> |
1233 |
<xslo:otherwise> |
1234 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1235 |
</xslo:otherwise> |
1236 |
</xslo:choose> |
1237 |
</xslo:if> |
1238 |
<xslo:call-template name="chopPunctuation"> |
1239 |
<xslo:with-param name="chopString"> |
1240 |
<xslo:value-of select="."/> |
1241 |
</xslo:with-param> |
1242 |
</xslo:call-template> |
1243 |
</xslo:if> |
1244 |
</xslo:for-each> |
1245 |
</xslo:variable> |
1246 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1247 |
</z:index> |
1248 |
</xslo:template> |
1249 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='510']"> |
1250 |
<z:index name="Match:w Match:p"> |
1251 |
<xslo:variable name="raw_heading"> |
1252 |
<xslo:for-each select="marc:subfield"> |
1253 |
<xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Match:w Match:p"> |
1254 |
<xslo:if test="position() > 1"> |
1255 |
<xslo:choose> |
1256 |
<xslo:when test="contains('jxyz', @code)"> |
1257 |
<xslo:choose> |
1258 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1259 |
<xslo:text> generalsubdiv </xslo:text> |
1260 |
</xslo:when> |
1261 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1262 |
<xslo:text> formsubdiv </xslo:text> |
1263 |
</xslo:when> |
1264 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1265 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1266 |
</xslo:when> |
1267 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1268 |
<xslo:text> geographicsubdiv </xslo:text> |
1269 |
</xslo:when> |
1270 |
</xslo:choose> |
1271 |
</xslo:when> |
1272 |
<xslo:otherwise> |
1273 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1274 |
</xslo:otherwise> |
1275 |
</xslo:choose> |
1276 |
</xslo:if> |
1277 |
<xslo:call-template name="chopPunctuation"> |
1278 |
<xslo:with-param name="chopString"> |
1279 |
<xslo:value-of select="."/> |
1280 |
</xslo:with-param> |
1281 |
</xslo:call-template> |
1282 |
</xslo:if> |
1283 |
</xslo:for-each> |
1284 |
</xslo:variable> |
1285 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1286 |
</z:index> |
1287 |
</xslo:template> |
1288 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='211']"> |
1289 |
<z:index name="Match:w Match:p Match-heading:p Match-heading:s"> |
1290 |
<xslo:variable name="raw_heading"> |
1291 |
<xslo:for-each select="marc:subfield"> |
1292 |
<xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Match:w Match:p Match-heading:p Match-heading:s"> |
1293 |
<xslo:if test="position() > 1"> |
1294 |
<xslo:choose> |
1295 |
<xslo:when test="contains('jxyz', @code)"> |
1296 |
<xslo:choose> |
1297 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1298 |
<xslo:text> generalsubdiv </xslo:text> |
1299 |
</xslo:when> |
1300 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1301 |
<xslo:text> formsubdiv </xslo:text> |
1302 |
</xslo:when> |
1303 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1304 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1305 |
</xslo:when> |
1306 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1307 |
<xslo:text> geographicsubdiv </xslo:text> |
1308 |
</xslo:when> |
1309 |
</xslo:choose> |
1310 |
</xslo:when> |
1311 |
<xslo:otherwise> |
1312 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1313 |
</xslo:otherwise> |
1314 |
</xslo:choose> |
1315 |
</xslo:if> |
1316 |
<xslo:call-template name="chopPunctuation"> |
1317 |
<xslo:with-param name="chopString"> |
1318 |
<xslo:value-of select="."/> |
1319 |
</xslo:with-param> |
1320 |
</xslo:call-template> |
1321 |
</xslo:if> |
1322 |
</xslo:for-each> |
1323 |
</xslo:variable> |
1324 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1325 |
</z:index> |
1326 |
</xslo:template> |
1327 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='411']"> |
1328 |
<z:index name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s"> |
1329 |
<xslo:variable name="raw_heading"> |
1330 |
<xslo:for-each select="marc:subfield"> |
1331 |
<xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s"> |
1332 |
<xslo:if test="position() > 1"> |
1333 |
<xslo:choose> |
1334 |
<xslo:when test="contains('jxyz', @code)"> |
1335 |
<xslo:choose> |
1336 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1337 |
<xslo:text> generalsubdiv </xslo:text> |
1338 |
</xslo:when> |
1339 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1340 |
<xslo:text> formsubdiv </xslo:text> |
1341 |
</xslo:when> |
1342 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1343 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1344 |
</xslo:when> |
1345 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1346 |
<xslo:text> geographicsubdiv </xslo:text> |
1347 |
</xslo:when> |
1348 |
</xslo:choose> |
1349 |
</xslo:when> |
1350 |
<xslo:otherwise> |
1351 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1352 |
</xslo:otherwise> |
1353 |
</xslo:choose> |
1354 |
</xslo:if> |
1355 |
<xslo:call-template name="chopPunctuation"> |
1356 |
<xslo:with-param name="chopString"> |
1357 |
<xslo:value-of select="."/> |
1358 |
</xslo:with-param> |
1359 |
</xslo:call-template> |
1360 |
</xslo:if> |
1361 |
</xslo:for-each> |
1362 |
</xslo:variable> |
1363 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1364 |
</z:index> |
1365 |
</xslo:template> |
1366 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='511']"> |
1367 |
<z:index name="Match:w Match:p"> |
1368 |
<xslo:variable name="raw_heading"> |
1369 |
<xslo:for-each select="marc:subfield"> |
1370 |
<xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Match:w Match:p"> |
1371 |
<xslo:if test="position() > 1"> |
1372 |
<xslo:choose> |
1373 |
<xslo:when test="contains('jxyz', @code)"> |
1374 |
<xslo:choose> |
1375 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1376 |
<xslo:text> generalsubdiv </xslo:text> |
1377 |
</xslo:when> |
1378 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1379 |
<xslo:text> formsubdiv </xslo:text> |
1380 |
</xslo:when> |
1381 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1382 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1383 |
</xslo:when> |
1384 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1385 |
<xslo:text> geographicsubdiv </xslo:text> |
1386 |
</xslo:when> |
1387 |
</xslo:choose> |
1388 |
</xslo:when> |
1389 |
<xslo:otherwise> |
1390 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1391 |
</xslo:otherwise> |
1392 |
</xslo:choose> |
1393 |
</xslo:if> |
1394 |
<xslo:call-template name="chopPunctuation"> |
1395 |
<xslo:with-param name="chopString"> |
1396 |
<xslo:value-of select="."/> |
1397 |
</xslo:with-param> |
1398 |
</xslo:call-template> |
1399 |
</xslo:if> |
1400 |
</xslo:for-each> |
1401 |
</xslo:variable> |
1402 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1403 |
</z:index> |
1404 |
</xslo:template> |
1405 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='230']"> |
1406 |
<z:index name="Match:w Match:p Match-heading:p Match-heading:s"> |
1407 |
<xslo:variable name="raw_heading"> |
1408 |
<xslo:for-each select="marc:subfield"> |
1409 |
<xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Match:w Match:p Match-heading:p Match-heading:s"> |
1410 |
<xslo:if test="position() > 1"> |
1411 |
<xslo:choose> |
1412 |
<xslo:when test="contains('jxyz', @code)"> |
1413 |
<xslo:choose> |
1414 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1415 |
<xslo:text> generalsubdiv </xslo:text> |
1416 |
</xslo:when> |
1417 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1418 |
<xslo:text> formsubdiv </xslo:text> |
1419 |
</xslo:when> |
1420 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1421 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1422 |
</xslo:when> |
1423 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1424 |
<xslo:text> geographicsubdiv </xslo:text> |
1425 |
</xslo:when> |
1426 |
</xslo:choose> |
1427 |
</xslo:when> |
1428 |
<xslo:otherwise> |
1429 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1430 |
</xslo:otherwise> |
1431 |
</xslo:choose> |
1432 |
</xslo:if> |
1433 |
<xslo:call-template name="chopPunctuation"> |
1434 |
<xslo:with-param name="chopString"> |
1435 |
<xslo:value-of select="."/> |
1436 |
</xslo:with-param> |
1437 |
</xslo:call-template> |
1438 |
</xslo:if> |
1439 |
</xslo:for-each> |
1440 |
</xslo:variable> |
1441 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1442 |
</z:index> |
1443 |
</xslo:template> |
1444 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='430']"> |
1445 |
<z:index name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s"> |
1446 |
<xslo:variable name="raw_heading"> |
1447 |
<xslo:for-each select="marc:subfield"> |
1448 |
<xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s"> |
1449 |
<xslo:if test="position() > 1"> |
1450 |
<xslo:choose> |
1451 |
<xslo:when test="contains('jxyz', @code)"> |
1452 |
<xslo:choose> |
1453 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1454 |
<xslo:text> generalsubdiv </xslo:text> |
1455 |
</xslo:when> |
1456 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1457 |
<xslo:text> formsubdiv </xslo:text> |
1458 |
</xslo:when> |
1459 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1460 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1461 |
</xslo:when> |
1462 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1463 |
<xslo:text> geographicsubdiv </xslo:text> |
1464 |
</xslo:when> |
1465 |
</xslo:choose> |
1466 |
</xslo:when> |
1467 |
<xslo:otherwise> |
1468 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1469 |
</xslo:otherwise> |
1470 |
</xslo:choose> |
1471 |
</xslo:if> |
1472 |
<xslo:call-template name="chopPunctuation"> |
1473 |
<xslo:with-param name="chopString"> |
1474 |
<xslo:value-of select="."/> |
1475 |
</xslo:with-param> |
1476 |
</xslo:call-template> |
1477 |
</xslo:if> |
1478 |
</xslo:for-each> |
1479 |
</xslo:variable> |
1480 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1481 |
</z:index> |
1482 |
</xslo:template> |
1483 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='530']"> |
1484 |
<z:index name="Match:w Match:p"> |
1485 |
<xslo:variable name="raw_heading"> |
1486 |
<xslo:for-each select="marc:subfield"> |
1487 |
<xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Match:w Match:p"> |
1488 |
<xslo:if test="position() > 1"> |
1489 |
<xslo:choose> |
1490 |
<xslo:when test="contains('jxyz', @code)"> |
1491 |
<xslo:choose> |
1492 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1493 |
<xslo:text> generalsubdiv </xslo:text> |
1494 |
</xslo:when> |
1495 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1496 |
<xslo:text> formsubdiv </xslo:text> |
1497 |
</xslo:when> |
1498 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1499 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1500 |
</xslo:when> |
1501 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1502 |
<xslo:text> geographicsubdiv </xslo:text> |
1503 |
</xslo:when> |
1504 |
</xslo:choose> |
1505 |
</xslo:when> |
1506 |
<xslo:otherwise> |
1507 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1508 |
</xslo:otherwise> |
1509 |
</xslo:choose> |
1510 |
</xslo:if> |
1511 |
<xslo:call-template name="chopPunctuation"> |
1512 |
<xslo:with-param name="chopString"> |
1513 |
<xslo:value-of select="."/> |
1514 |
</xslo:with-param> |
1515 |
</xslo:call-template> |
1516 |
</xslo:if> |
1517 |
</xslo:for-each> |
1518 |
</xslo:variable> |
1519 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1520 |
</z:index> |
1521 |
</xslo:template> |
1522 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='250']"> |
1523 |
<z:index name="Match:w Match:p Match-heading:p Match-heading:s"> |
1524 |
<xslo:variable name="raw_heading"> |
1525 |
<xslo:for-each select="marc:subfield"> |
1526 |
<xslo:if test="contains('abjxyz', @code)" name="Match:w Match:p Match-heading:p Match-heading:s"> |
1527 |
<xslo:if test="position() > 1"> |
1528 |
<xslo:choose> |
1529 |
<xslo:when test="contains('jxyz', @code)"> |
1530 |
<xslo:choose> |
1531 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1532 |
<xslo:text> generalsubdiv </xslo:text> |
1533 |
</xslo:when> |
1534 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1535 |
<xslo:text> formsubdiv </xslo:text> |
1536 |
</xslo:when> |
1537 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1538 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1539 |
</xslo:when> |
1540 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1541 |
<xslo:text> geographicsubdiv </xslo:text> |
1542 |
</xslo:when> |
1543 |
</xslo:choose> |
1544 |
</xslo:when> |
1545 |
<xslo:otherwise> |
1546 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1547 |
</xslo:otherwise> |
1548 |
</xslo:choose> |
1549 |
</xslo:if> |
1550 |
<xslo:call-template name="chopPunctuation"> |
1551 |
<xslo:with-param name="chopString"> |
1552 |
<xslo:value-of select="."/> |
1553 |
</xslo:with-param> |
1554 |
</xslo:call-template> |
1555 |
</xslo:if> |
1556 |
</xslo:for-each> |
1557 |
</xslo:variable> |
1558 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1559 |
</z:index> |
1560 |
</xslo:template> |
1561 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='450']"> |
1562 |
<z:index name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s"> |
1563 |
<xslo:variable name="raw_heading"> |
1564 |
<xslo:for-each select="marc:subfield"> |
1565 |
<xslo:if test="contains('abjxyz', @code)" name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s"> |
1566 |
<xslo:if test="position() > 1"> |
1567 |
<xslo:choose> |
1568 |
<xslo:when test="contains('jxyz', @code)"> |
1569 |
<xslo:choose> |
1570 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1571 |
<xslo:text> generalsubdiv </xslo:text> |
1572 |
</xslo:when> |
1573 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1574 |
<xslo:text> formsubdiv </xslo:text> |
1575 |
</xslo:when> |
1576 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1577 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1578 |
</xslo:when> |
1579 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1580 |
<xslo:text> geographicsubdiv </xslo:text> |
1581 |
</xslo:when> |
1582 |
</xslo:choose> |
1583 |
</xslo:when> |
1584 |
<xslo:otherwise> |
1585 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1586 |
</xslo:otherwise> |
1587 |
</xslo:choose> |
1588 |
</xslo:if> |
1589 |
<xslo:call-template name="chopPunctuation"> |
1590 |
<xslo:with-param name="chopString"> |
1591 |
<xslo:value-of select="."/> |
1592 |
</xslo:with-param> |
1593 |
</xslo:call-template> |
1594 |
</xslo:if> |
1595 |
</xslo:for-each> |
1596 |
</xslo:variable> |
1597 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1598 |
</z:index> |
1599 |
</xslo:template> |
1600 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='550']"> |
1601 |
<z:index name="Match:w Match:p"> |
1602 |
<xslo:variable name="raw_heading"> |
1603 |
<xslo:for-each select="marc:subfield"> |
1604 |
<xslo:if test="contains('abjxyz', @code)" name="Match:w Match:p"> |
1605 |
<xslo:if test="position() > 1"> |
1606 |
<xslo:choose> |
1607 |
<xslo:when test="contains('jxyz', @code)"> |
1608 |
<xslo:choose> |
1609 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1610 |
<xslo:text> generalsubdiv </xslo:text> |
1611 |
</xslo:when> |
1612 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1613 |
<xslo:text> formsubdiv </xslo:text> |
1614 |
</xslo:when> |
1615 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1616 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1617 |
</xslo:when> |
1618 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1619 |
<xslo:text> geographicsubdiv </xslo:text> |
1620 |
</xslo:when> |
1621 |
</xslo:choose> |
1622 |
</xslo:when> |
1623 |
<xslo:otherwise> |
1624 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1625 |
</xslo:otherwise> |
1626 |
</xslo:choose> |
1627 |
</xslo:if> |
1628 |
<xslo:call-template name="chopPunctuation"> |
1629 |
<xslo:with-param name="chopString"> |
1630 |
<xslo:value-of select="."/> |
1631 |
</xslo:with-param> |
1632 |
</xslo:call-template> |
1633 |
</xslo:if> |
1634 |
</xslo:for-each> |
1635 |
</xslo:variable> |
1636 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1637 |
</z:index> |
1638 |
</xslo:template> |
1639 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='251']"> |
1640 |
<z:index name="Match:w Match:p Match-heading:p Match-heading:s"> |
1641 |
<xslo:variable name="raw_heading"> |
1642 |
<xslo:for-each select="marc:subfield"> |
1643 |
<xslo:if test="contains('ajxyz', @code)" name="Match:w Match:p Match-heading:p Match-heading:s"> |
1644 |
<xslo:if test="position() > 1"> |
1645 |
<xslo:choose> |
1646 |
<xslo:when test="contains('jxyz', @code)"> |
1647 |
<xslo:choose> |
1648 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1649 |
<xslo:text> generalsubdiv </xslo:text> |
1650 |
</xslo:when> |
1651 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1652 |
<xslo:text> formsubdiv </xslo:text> |
1653 |
</xslo:when> |
1654 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1655 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1656 |
</xslo:when> |
1657 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1658 |
<xslo:text> geographicsubdiv </xslo:text> |
1659 |
</xslo:when> |
1660 |
</xslo:choose> |
1661 |
</xslo:when> |
1662 |
<xslo:otherwise> |
1663 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1664 |
</xslo:otherwise> |
1665 |
</xslo:choose> |
1666 |
</xslo:if> |
1667 |
<xslo:call-template name="chopPunctuation"> |
1668 |
<xslo:with-param name="chopString"> |
1669 |
<xslo:value-of select="."/> |
1670 |
</xslo:with-param> |
1671 |
</xslo:call-template> |
1672 |
</xslo:if> |
1673 |
</xslo:for-each> |
1674 |
</xslo:variable> |
1675 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1676 |
</z:index> |
1677 |
</xslo:template> |
1678 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='451']"> |
1679 |
<z:index name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s"> |
1680 |
<xslo:variable name="raw_heading"> |
1681 |
<xslo:for-each select="marc:subfield"> |
1682 |
<xslo:if test="contains('ajxyz', @code)" name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s"> |
1683 |
<xslo:if test="position() > 1"> |
1684 |
<xslo:choose> |
1685 |
<xslo:when test="contains('jxyz', @code)"> |
1686 |
<xslo:choose> |
1687 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1688 |
<xslo:text> generalsubdiv </xslo:text> |
1689 |
</xslo:when> |
1690 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1691 |
<xslo:text> formsubdiv </xslo:text> |
1692 |
</xslo:when> |
1693 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1694 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1695 |
</xslo:when> |
1696 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1697 |
<xslo:text> geographicsubdiv </xslo:text> |
1698 |
</xslo:when> |
1699 |
</xslo:choose> |
1700 |
</xslo:when> |
1701 |
<xslo:otherwise> |
1702 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1703 |
</xslo:otherwise> |
1704 |
</xslo:choose> |
1705 |
</xslo:if> |
1706 |
<xslo:call-template name="chopPunctuation"> |
1707 |
<xslo:with-param name="chopString"> |
1708 |
<xslo:value-of select="."/> |
1709 |
</xslo:with-param> |
1710 |
</xslo:call-template> |
1711 |
</xslo:if> |
1712 |
</xslo:for-each> |
1713 |
</xslo:variable> |
1714 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1715 |
</z:index> |
1716 |
</xslo:template> |
1717 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='551']"> |
1718 |
<z:index name="Match:w Match:p"> |
1719 |
<xslo:variable name="raw_heading"> |
1720 |
<xslo:for-each select="marc:subfield"> |
1721 |
<xslo:if test="contains('ajxyz', @code)" name="Match:w Match:p"> |
1722 |
<xslo:if test="position() > 1"> |
1723 |
<xslo:choose> |
1724 |
<xslo:when test="contains('jxyz', @code)"> |
1725 |
<xslo:choose> |
1726 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1727 |
<xslo:text> generalsubdiv </xslo:text> |
1728 |
</xslo:when> |
1729 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1730 |
<xslo:text> formsubdiv </xslo:text> |
1731 |
</xslo:when> |
1732 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1733 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1734 |
</xslo:when> |
1735 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1736 |
<xslo:text> geographicsubdiv </xslo:text> |
1737 |
</xslo:when> |
1738 |
</xslo:choose> |
1739 |
</xslo:when> |
1740 |
<xslo:otherwise> |
1741 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1742 |
</xslo:otherwise> |
1743 |
</xslo:choose> |
1744 |
</xslo:if> |
1745 |
<xslo:call-template name="chopPunctuation"> |
1746 |
<xslo:with-param name="chopString"> |
1747 |
<xslo:value-of select="."/> |
1748 |
</xslo:with-param> |
1749 |
</xslo:call-template> |
1750 |
</xslo:if> |
1751 |
</xslo:for-each> |
1752 |
</xslo:variable> |
1753 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1754 |
</z:index> |
1755 |
</xslo:template> |
1756 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='155']"> |
1757 |
<z:index name="Match:w Match:p Match-heading:p Match-heading:s"> |
1758 |
<xslo:variable name="raw_heading"> |
1759 |
<xslo:for-each select="marc:subfield"> |
1760 |
<xslo:if test="contains('ajxyz', @code)" name="Match:w Match:p Match-heading:p Match-heading:s"> |
1761 |
<xslo:if test="position() > 1"> |
1762 |
<xslo:choose> |
1763 |
<xslo:when test="contains('jxyz', @code)"> |
1764 |
<xslo:choose> |
1765 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1766 |
<xslo:text> generalsubdiv </xslo:text> |
1767 |
</xslo:when> |
1768 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1769 |
<xslo:text> formsubdiv </xslo:text> |
1770 |
</xslo:when> |
1771 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1772 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1773 |
</xslo:when> |
1774 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1775 |
<xslo:text> geographicsubdiv </xslo:text> |
1776 |
</xslo:when> |
1777 |
</xslo:choose> |
1778 |
</xslo:when> |
1779 |
<xslo:otherwise> |
1780 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1781 |
</xslo:otherwise> |
1782 |
</xslo:choose> |
1783 |
</xslo:if> |
1784 |
<xslo:call-template name="chopPunctuation"> |
1785 |
<xslo:with-param name="chopString"> |
1786 |
<xslo:value-of select="."/> |
1787 |
</xslo:with-param> |
1788 |
</xslo:call-template> |
1789 |
</xslo:if> |
1790 |
</xslo:for-each> |
1791 |
</xslo:variable> |
1792 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1793 |
</z:index> |
1794 |
</xslo:template> |
1795 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='455']"> |
1796 |
<z:index name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s"> |
1797 |
<xslo:variable name="raw_heading"> |
1798 |
<xslo:for-each select="marc:subfield"> |
1799 |
<xslo:if test="contains('ajxyz', @code)" name="Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s"> |
1800 |
<xslo:if test="position() > 1"> |
1801 |
<xslo:choose> |
1802 |
<xslo:when test="contains('jxyz', @code)"> |
1803 |
<xslo:choose> |
1804 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1805 |
<xslo:text> generalsubdiv </xslo:text> |
1806 |
</xslo:when> |
1807 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1808 |
<xslo:text> formsubdiv </xslo:text> |
1809 |
</xslo:when> |
1810 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1811 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1812 |
</xslo:when> |
1813 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1814 |
<xslo:text> geographicsubdiv </xslo:text> |
1815 |
</xslo:when> |
1816 |
</xslo:choose> |
1817 |
</xslo:when> |
1818 |
<xslo:otherwise> |
1819 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1820 |
</xslo:otherwise> |
1821 |
</xslo:choose> |
1822 |
</xslo:if> |
1823 |
<xslo:call-template name="chopPunctuation"> |
1824 |
<xslo:with-param name="chopString"> |
1825 |
<xslo:value-of select="."/> |
1826 |
</xslo:with-param> |
1827 |
</xslo:call-template> |
1828 |
</xslo:if> |
1829 |
</xslo:for-each> |
1830 |
</xslo:variable> |
1831 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1832 |
</z:index> |
1833 |
</xslo:template> |
1834 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='555']"> |
1835 |
<z:index name="Match:w Match:p"> |
1836 |
<xslo:variable name="raw_heading"> |
1837 |
<xslo:for-each select="marc:subfield"> |
1838 |
<xslo:if test="contains('ajxyz', @code)" name="Match:w Match:p"> |
1839 |
<xslo:if test="position() > 1"> |
1840 |
<xslo:choose> |
1841 |
<xslo:when test="contains('jxyz', @code)"> |
1842 |
<xslo:choose> |
1843 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1844 |
<xslo:text> generalsubdiv </xslo:text> |
1845 |
</xslo:when> |
1846 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1847 |
<xslo:text> formsubdiv </xslo:text> |
1848 |
</xslo:when> |
1849 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1850 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1851 |
</xslo:when> |
1852 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1853 |
<xslo:text> geographicsubdiv </xslo:text> |
1854 |
</xslo:when> |
1855 |
</xslo:choose> |
1856 |
</xslo:when> |
1857 |
<xslo:otherwise> |
1858 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1859 |
</xslo:otherwise> |
1860 |
</xslo:choose> |
1861 |
</xslo:if> |
1862 |
<xslo:call-template name="chopPunctuation"> |
1863 |
<xslo:with-param name="chopString"> |
1864 |
<xslo:value-of select="."/> |
1865 |
</xslo:with-param> |
1866 |
</xslo:call-template> |
1867 |
</xslo:if> |
1868 |
</xslo:for-each> |
1869 |
</xslo:variable> |
1870 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1871 |
</z:index> |
1872 |
</xslo:template> |
1873 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='280']"> |
1874 |
<z:index name="Match-subdivision:p Match-subdivision:s"> |
1875 |
<xslo:variable name="raw_heading"> |
1876 |
<xslo:for-each select="marc:subfield"> |
1877 |
<xslo:if test="contains('jxyz', @code)" name="Match-subdivision:p Match-subdivision:s"> |
1878 |
<xslo:if test="position() > 1"> |
1879 |
<xslo:choose> |
1880 |
<xslo:when test="contains('jxyz', @code)"> |
1881 |
<xslo:choose> |
1882 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1883 |
<xslo:text> generalsubdiv </xslo:text> |
1884 |
</xslo:when> |
1885 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1886 |
<xslo:text> formsubdiv </xslo:text> |
1887 |
</xslo:when> |
1888 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1889 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1890 |
</xslo:when> |
1891 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1892 |
<xslo:text> geographicsubdiv </xslo:text> |
1893 |
</xslo:when> |
1894 |
</xslo:choose> |
1895 |
</xslo:when> |
1896 |
<xslo:otherwise> |
1897 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1898 |
</xslo:otherwise> |
1899 |
</xslo:choose> |
1900 |
</xslo:if> |
1901 |
<xslo:call-template name="chopPunctuation"> |
1902 |
<xslo:with-param name="chopString"> |
1903 |
<xslo:value-of select="."/> |
1904 |
</xslo:with-param> |
1905 |
</xslo:call-template> |
1906 |
</xslo:if> |
1907 |
</xslo:for-each> |
1908 |
</xslo:variable> |
1909 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1910 |
</z:index> |
1911 |
</xslo:template> |
1912 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='480']"> |
1913 |
<z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s"> |
1914 |
<xslo:variable name="raw_heading"> |
1915 |
<xslo:for-each select="marc:subfield"> |
1916 |
<xslo:if test="contains('jxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s"> |
1917 |
<xslo:if test="position() > 1"> |
1918 |
<xslo:choose> |
1919 |
<xslo:when test="contains('jxyz', @code)"> |
1920 |
<xslo:choose> |
1921 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1922 |
<xslo:text> generalsubdiv </xslo:text> |
1923 |
</xslo:when> |
1924 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1925 |
<xslo:text> formsubdiv </xslo:text> |
1926 |
</xslo:when> |
1927 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1928 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1929 |
</xslo:when> |
1930 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1931 |
<xslo:text> geographicsubdiv </xslo:text> |
1932 |
</xslo:when> |
1933 |
</xslo:choose> |
1934 |
</xslo:when> |
1935 |
<xslo:otherwise> |
1936 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1937 |
</xslo:otherwise> |
1938 |
</xslo:choose> |
1939 |
</xslo:if> |
1940 |
<xslo:call-template name="chopPunctuation"> |
1941 |
<xslo:with-param name="chopString"> |
1942 |
<xslo:value-of select="."/> |
1943 |
</xslo:with-param> |
1944 |
</xslo:call-template> |
1945 |
</xslo:if> |
1946 |
</xslo:for-each> |
1947 |
</xslo:variable> |
1948 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1949 |
</z:index> |
1950 |
</xslo:template> |
1951 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='181']"> |
1952 |
<z:index name="Match-subdivision:p Match-subdivision:s"> |
1953 |
<xslo:variable name="raw_heading"> |
1954 |
<xslo:for-each select="marc:subfield"> |
1955 |
<xslo:if test="contains('jxyz', @code)" name="Match-subdivision:p Match-subdivision:s"> |
1956 |
<xslo:if test="position() > 1"> |
1957 |
<xslo:choose> |
1958 |
<xslo:when test="contains('jxyz', @code)"> |
1959 |
<xslo:choose> |
1960 |
<xslo:when test="@code = $general_subdivision_subfield"> |
1961 |
<xslo:text> generalsubdiv </xslo:text> |
1962 |
</xslo:when> |
1963 |
<xslo:when test="@code = $form_subdivision_subfield"> |
1964 |
<xslo:text> formsubdiv </xslo:text> |
1965 |
</xslo:when> |
1966 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
1967 |
<xslo:text> chronologicalsubdiv </xslo:text> |
1968 |
</xslo:when> |
1969 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
1970 |
<xslo:text> geographicsubdiv </xslo:text> |
1971 |
</xslo:when> |
1972 |
</xslo:choose> |
1973 |
</xslo:when> |
1974 |
<xslo:otherwise> |
1975 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
1976 |
</xslo:otherwise> |
1977 |
</xslo:choose> |
1978 |
</xslo:if> |
1979 |
<xslo:call-template name="chopPunctuation"> |
1980 |
<xslo:with-param name="chopString"> |
1981 |
<xslo:value-of select="."/> |
1982 |
</xslo:with-param> |
1983 |
</xslo:call-template> |
1984 |
</xslo:if> |
1985 |
</xslo:for-each> |
1986 |
</xslo:variable> |
1987 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
1988 |
</z:index> |
1989 |
</xslo:template> |
1990 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='481']"> |
1991 |
<z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s"> |
1992 |
<xslo:variable name="raw_heading"> |
1993 |
<xslo:for-each select="marc:subfield"> |
1994 |
<xslo:if test="contains('jxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s"> |
1995 |
<xslo:if test="position() > 1"> |
1996 |
<xslo:choose> |
1997 |
<xslo:when test="contains('jxyz', @code)"> |
1998 |
<xslo:choose> |
1999 |
<xslo:when test="@code = $general_subdivision_subfield"> |
2000 |
<xslo:text> generalsubdiv </xslo:text> |
2001 |
</xslo:when> |
2002 |
<xslo:when test="@code = $form_subdivision_subfield"> |
2003 |
<xslo:text> formsubdiv </xslo:text> |
2004 |
</xslo:when> |
2005 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
2006 |
<xslo:text> chronologicalsubdiv </xslo:text> |
2007 |
</xslo:when> |
2008 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
2009 |
<xslo:text> geographicsubdiv </xslo:text> |
2010 |
</xslo:when> |
2011 |
</xslo:choose> |
2012 |
</xslo:when> |
2013 |
<xslo:otherwise> |
2014 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
2015 |
</xslo:otherwise> |
2016 |
</xslo:choose> |
2017 |
</xslo:if> |
2018 |
<xslo:call-template name="chopPunctuation"> |
2019 |
<xslo:with-param name="chopString"> |
2020 |
<xslo:value-of select="."/> |
2021 |
</xslo:with-param> |
2022 |
</xslo:call-template> |
2023 |
</xslo:if> |
2024 |
</xslo:for-each> |
2025 |
</xslo:variable> |
2026 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
2027 |
</z:index> |
2028 |
</xslo:template> |
2029 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='282']"> |
2030 |
<z:index name="Match-subdivision:p Match-subdivision:s"> |
2031 |
<xslo:variable name="raw_heading"> |
2032 |
<xslo:for-each select="marc:subfield"> |
2033 |
<xslo:if test="contains('jxyz', @code)" name="Match-subdivision:p Match-subdivision:s"> |
2034 |
<xslo:if test="position() > 1"> |
2035 |
<xslo:choose> |
2036 |
<xslo:when test="contains('jxyz', @code)"> |
2037 |
<xslo:choose> |
2038 |
<xslo:when test="@code = $general_subdivision_subfield"> |
2039 |
<xslo:text> generalsubdiv </xslo:text> |
2040 |
</xslo:when> |
2041 |
<xslo:when test="@code = $form_subdivision_subfield"> |
2042 |
<xslo:text> formsubdiv </xslo:text> |
2043 |
</xslo:when> |
2044 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
2045 |
<xslo:text> chronologicalsubdiv </xslo:text> |
2046 |
</xslo:when> |
2047 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
2048 |
<xslo:text> geographicsubdiv </xslo:text> |
2049 |
</xslo:when> |
2050 |
</xslo:choose> |
2051 |
</xslo:when> |
2052 |
<xslo:otherwise> |
2053 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
2054 |
</xslo:otherwise> |
2055 |
</xslo:choose> |
2056 |
</xslo:if> |
2057 |
<xslo:call-template name="chopPunctuation"> |
2058 |
<xslo:with-param name="chopString"> |
2059 |
<xslo:value-of select="."/> |
2060 |
</xslo:with-param> |
2061 |
</xslo:call-template> |
2062 |
</xslo:if> |
2063 |
</xslo:for-each> |
2064 |
</xslo:variable> |
2065 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
2066 |
</z:index> |
2067 |
</xslo:template> |
2068 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='482']"> |
2069 |
<z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s"> |
2070 |
<xslo:variable name="raw_heading"> |
2071 |
<xslo:for-each select="marc:subfield"> |
2072 |
<xslo:if test="contains('jxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s"> |
2073 |
<xslo:if test="position() > 1"> |
2074 |
<xslo:choose> |
2075 |
<xslo:when test="contains('jxyz', @code)"> |
2076 |
<xslo:choose> |
2077 |
<xslo:when test="@code = $general_subdivision_subfield"> |
2078 |
<xslo:text> generalsubdiv </xslo:text> |
2079 |
</xslo:when> |
2080 |
<xslo:when test="@code = $form_subdivision_subfield"> |
2081 |
<xslo:text> formsubdiv </xslo:text> |
2082 |
</xslo:when> |
2083 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
2084 |
<xslo:text> chronologicalsubdiv </xslo:text> |
2085 |
</xslo:when> |
2086 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
2087 |
<xslo:text> geographicsubdiv </xslo:text> |
2088 |
</xslo:when> |
2089 |
</xslo:choose> |
2090 |
</xslo:when> |
2091 |
<xslo:otherwise> |
2092 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
2093 |
</xslo:otherwise> |
2094 |
</xslo:choose> |
2095 |
</xslo:if> |
2096 |
<xslo:call-template name="chopPunctuation"> |
2097 |
<xslo:with-param name="chopString"> |
2098 |
<xslo:value-of select="."/> |
2099 |
</xslo:with-param> |
2100 |
</xslo:call-template> |
2101 |
</xslo:if> |
2102 |
</xslo:for-each> |
2103 |
</xslo:variable> |
2104 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
2105 |
</z:index> |
2106 |
</xslo:template> |
2107 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='485']"> |
2108 |
<z:index name="Match-subdivision:p Match-subdivision:s"> |
2109 |
<xslo:variable name="raw_heading"> |
2110 |
<xslo:for-each select="marc:subfield"> |
2111 |
<xslo:if test="contains('jxyz', @code)" name="Match-subdivision:p Match-subdivision:s"> |
2112 |
<xslo:if test="position() > 1"> |
2113 |
<xslo:choose> |
2114 |
<xslo:when test="contains('jxyz', @code)"> |
2115 |
<xslo:choose> |
2116 |
<xslo:when test="@code = $general_subdivision_subfield"> |
2117 |
<xslo:text> generalsubdiv </xslo:text> |
2118 |
</xslo:when> |
2119 |
<xslo:when test="@code = $form_subdivision_subfield"> |
2120 |
<xslo:text> formsubdiv </xslo:text> |
2121 |
</xslo:when> |
2122 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
2123 |
<xslo:text> chronologicalsubdiv </xslo:text> |
2124 |
</xslo:when> |
2125 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
2126 |
<xslo:text> geographicsubdiv </xslo:text> |
2127 |
</xslo:when> |
2128 |
</xslo:choose> |
2129 |
</xslo:when> |
2130 |
<xslo:otherwise> |
2131 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
2132 |
</xslo:otherwise> |
2133 |
</xslo:choose> |
2134 |
</xslo:if> |
2135 |
<xslo:call-template name="chopPunctuation"> |
2136 |
<xslo:with-param name="chopString"> |
2137 |
<xslo:value-of select="."/> |
2138 |
</xslo:with-param> |
2139 |
</xslo:call-template> |
2140 |
</xslo:if> |
2141 |
</xslo:for-each> |
2142 |
</xslo:variable> |
2143 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
2144 |
</z:index> |
2145 |
</xslo:template> |
2146 |
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='185']"> |
2147 |
<z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s"> |
2148 |
<xslo:variable name="raw_heading"> |
2149 |
<xslo:for-each select="marc:subfield"> |
2150 |
<xslo:if test="contains('jxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s"> |
2151 |
<xslo:if test="position() > 1"> |
2152 |
<xslo:choose> |
2153 |
<xslo:when test="contains('jxyz', @code)"> |
2154 |
<xslo:choose> |
2155 |
<xslo:when test="@code = $general_subdivision_subfield"> |
2156 |
<xslo:text> generalsubdiv </xslo:text> |
2157 |
</xslo:when> |
2158 |
<xslo:when test="@code = $form_subdivision_subfield"> |
2159 |
<xslo:text> formsubdiv </xslo:text> |
2160 |
</xslo:when> |
2161 |
<xslo:when test="@code = $chronological_subdivision_subfield"> |
2162 |
<xslo:text> chronologicalsubdiv </xslo:text> |
2163 |
</xslo:when> |
2164 |
<xslo:when test="@code = $geographic_subdivision_subfield"> |
2165 |
<xslo:text> geographicsubdiv </xslo:text> |
2166 |
</xslo:when> |
2167 |
</xslo:choose> |
2168 |
</xslo:when> |
2169 |
<xslo:otherwise> |
2170 |
<xslo:value-of select="substring(' ', 1, 1)"/> |
2171 |
</xslo:otherwise> |
2172 |
</xslo:choose> |
2173 |
</xslo:if> |
2174 |
<xslo:call-template name="chopPunctuation"> |
2175 |
<xslo:with-param name="chopString"> |
2176 |
<xslo:value-of select="."/> |
2177 |
</xslo:with-param> |
2178 |
</xslo:call-template> |
2179 |
</xslo:if> |
2180 |
</xslo:for-each> |
2181 |
</xslo:variable> |
2182 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
2183 |
</z:index> |
2184 |
</xslo:template> |
2185 |
<xslo:variable name="form_subdivision_subfield">j</xslo:variable> |
2186 |
<xslo:variable name="general_subdivision_subfield">x</xslo:variable> |
2187 |
<xslo:variable name="chronological_subdivision_subfield">z</xslo:variable> |
2188 |
<xslo:variable name="geographic_subdivision_subfield">y</xslo:variable> |
2189 |
<xslo:template mode="index_subject_thesaurus" match="marc:controlfield[@tag='008']"> |
2190 |
<xslo:variable name="thesaurus_code1" select="substring(., 12, 1)"/> |
2191 |
<xslo:variable name="full_thesaurus_code"> |
2192 |
<xslo:choose> |
2193 |
<xslo:when test="$thesaurus_code1 = 'a'"> |
2194 |
<xslo:text>lcsh</xslo:text> |
2195 |
</xslo:when> |
2196 |
<xslo:when test="$thesaurus_code1 = 'b'"> |
2197 |
<xslo:text>lcac</xslo:text> |
2198 |
</xslo:when> |
2199 |
<xslo:when test="$thesaurus_code1 = 'c'"> |
2200 |
<xslo:text>mesh</xslo:text> |
2201 |
</xslo:when> |
2202 |
<xslo:when test="$thesaurus_code1 = 'd'"> |
2203 |
<xslo:text>nal</xslo:text> |
2204 |
</xslo:when> |
2205 |
<xslo:when test="$thesaurus_code1 = 'k'"> |
2206 |
<xslo:text>cash</xslo:text> |
2207 |
</xslo:when> |
2208 |
<xslo:when test="$thesaurus_code1 = 'n'"> |
2209 |
<xslo:text>notapplicable</xslo:text> |
2210 |
</xslo:when> |
2211 |
<xslo:when test="$thesaurus_code1 = 'r'"> |
2212 |
<xslo:text>aat</xslo:text> |
2213 |
</xslo:when> |
2214 |
<xslo:when test="$thesaurus_code1 = 's'"> |
2215 |
<xslo:text>sears</xslo:text> |
2216 |
</xslo:when> |
2217 |
<xslo:when test="$thesaurus_code1 = 'v'"> |
2218 |
<xslo:text>rvm</xslo:text> |
2219 |
</xslo:when> |
2220 |
<xslo:when test="$thesaurus_code1 = 'z'"> |
2221 |
<xslo:choose> |
2222 |
<xslo:when test="//marc:datafield[@tag='040']/marc:subfield[@code='f']"> |
2223 |
<xslo:value-of select="//marc:datafield[@tag='040']/marc:subfield[@code='f']"/> |
2224 |
</xslo:when> |
2225 |
<xslo:otherwise> |
2226 |
<xslo:text>notdefined</xslo:text> |
2227 |
</xslo:otherwise> |
2228 |
</xslo:choose> |
2229 |
</xslo:when> |
2230 |
<xslo:otherwise> |
2231 |
<xslo:text>notdefined</xslo:text> |
2232 |
</xslo:otherwise> |
2233 |
</xslo:choose> |
2234 |
</xslo:variable> |
2235 |
<z:index name="Subject-heading-thesaurus:w"> |
2236 |
<xslo:value-of select="$full_thesaurus_code"/> |
2237 |
</z:index> |
2238 |
</xslo:template> |
2239 |
<xslo:template match="*"> |
2240 |
<z:index name="Any:w Any:p"> |
2241 |
<xslo:value-of select="."/> |
2242 |
</z:index> |
2243 |
</xslo:template> |
2244 |
<xslo:template name="chopPunctuation"> |
2245 |
<xslo:param name="chopString"/> |
2246 |
<xslo:variable name="length" select="string-length($chopString)"/> |
2247 |
<xslo:choose> |
2248 |
<xslo:when test="$length=0"/> |
2249 |
<xslo:when test="contains('-,.:=;!%/', substring($chopString,$length,1))"> |
2250 |
<xslo:call-template name="chopPunctuation"> |
2251 |
<xslo:with-param name="chopString" select="substring($chopString,1,$length - 1)"/> |
2252 |
</xslo:call-template> |
2253 |
</xslo:when> |
2254 |
<xslo:when test="not($chopString)"/> |
2255 |
<xslo:otherwise> |
2256 |
<xslo:value-of select="$chopString"/> |
2257 |
</xslo:otherwise> |
2258 |
</xslo:choose> |
2259 |
<xslo:text/> |
2260 |
</xslo:template> |
2261 |
</xslo:stylesheet> |