1 <!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
2 <xsl:stylesheet xmlns="http://www.loc.gov/mods/v3" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xlink marc" version="1.0">
3 <xsl:include href="MARC21slimUtils.xsl"/>
4 <xsl:output encoding="UTF-8" indent="yes" method="xml"/>
6 Revision 1.14 - Fixed template isValid and fields 010, 020, 022, 024, 028, and 037 to output additional identifier elements
7 with corresponding @type and @invalid == 'yes' when subfields z or y (in the case of 022) exist in the MARCXML ::: 2007/01/04 17:35:20 cred
9 Revision 1.13 - Changed order of output under cartographics to reflect schema 2006/11/28 tmee
11 Revision 1.12 - Updated to reflect MODS 3.2 Mapping 2006/10/11 tmee
13 Revision 1.11 - The attribute objectPart moved from <languageTerm> to <language>
16 Revision 1.10 MODS 3.1 revisions to language and classification elements
17 (plus ability to find marc:collection embedded in wrapper elements such as SRU zs: wrappers)
20 Revision 1.9 subfield $y was added to field 242 2004/09/02 10:57 jrad
22 Revision 1.8 Subject chopPunctuation expanded and attribute fixes 2004/08/12 jrad
24 Revision 1.7 2004/03/25 08:29 jrad
26 Revision 1.6 various validation fixes 2004/02/20 ntra
28 Revision 1.5 2003/10/02 16:18:58 ntra
29 MODS2 to MODS3 updates, language unstacking and
30 de-duping, chopPunctuation expanded
32 Revision 1.3 2003/04/03 00:07:19 ntra
33 Revision 1.3 Additional Changes not related to MODS Version 2.0 by ntra
35 Revision 1.2 2003/03/24 19:37:42 ckeith
39 <xsl:template match="/">
41 <xsl:when test="//marc:collection">
42 <modsCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-2.xsd">
43 <xsl:for-each select="//marc:collection/marc:record">
45 <xsl:call-template name="marcRecord"/>
51 <mods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-2.xsd">
52 <xsl:for-each select="//marc:record">
53 <xsl:call-template name="marcRecord"/>
59 <xsl:template name="marcRecord">
60 <xsl:variable name="leader" select="marc:leader"/>
61 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
62 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
63 <xsl:variable name="controlField008" select="marc:controlfield[@tag='008']"/>
64 <xsl:variable name="typeOf008">
66 <xsl:when test="$leader6='a'">
68 <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
69 <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">SE</xsl:when>
72 <xsl:when test="$leader6='t'">BK</xsl:when>
73 <xsl:when test="$leader6='p'">MM</xsl:when>
74 <xsl:when test="$leader6='m'">CF</xsl:when>
75 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
76 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='o' or $leader6='r'">VM</xsl:when>
77 <xsl:when test="$leader6='c' or $leader6='d' or $leader6='i' or $leader6='j'">MU</xsl:when>
80 <xsl:for-each select="marc:datafield[@tag='245']">
82 <xsl:variable name="title">
84 <xsl:when test="marc:subfield[@code='b']">
85 <xsl:call-template name="specialSubfieldSelect">
86 <xsl:with-param name="axis">b</xsl:with-param>
87 <xsl:with-param name="beforeCodes">afgk</xsl:with-param>
91 <xsl:call-template name="subfieldSelect">
92 <xsl:with-param name="codes">abfgk</xsl:with-param>
97 <xsl:variable name="titleChop">
98 <xsl:call-template name="chopPunctuation">
99 <xsl:with-param name="chopString">
100 <xsl:value-of select="$title"/>
105 <xsl:when test="@ind2>0">
107 <xsl:value-of select="substring($titleChop,1,@ind2)"/>
110 <xsl:value-of select="substring($titleChop,@ind2+1)"/>
115 <xsl:value-of select="$titleChop"/>
119 <xsl:if test="marc:subfield[@code='b']">
121 <xsl:call-template name="chopPunctuation">
122 <xsl:with-param name="chopString">
123 <xsl:call-template name="specialSubfieldSelect">
124 <xsl:with-param name="axis">b</xsl:with-param>
125 <xsl:with-param name="anyCodes">b</xsl:with-param>
126 <xsl:with-param name="afterCodes">afgk</xsl:with-param>
132 <xsl:call-template name="part"></xsl:call-template>
135 <xsl:for-each select="marc:datafield[@tag='210']">
136 <titleInfo type="abbreviated">
138 <xsl:call-template name="chopPunctuation">
139 <xsl:with-param name="chopString">
140 <xsl:call-template name="subfieldSelect">
141 <xsl:with-param name="codes">a</xsl:with-param>
146 <xsl:call-template name="subtitle"/>
149 <xsl:for-each select="marc:datafield[@tag='242']">
150 <titleInfo type="translated">
151 <!--09/01/04 Added subfield $y-->
152 <xsl:for-each select="marc:subfield[@code='y']">
153 <xsl:attribute name="lang">
154 <xsl:value-of select="text()"/>
158 <xsl:call-template name="chopPunctuation">
159 <xsl:with-param name="chopString">
160 <xsl:call-template name="subfieldSelect">
161 <!-- 1/04 removed $h, b -->
162 <xsl:with-param name="codes">a</xsl:with-param>
168 <xsl:call-template name="subtitle"/>
169 <xsl:call-template name="part"/>
172 <xsl:for-each select="marc:datafield[@tag='246']">
173 <titleInfo type="alternative">
174 <xsl:for-each select="marc:subfield[@code='i']">
175 <xsl:attribute name="displayLabel">
176 <xsl:value-of select="text()"/>
180 <xsl:call-template name="chopPunctuation">
181 <xsl:with-param name="chopString">
182 <xsl:call-template name="subfieldSelect">
183 <!-- 1/04 removed $h, $b -->
184 <xsl:with-param name="codes">af</xsl:with-param>
189 <xsl:call-template name="subtitle"/>
190 <xsl:call-template name="part"/>
193 <xsl:for-each select="marc:datafield[@tag='130']|marc:datafield[@tag='240']|marc:datafield[@tag='730'][@ind2!='2']">
194 <titleInfo type="uniform">
196 <xsl:variable name="str">
197 <xsl:for-each select="marc:subfield">
198 <xsl:if test="(contains('adfklmor',@code) and (not(../marc:subfield[@code='n' or @code='p']) or (following-sibling::marc:subfield[@code='n' or @code='p'])))">
199 <xsl:value-of select="text()"/>
200 <xsl:text> </xsl:text>
204 <xsl:call-template name="chopPunctuation">
205 <xsl:with-param name="chopString">
206 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
210 <xsl:call-template name="part"/>
213 <xsl:for-each select="marc:datafield[@tag='740'][@ind2!='2']">
214 <titleInfo type="alternative">
216 <xsl:call-template name="chopPunctuation">
217 <xsl:with-param name="chopString">
218 <xsl:call-template name="subfieldSelect">
219 <xsl:with-param name="codes">ah</xsl:with-param>
224 <xsl:call-template name="part"/>
227 <xsl:for-each select="marc:datafield[@tag='100']">
228 <name type="personal">
229 <xsl:call-template name="nameABCDQ"/>
230 <xsl:call-template name="affiliation"/>
232 <roleTerm authority="marcrelator" type="text">creator</roleTerm>
234 <xsl:call-template name="role"/>
237 <xsl:for-each select="marc:datafield[@tag='110']">
238 <name type="corporate">
239 <xsl:call-template name="nameABCDN"/>
241 <roleTerm authority="marcrelator" type="text">creator</roleTerm>
243 <xsl:call-template name="role"/>
246 <xsl:for-each select="marc:datafield[@tag='111']">
247 <name type="conference">
248 <xsl:call-template name="nameACDEQ"/>
250 <roleTerm authority="marcrelator" type="text">creator</roleTerm>
252 <xsl:call-template name="role"/>
255 <xsl:for-each select="marc:datafield[@tag='700'][not(marc:subfield[@code='t'])]">
256 <name type="personal">
257 <xsl:call-template name="nameABCDQ"/>
258 <xsl:call-template name="affiliation"/>
259 <xsl:call-template name="role"/>
262 <xsl:for-each select="marc:datafield[@tag='710'][not(marc:subfield[@code='t'])]">
263 <name type="corporate">
264 <xsl:call-template name="nameABCDN"/>
265 <xsl:call-template name="role"/>
268 <xsl:for-each select="marc:datafield[@tag='711'][not(marc:subfield[@code='t'])]">
269 <name type="conference">
270 <xsl:call-template name="nameACDEQ"/>
271 <xsl:call-template name="role"/>
274 <xsl:for-each select="marc:datafield[@tag='720'][not(marc:subfield[@code='t'])]">
276 <xsl:if test="@ind1=1">
277 <xsl:attribute name="type">
278 <xsl:text>personal</xsl:text>
282 <xsl:value-of select="marc:subfield[@code='a']"/>
284 <xsl:call-template name="role"/>
288 <xsl:if test="$leader7='c'">
289 <xsl:attribute name="collection">yes</xsl:attribute>
291 <xsl:if test="$leader6='d' or $leader6='f' or $leader6='p' or $leader6='t'">
292 <xsl:attribute name="manuscript">yes</xsl:attribute>
295 <xsl:when test="$leader6='a' or $leader6='t'">text</xsl:when>
296 <xsl:when test="$leader6='e' or $leader6='f'">cartographic</xsl:when>
297 <xsl:when test="$leader6='c' or $leader6='d'">notated music</xsl:when>
298 <xsl:when test="$leader6='i'">sound recording-nonmusical</xsl:when>
299 <xsl:when test="$leader6='j'">sound recording-musical</xsl:when>
300 <xsl:when test="$leader6='k'">still image</xsl:when>
301 <xsl:when test="$leader6='g'">moving image</xsl:when>
302 <xsl:when test="$leader6='r'">three dimensional object</xsl:when>
303 <xsl:when test="$leader6='m'">software, multimedia</xsl:when>
304 <xsl:when test="$leader6='p'">mixed material</xsl:when>
307 <xsl:if test="substring($controlField008,26,1)='d'">
308 <genre authority="marc">globe</genre>
310 <xsl:if test="marc:controlfield[@tag='007'][substring(text(),1,1)='a'][substring(text(),2,1)='r']">
311 <genre authority="marc">remote sensing image</genre>
313 <xsl:if test="$typeOf008='MP'">
314 <xsl:variable name="controlField008-25" select="substring($controlField008,26,1)"></xsl:variable>
316 <xsl:when test="$controlField008-25='a' or $controlField008-25='b' or $controlField008-25='c' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='j']">
317 <genre authority="marc">map</genre>
319 <xsl:when test="$controlField008-25='e' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
320 <genre authority="marc">atlas</genre>
324 <xsl:if test="$typeOf008='SE'">
325 <xsl:variable name="controlField008-21" select="substring($controlField008,22,1)"></xsl:variable>
327 <xsl:when test="$controlField008-21='d'">
328 <genre authority="marc">database</genre>
330 <xsl:when test="$controlField008-21='l'">
331 <genre authority="marc">loose-leaf</genre>
333 <xsl:when test="$controlField008-21='m'">
334 <genre authority="marc">series</genre>
336 <xsl:when test="$controlField008-21='n'">
337 <genre authority="marc">newspaper</genre>
339 <xsl:when test="$controlField008-21='p'">
340 <genre authority="marc">periodical</genre>
342 <xsl:when test="$controlField008-21='w'">
343 <genre authority="marc">web site</genre>
347 <xsl:if test="$typeOf008='BK' or $typeOf008='SE'">
348 <xsl:variable name="controlField008-24" select="substring($controlField008,25,4)"></xsl:variable>
350 <xsl:when test="contains($controlField008-24,'a')">
351 <genre authority="marc">abstract or summary</genre>
353 <xsl:when test="contains($controlField008-24,'b')">
354 <genre authority="marc">bibliography</genre>
356 <xsl:when test="contains($controlField008-24,'c')">
357 <genre authority="marc">catalog</genre>
359 <xsl:when test="contains($controlField008-24,'d')">
360 <genre authority="marc">dictionary</genre>
362 <xsl:when test="contains($controlField008-24,'e')">
363 <genre authority="marc">encyclopedia</genre>
365 <xsl:when test="contains($controlField008-24,'f')">
366 <genre authority="marc">handbook</genre>
368 <xsl:when test="contains($controlField008-24,'g')">
369 <genre authority="marc">legal article</genre>
371 <xsl:when test="contains($controlField008-24,'i')">
372 <genre authority="marc">index</genre>
374 <xsl:when test="contains($controlField008-24,'k')">
375 <genre authority="marc">discography</genre>
377 <xsl:when test="contains($controlField008-24,'l')">
378 <genre authority="marc">legislation</genre>
380 <xsl:when test="contains($controlField008-24,'m')">
381 <genre authority="marc">theses</genre>
383 <xsl:when test="contains($controlField008-24,'n')">
384 <genre authority="marc">survey of literature</genre>
386 <xsl:when test="contains($controlField008-24,'o')">
387 <genre authority="marc">review</genre>
389 <xsl:when test="contains($controlField008-24,'p')">
390 <genre authority="marc">programmed text</genre>
392 <xsl:when test="contains($controlField008-24,'q')">
393 <genre authority="marc">filmography</genre>
395 <xsl:when test="contains($controlField008-24,'r')">
396 <genre authority="marc">directory</genre>
398 <xsl:when test="contains($controlField008-24,'s')">
399 <genre authority="marc">statistics</genre>
401 <xsl:when test="contains($controlField008-24,'t')">
402 <genre authority="marc">technical report</genre>
404 <xsl:when test="contains($controlField008-24,'v')">
405 <genre authority="marc">legal case and case notes</genre>
407 <xsl:when test="contains($controlField008-24,'w')">
408 <genre authority="marc">law report or digest</genre>
410 <xsl:when test="contains($controlField008-24,'z')">
411 <genre authority="marc">treaty</genre>
414 <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"></xsl:variable>
416 <xsl:when test="$controlField008-29='1'">
417 <genre authority="marc">conference publication</genre>
421 <xsl:if test="$typeOf008='CF'">
422 <xsl:variable name="controlField008-26" select="substring($controlField008,27,1)"></xsl:variable>
424 <xsl:when test="$controlField008-26='a'">
425 <genre authority="marc">numeric data</genre>
427 <xsl:when test="$controlField008-26='e'">
428 <genre authority="marc">database</genre>
430 <xsl:when test="$controlField008-26='f'">
431 <genre authority="marc">font</genre>
433 <xsl:when test="$controlField008-26='g'">
434 <genre authority="marc">game</genre>
438 <xsl:if test="$typeOf008='BK'">
439 <xsl:if test="substring($controlField008,25,1)='j'">
440 <genre authority="marc">patent</genre>
442 <xsl:if test="substring($controlField008,31,1)='1'">
443 <genre authority="marc">festschrift</genre>
445 <xsl:variable name="controlField008-34" select="substring($controlField008,35,1)"></xsl:variable>
446 <xsl:if test="$controlField008-34='a' or $controlField008-34='b' or $controlField008-34='c' or $controlField008-34='d'">
447 <genre authority="marc">biography</genre>
449 <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"></xsl:variable>
451 <xsl:when test="$controlField008-33='e'">
452 <genre authority="marc">essay</genre>
454 <xsl:when test="$controlField008-33='d'">
455 <genre authority="marc">drama</genre>
457 <xsl:when test="$controlField008-33='c'">
458 <genre authority="marc">comic strip</genre>
460 <xsl:when test="$controlField008-33='l'">
461 <genre authority="marc">fiction</genre>
463 <xsl:when test="$controlField008-33='h'">
464 <genre authority="marc">humor, satire</genre>
466 <xsl:when test="$controlField008-33='i'">
467 <genre authority="marc">letter</genre>
469 <xsl:when test="$controlField008-33='f'">
470 <genre authority="marc">novel</genre>
472 <xsl:when test="$controlField008-33='j'">
473 <genre authority="marc">short story</genre>
475 <xsl:when test="$controlField008-33='s'">
476 <genre authority="marc">speech</genre>
480 <xsl:if test="$typeOf008='MU'">
481 <xsl:variable name="controlField008-30-31" select="substring($controlField008,31,2)"></xsl:variable>
482 <xsl:if test="contains($controlField008-30-31,'b')">
483 <genre authority="marc">biography</genre>
485 <xsl:if test="contains($controlField008-30-31,'c')">
486 <genre authority="marc">conference publication</genre>
488 <xsl:if test="contains($controlField008-30-31,'d')">
489 <genre authority="marc">drama</genre>
491 <xsl:if test="contains($controlField008-30-31,'e')">
492 <genre authority="marc">essay</genre>
494 <xsl:if test="contains($controlField008-30-31,'f')">
495 <genre authority="marc">fiction</genre>
497 <xsl:if test="contains($controlField008-30-31,'o')">
498 <genre authority="marc">folktale</genre>
500 <xsl:if test="contains($controlField008-30-31,'h')">
501 <genre authority="marc">history</genre>
503 <xsl:if test="contains($controlField008-30-31,'k')">
504 <genre authority="marc">humor, satire</genre>
506 <xsl:if test="contains($controlField008-30-31,'m')">
507 <genre authority="marc">memoir</genre>
509 <xsl:if test="contains($controlField008-30-31,'p')">
510 <genre authority="marc">poetry</genre>
512 <xsl:if test="contains($controlField008-30-31,'r')">
513 <genre authority="marc">rehearsal</genre>
515 <xsl:if test="contains($controlField008-30-31,'g')">
516 <genre authority="marc">reporting</genre>
518 <xsl:if test="contains($controlField008-30-31,'s')">
519 <genre authority="marc">sound</genre>
521 <xsl:if test="contains($controlField008-30-31,'l')">
522 <genre authority="marc">speech</genre>
525 <xsl:if test="$typeOf008='VM'">
526 <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"></xsl:variable>
528 <xsl:when test="$controlField008-33='a'">
529 <genre authority="marc">art original</genre>
531 <xsl:when test="$controlField008-33='b'">
532 <genre authority="marc">kit</genre>
534 <xsl:when test="$controlField008-33='c'">
535 <genre authority="marc">art reproduction</genre>
537 <xsl:when test="$controlField008-33='d'">
538 <genre authority="marc">diorama</genre>
540 <xsl:when test="$controlField008-33='f'">
541 <genre authority="marc">filmstrip</genre>
543 <xsl:when test="$controlField008-33='g'">
544 <genre authority="marc">legal article</genre>
546 <xsl:when test="$controlField008-33='i'">
547 <genre authority="marc">picture</genre>
549 <xsl:when test="$controlField008-33='k'">
550 <genre authority="marc">graphic</genre>
552 <xsl:when test="$controlField008-33='l'">
553 <genre authority="marc">technical drawing</genre>
555 <xsl:when test="$controlField008-33='m'">
556 <genre authority="marc">motion picture</genre>
558 <xsl:when test="$controlField008-33='n'">
559 <genre authority="marc">chart</genre>
561 <xsl:when test="$controlField008-33='o'">
562 <genre authority="marc">flash card</genre>
564 <xsl:when test="$controlField008-33='p'">
565 <genre authority="marc">microscope slide</genre>
567 <xsl:when test="$controlField008-33='q' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
568 <genre authority="marc">model</genre>
570 <xsl:when test="$controlField008-33='r'">
571 <genre authority="marc">realia</genre>
573 <xsl:when test="$controlField008-33='s'">
574 <genre authority="marc">slide</genre>
576 <xsl:when test="$controlField008-33='t'">
577 <genre authority="marc">transparency</genre>
579 <xsl:when test="$controlField008-33='v'">
580 <genre authority="marc">videorecording</genre>
582 <xsl:when test="$controlField008-33='w'">
583 <genre authority="marc">toy</genre>
587 <xsl:for-each select="marc:datafield[@tag=655]">
588 <genre authority="marc">
589 <xsl:attribute name="authority">
590 <xsl:value-of select="marc:subfield[@code='2']"/>
592 <xsl:call-template name="subfieldSelect">
593 <xsl:with-param name="codes">abvxyz</xsl:with-param>
594 <xsl:with-param name="delimeter">-</xsl:with-param>
599 <xsl:variable name="MARCpublicationCode" select="normalize-space(substring($controlField008,16,3))"></xsl:variable>
600 <xsl:if test="translate($MARCpublicationCode,'|','')">
603 <xsl:attribute name="type">code</xsl:attribute>
604 <xsl:attribute name="authority">marccountry</xsl:attribute>
605 <xsl:value-of select="$MARCpublicationCode"/>
609 <xsl:for-each select="marc:datafield[@tag=044]/marc:subfield[@code='c']">
612 <xsl:attribute name="type">code</xsl:attribute>
613 <xsl:attribute name="authority">iso3166</xsl:attribute>
614 <xsl:value-of select="."/>
618 <xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='a']">
621 <xsl:attribute name="type">text</xsl:attribute>
622 <xsl:call-template name="chopPunctuationFront">
623 <xsl:with-param name="chopString">
624 <xsl:call-template name="chopPunctuation">
625 <xsl:with-param name="chopString" select="."/>
632 <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='m']">
633 <dateValid point="start">
634 <xsl:value-of select="."/>
637 <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='n']">
638 <dateValid point="end">
639 <xsl:value-of select="."/>
642 <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='j']">
644 <xsl:value-of select="."/>
647 <xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='b' or @code='c' or @code='g']">
649 <xsl:when test="@code='b'">
651 <xsl:call-template name="chopPunctuation">
652 <xsl:with-param name="chopString" select="."/>
653 <xsl:with-param name="punctuation">
654 <xsl:text>:,;/ </xsl:text>
659 <xsl:when test="@code='c'">
661 <xsl:call-template name="chopPunctuation">
662 <xsl:with-param name="chopString" select="."/>
666 <xsl:when test="@code='g'">
668 <xsl:value-of select="."/>
673 <xsl:variable name="dataField260c">
674 <xsl:call-template name="chopPunctuation">
675 <xsl:with-param name="chopString" select="marc:datafield[@tag=260]/marc:subfield[@code='c']"></xsl:with-param>
678 <xsl:variable name="controlField008-7-10" select="normalize-space(substring($controlField008, 8, 4))"></xsl:variable>
679 <xsl:variable name="controlField008-11-14" select="normalize-space(substring($controlField008, 12, 4))"></xsl:variable>
680 <xsl:variable name="controlField008-6" select="normalize-space(substring($controlField008, 7, 1))"></xsl:variable>
681 <xsl:if test="$controlField008-6='e' or $controlField008-6='p' or $controlField008-6='r' or $controlField008-6='t' or $controlField008-6='s'">
682 <xsl:if test="$controlField008-7-10 and ($controlField008-7-10 != $dataField260c)">
683 <dateIssued encoding="marc">
684 <xsl:value-of select="$controlField008-7-10"/>
688 <xsl:if test="$controlField008-6='c' or $controlField008-6='d' or $controlField008-6='i' or $controlField008-6='k' or $controlField008-6='m' or $controlField008-6='q' or $controlField008-6='u'">
689 <xsl:if test="$controlField008-7-10">
690 <dateIssued encoding="marc" point="start">
691 <xsl:value-of select="$controlField008-7-10"/>
695 <xsl:if test="$controlField008-6='c' or $controlField008-6='d' or $controlField008-6='i' or $controlField008-6='k' or $controlField008-6='m' or $controlField008-6='q' or $controlField008-6='u'">
696 <xsl:if test="$controlField008-11-14">
697 <dateIssued encoding="marc" point="end">
698 <xsl:value-of select="$controlField008-11-14"/>
702 <xsl:if test="$controlField008-6='q'">
703 <xsl:if test="$controlField008-7-10">
704 <dateIssued encoding="marc" point="start" qualifier="questionable">
705 <xsl:value-of select="$controlField008-7-10"/>
709 <xsl:if test="$controlField008-6='q'">
710 <xsl:if test="$controlField008-11-14">
711 <dateIssued encoding="marc" point="end" qualifier="questionable">
712 <xsl:value-of select="$controlField008-11-14"/>
716 <xsl:if test="$controlField008-6='t'">
717 <xsl:if test="$controlField008-11-14">
718 <copyrightDate encoding="marc">
719 <xsl:value-of select="$controlField008-11-14"/>
723 <xsl:for-each select="marc:datafield[@tag=033][@ind1=0 or @ind1=1]/marc:subfield[@code='a']">
724 <dateCaptured encoding="iso8601">
725 <xsl:value-of select="."/>
728 <xsl:for-each select="marc:datafield[@tag=033][@ind1=2]/marc:subfield[@code='a'][1]">
729 <dateCaptured encoding="iso8601" point="start">
730 <xsl:value-of select="."/>
733 <xsl:for-each select="marc:datafield[@tag=033][@ind1=2]/marc:subfield[@code='a'][2]">
734 <dateCaptured encoding="iso8601" point="end">
735 <xsl:value-of select="."/>
738 <xsl:for-each select="marc:datafield[@tag=250]/marc:subfield[@code='a']">
740 <xsl:value-of select="."/>
743 <xsl:for-each select="marc:leader">
746 <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">monographic</xsl:when>
747 <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">continuing</xsl:when>
751 <xsl:for-each select="marc:datafield[@tag=310]|marc:datafield[@tag=321]">
753 <xsl:call-template name="subfieldSelect">
754 <xsl:with-param name="codes">ab</xsl:with-param>
759 <xsl:variable name="controlField008-35-37" select="normalize-space(translate(substring($controlField008,36,3),'|#',''))"></xsl:variable>
760 <xsl:if test="$controlField008-35-37">
762 <languageTerm authority="iso639-2b" type="code">
763 <xsl:value-of select="substring($controlField008,36,3)"/>
767 <xsl:for-each select="marc:datafield[@tag=041]">
768 <xsl:for-each select="marc:subfield[@code='a' or @code='b' or @code='d' or @code='e' or @code='f' or @code='g' or @code='h']">
769 <xsl:variable name="langCodes" select="."/>
771 <xsl:when test="../marc:subfield[@code='2']='rfc3066'">
772 <!-- not stacked but could be repeated -->
773 <xsl:call-template name="rfcLanguages">
774 <xsl:with-param name="nodeNum">
775 <xsl:value-of select="1"/>
777 <xsl:with-param name="usedLanguages">
778 <xsl:text></xsl:text>
780 <xsl:with-param name="controlField008-35-37">
781 <xsl:value-of select="$controlField008-35-37"></xsl:value-of>
787 <xsl:variable name="allLanguages">
788 <xsl:copy-of select="$langCodes"></xsl:copy-of>
790 <xsl:variable name="currentLanguage">
791 <xsl:value-of select="substring($allLanguages,1,3)"></xsl:value-of>
793 <xsl:call-template name="isoLanguage">
794 <xsl:with-param name="currentLanguage">
795 <xsl:value-of select="substring($allLanguages,1,3)"></xsl:value-of>
797 <xsl:with-param name="remainingLanguages">
798 <xsl:value-of select="substring($allLanguages,4,string-length($allLanguages)-3)"></xsl:value-of>
800 <xsl:with-param name="usedLanguages">
801 <xsl:if test="$controlField008-35-37">
802 <xsl:value-of select="$controlField008-35-37"></xsl:value-of>
810 <xsl:variable name="physicalDescription">
811 <!--3.2 change tmee 007/11 -->
812 <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='a']">
813 <digitalOrigin>reformatted digital</digitalOrigin>
815 <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='b']">
816 <digitalOrigin>digitized microfilm</digitalOrigin>
818 <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='d']">
819 <digitalOrigin>digitized other analog</digitalOrigin>
821 <xsl:variable name="controlField008-23" select="substring($controlField008,24,1)"></xsl:variable>
822 <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"></xsl:variable>
823 <xsl:variable name="check008-23">
824 <xsl:if test="$typeOf008='BK' or $typeOf008='MU' or $typeOf008='SE' or $typeOf008='MM'">
825 <xsl:value-of select="true()"></xsl:value-of>
828 <xsl:variable name="check008-29">
829 <xsl:if test="$typeOf008='MP' or $typeOf008='VM'">
830 <xsl:value-of select="true()"></xsl:value-of>
834 <xsl:when test="($check008-23 and $controlField008-23='f') or ($check008-29 and $controlField008-29='f')">
835 <form authority="marcform">braille</form>
837 <xsl:when test="($controlField008-23=' ' and ($leader6='c' or $leader6='d')) or (($typeOf008='BK' or $typeOf008='SE') and ($controlField008-23=' ' or $controlField008='r'))">
838 <form authority="marcform">print</form>
840 <xsl:when test="$leader6 = 'm' or ($check008-23 and $controlField008-23='s') or ($check008-29 and $controlField008-29='s')">
841 <form authority="marcform">electronic</form>
843 <xsl:when test="($check008-23 and $controlField008-23='b') or ($check008-29 and $controlField008-29='b')">
844 <form authority="marcform">microfiche</form>
846 <xsl:when test="($check008-23 and $controlField008-23='a') or ($check008-29 and $controlField008-29='a')">
847 <form authority="marcform">microfilm</form>
851 <xsl:if test="marc:datafield[@tag=130]/marc:subfield[@code='h']">
852 <form authority="gmd">
853 <xsl:call-template name="chopBrackets">
854 <xsl:with-param name="chopString">
855 <xsl:value-of select="marc:datafield[@tag=130]/marc:subfield[@code='h']"></xsl:value-of>
860 <xsl:if test="marc:datafield[@tag=240]/marc:subfield[@code='h']">
861 <form authority="gmd">
862 <xsl:call-template name="chopBrackets">
863 <xsl:with-param name="chopString">
864 <xsl:value-of select="marc:datafield[@tag=240]/marc:subfield[@code='h']"></xsl:value-of>
869 <xsl:if test="marc:datafield[@tag=242]/marc:subfield[@code='h']">
870 <form authority="gmd">
871 <xsl:call-template name="chopBrackets">
872 <xsl:with-param name="chopString">
873 <xsl:value-of select="marc:datafield[@tag=242]/marc:subfield[@code='h']"></xsl:value-of>
878 <xsl:if test="marc:datafield[@tag=245]/marc:subfield[@code='h']">
879 <form authority="gmd">
880 <xsl:call-template name="chopBrackets">
881 <xsl:with-param name="chopString">
882 <xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='h']"></xsl:value-of>
887 <xsl:if test="marc:datafield[@tag=246]/marc:subfield[@code='h']">
888 <form authority="gmd">
889 <xsl:call-template name="chopBrackets">
890 <xsl:with-param name="chopString">
891 <xsl:value-of select="marc:datafield[@tag=246]/marc:subfield[@code='h']"></xsl:value-of>
896 <xsl:if test="marc:datafield[@tag=730]/marc:subfield[@code='h']">
897 <form authority="gmd">
898 <xsl:call-template name="chopBrackets">
899 <xsl:with-param name="chopString">
900 <xsl:value-of select="marc:datafield[@tag=730]/marc:subfield[@code='h']"></xsl:value-of>
905 <xsl:for-each select="marc:datafield[@tag=256]/marc:subfield[@code='a']">
907 <xsl:value-of select="."></xsl:value-of>
910 <xsl:for-each select="marc:controlfield[@tag=007][substring(text(),1,1)='c']">
912 <xsl:when test="substring(text(),14,1)='a'">
913 <reformattingQuality>access</reformattingQuality>
915 <xsl:when test="substring(text(),14,1)='p'">
916 <reformattingQuality>preservation</reformattingQuality>
918 <xsl:when test="substring(text(),14,1)='r'">
919 <reformattingQuality>replacement</reformattingQuality>
923 <!--3.2 change tmee 007/01 -->
924 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='b']">
925 <form authority="smd">chip cartridge</form>
927 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='c']">
928 <form authority="smd">computer optical disc cartridge</form>
930 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='j']">
931 <form authority="smd">magnetic disc</form>
933 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='m']">
934 <form authority="smd">magneto-optical disc</form>
936 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='o']">
937 <form authority="smd">optical disc</form>
939 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='r']">
940 <form authority="smd">remote</form>
942 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='a']">
943 <form authority="smd">tape cartridge</form>
945 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='f']">
946 <form authority="smd">tape cassette</form>
948 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='h']">
949 <form authority="smd">tape reel</form>
952 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='a']">
953 <form authority="smd">celestial globe</form>
955 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='e']">
956 <form authority="smd">earth moon globe</form>
958 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='b']">
959 <form authority="smd">planetary or lunar globe</form>
961 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='c']">
962 <form authority="smd">terrestrial globe</form>
965 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='o'][substring(text(),2,1)='o']">
966 <form authority="smd">kit</form>
969 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
970 <form authority="smd">atlas</form>
972 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='g']">
973 <form authority="smd">diagram</form>
975 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='j']">
976 <form authority="smd">map</form>
978 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
979 <form authority="smd">model</form>
981 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='k']">
982 <form authority="smd">profile</form>
984 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='r']">
985 <form authority="smd">remote-sensing image</form>
987 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='s']">
988 <form authority="smd">section</form>
990 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='y']">
991 <form authority="smd">view</form>
994 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='a']">
995 <form authority="smd">aperture card</form>
997 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='e']">
998 <form authority="smd">microfiche</form>
1000 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='f']">
1001 <form authority="smd">microfiche cassette</form>
1003 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='b']">
1004 <form authority="smd">microfilm cartridge</form>
1006 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='c']">
1007 <form authority="smd">microfilm cassette</form>
1009 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='d']">
1010 <form authority="smd">microfilm reel</form>
1012 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='g']">
1013 <form authority="smd">microopaque</form>
1016 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='c']">
1017 <form authority="smd">film cartridge</form>
1019 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='f']">
1020 <form authority="smd">film cassette</form>
1022 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='r']">
1023 <form authority="smd">film reel</form>
1026 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='n']">
1027 <form authority="smd">chart</form>
1029 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='c']">
1030 <form authority="smd">collage</form>
1032 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='d']">
1033 <form authority="smd">drawing</form>
1035 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='o']">
1036 <form authority="smd">flash card</form>
1038 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='e']">
1039 <form authority="smd">painting</form>
1041 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='f']">
1042 <form authority="smd">photomechanical print</form>
1044 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='g']">
1045 <form authority="smd">photonegative</form>
1047 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='h']">
1048 <form authority="smd">photoprint</form>
1050 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='i']">
1051 <form authority="smd">picture</form>
1053 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='j']">
1054 <form authority="smd">print</form>
1056 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='l']">
1057 <form authority="smd">technical drawing</form>
1060 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='q'][substring(text(),2,1)='q']">
1061 <form authority="smd">notated music</form>
1064 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='d']">
1065 <form authority="smd">filmslip</form>
1067 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='c']">
1068 <form authority="smd">filmstrip cartridge</form>
1070 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='o']">
1071 <form authority="smd">filmstrip roll</form>
1073 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='f']">
1074 <form authority="smd">other filmstrip type</form>
1076 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='s']">
1077 <form authority="smd">slide</form>
1079 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='t']">
1080 <form authority="smd">transparency</form>
1082 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='r'][substring(text(),2,1)='r']">
1083 <form authority="smd">remote-sensing image</form>
1085 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='e']">
1086 <form authority="smd">cylinder</form>
1088 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='q']">
1089 <form authority="smd">roll</form>
1091 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='g']">
1092 <form authority="smd">sound cartridge</form>
1094 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='s']">
1095 <form authority="smd">sound cassette</form>
1097 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='d']">
1098 <form authority="smd">sound disc</form>
1100 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='t']">
1101 <form authority="smd">sound-tape reel</form>
1103 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='i']">
1104 <form authority="smd">sound-track film</form>
1106 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='w']">
1107 <form authority="smd">wire recording</form>
1110 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='c']">
1111 <form authority="smd">braille</form>
1113 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='b']">
1114 <form authority="smd">combination</form>
1116 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='a']">
1117 <form authority="smd">moon</form>
1119 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='d']">
1120 <form authority="smd">tactile, with no writing system</form>
1123 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='c']">
1124 <form authority="smd">braille</form>
1126 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='b']">
1127 <form authority="smd">large print</form>
1129 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='a']">
1130 <form authority="smd">regular print</form>
1132 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='d']">
1133 <form authority="smd">text in looseleaf binder</form>
1136 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='c']">
1137 <form authority="smd">videocartridge</form>
1139 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='f']">
1140 <form authority="smd">videocassette</form>
1142 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='d']">
1143 <form authority="smd">videodisc</form>
1145 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='r']">
1146 <form authority="smd">videoreel</form>
1149 <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q'][string-length(.)>1]">
1151 <xsl:value-of select="."></xsl:value-of>
1152 </internetMediaType>
1154 <xsl:for-each select="marc:datafield[@tag=300]">
1156 <xsl:call-template name="subfieldSelect">
1157 <xsl:with-param name="codes">abce</xsl:with-param>
1158 </xsl:call-template>
1162 <xsl:if test="string-length(normalize-space($physicalDescription))">
1163 <physicalDescription>
1164 <xsl:copy-of select="$physicalDescription"></xsl:copy-of>
1165 </physicalDescription>
1167 <xsl:for-each select="marc:datafield[@tag=520]">
1169 <xsl:call-template name="uri"></xsl:call-template>
1170 <xsl:call-template name="subfieldSelect">
1171 <xsl:with-param name="codes">ab</xsl:with-param>
1172 </xsl:call-template>
1175 <xsl:for-each select="marc:datafield[@tag=505]">
1177 <xsl:call-template name="uri"></xsl:call-template>
1178 <xsl:call-template name="subfieldSelect">
1179 <xsl:with-param name="codes">agrt</xsl:with-param>
1180 </xsl:call-template>
1183 <xsl:for-each select="marc:datafield[@tag=521]">
1185 <xsl:call-template name="subfieldSelect">
1186 <xsl:with-param name="codes">ab</xsl:with-param>
1187 </xsl:call-template>
1190 <xsl:if test="$typeOf008='BK' or $typeOf008='CF' or $typeOf008='MU' or $typeOf008='VM'">
1191 <xsl:variable name="controlField008-22" select="substring($controlField008,23,1)"></xsl:variable>
1194 <xsl:when test="$controlField008-22='d'">
1195 <targetAudience authority="marctarget">adolescent</targetAudience>
1197 <xsl:when test="$controlField008-22='e'">
1198 <targetAudience authority="marctarget">adult</targetAudience>
1200 <xsl:when test="$controlField008-22='g'">
1201 <targetAudience authority="marctarget">general</targetAudience>
1203 <xsl:when test="$controlField008-22='b' or $controlField008-22='c' or $controlField008-22='j'">
1204 <targetAudience authority="marctarget">juvenile</targetAudience>
1206 <xsl:when test="$controlField008-22='a'">
1207 <targetAudience authority="marctarget">preschool</targetAudience>
1209 <xsl:when test="$controlField008-22='f'">
1210 <targetAudience authority="marctarget">specialized</targetAudience>
1214 <xsl:for-each select="marc:datafield[@tag=245]/marc:subfield[@code='c']">
1215 <note type="statement of responsibility">
1216 <xsl:value-of select="."></xsl:value-of>
1219 <xsl:for-each select="marc:datafield[@tag=500]">
1221 <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
1222 <xsl:call-template name="uri"></xsl:call-template>
1226 <!--3.2 change tmee additional note fields-->
1228 <xsl:for-each select="marc:datafield[@tag=506]">
1229 <note type="restrictions">
1230 <xsl:call-template name="uri"></xsl:call-template>
1231 <xsl:variable name="str">
1232 <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
1233 <xsl:value-of select="."></xsl:value-of>
1234 <xsl:text> </xsl:text>
1237 <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
1241 <xsl:for-each select="marc:datafield[@tag=510]">
1242 <note type="citation/reference">
1243 <xsl:call-template name="uri"></xsl:call-template>
1244 <xsl:variable name="str">
1245 <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
1246 <xsl:value-of select="."></xsl:value-of>
1247 <xsl:text> </xsl:text>
1250 <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
1255 <xsl:for-each select="marc:datafield[@tag=511]">
1256 <note type="performers">
1257 <xsl:call-template name="uri"></xsl:call-template>
1258 <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
1261 <xsl:for-each select="marc:datafield[@tag=518]">
1263 <xsl:call-template name="uri"></xsl:call-template>
1264 <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
1268 <xsl:for-each select="marc:datafield[@tag=530]">
1269 <note type="additional physical form">
1270 <xsl:call-template name="uri"></xsl:call-template>
1271 <xsl:variable name="str">
1272 <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
1273 <xsl:value-of select="."></xsl:value-of>
1274 <xsl:text> </xsl:text>
1277 <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
1281 <xsl:for-each select="marc:datafield[@tag=533]">
1282 <note type="reproduction">
1283 <xsl:call-template name="uri"></xsl:call-template>
1284 <xsl:variable name="str">
1285 <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
1286 <xsl:value-of select="."></xsl:value-of>
1287 <xsl:text> </xsl:text>
1290 <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
1294 <xsl:for-each select="marc:datafield[@tag=534]">
1295 <note type="original version">
1296 <xsl:call-template name="uri"></xsl:call-template>
1297 <xsl:variable name="str">
1298 <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
1299 <xsl:value-of select="."></xsl:value-of>
1300 <xsl:text> </xsl:text>
1303 <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
1307 <xsl:for-each select="marc:datafield[@tag=538]">
1308 <note type="system details">
1309 <xsl:call-template name="uri"></xsl:call-template>
1310 <xsl:variable name="str">
1311 <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
1312 <xsl:value-of select="."></xsl:value-of>
1313 <xsl:text> </xsl:text>
1316 <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
1320 <xsl:for-each select="marc:datafield[@tag=583]">
1321 <note type="action">
1322 <xsl:call-template name="uri"></xsl:call-template>
1323 <xsl:variable name="str">
1324 <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
1325 <xsl:value-of select="."></xsl:value-of>
1326 <xsl:text> </xsl:text>
1329 <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
1337 <xsl:for-each select="marc:datafield[@tag=501 or @tag=502 or @tag=504 or @tag=507 or @tag=508 or @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=535 or @tag=536 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=584 or @tag=585 or @tag=586]">
1339 <xsl:call-template name="uri"></xsl:call-template>
1340 <xsl:variable name="str">
1341 <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
1342 <xsl:value-of select="."></xsl:value-of>
1343 <xsl:text> </xsl:text>
1346 <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
1349 <xsl:for-each select="marc:datafield[@tag=034][marc:subfield[@code='d' or @code='e' or @code='f' or @code='g']]">
1353 <xsl:call-template name="subfieldSelect">
1354 <xsl:with-param name="codes">defg</xsl:with-param>
1355 </xsl:call-template>
1360 <xsl:for-each select="marc:datafield[@tag=043]">
1362 <xsl:for-each select="marc:subfield[@code='a' or @code='b' or @code='c']">
1364 <xsl:attribute name="authority">
1365 <xsl:if test="@code='a'">
1366 <xsl:text>marcgac</xsl:text>
1368 <xsl:if test="@code='b'">
1369 <xsl:value-of select="following-sibling::marc:subfield[@code=2]"></xsl:value-of>
1371 <xsl:if test="@code='c'">
1372 <xsl:text>iso3166</xsl:text>
1375 <xsl:value-of select="self::marc:subfield"></xsl:value-of>
1380 <!-- tmee 2006/11/27 -->
1381 <xsl:for-each select="marc:datafield[@tag=255]">
1383 <xsl:for-each select="marc:subfield[@code='a' or @code='b' or @code='c']">
1385 <xsl:if test="@code='a'">
1387 <xsl:value-of select="."></xsl:value-of>
1390 <xsl:if test="@code='b'">
1392 <xsl:value-of select="."></xsl:value-of>
1395 <xsl:if test="@code='c'">
1397 <xsl:value-of select="."></xsl:value-of>
1405 <xsl:apply-templates select="marc:datafield[653 >= @tag and @tag >= 600]"></xsl:apply-templates>
1406 <xsl:apply-templates select="marc:datafield[@tag=656]"></xsl:apply-templates>
1407 <xsl:for-each select="marc:datafield[@tag=752]">
1409 <hierarchicalGeographic>
1410 <xsl:for-each select="marc:subfield[@code='a']">
1412 <xsl:call-template name="chopPunctuation">
1413 <xsl:with-param name="chopString" select="."></xsl:with-param>
1414 </xsl:call-template>
1417 <xsl:for-each select="marc:subfield[@code='b']">
1419 <xsl:call-template name="chopPunctuation">
1420 <xsl:with-param name="chopString" select="."></xsl:with-param>
1421 </xsl:call-template>
1424 <xsl:for-each select="marc:subfield[@code='c']">
1426 <xsl:call-template name="chopPunctuation">
1427 <xsl:with-param name="chopString" select="."></xsl:with-param>
1428 </xsl:call-template>
1431 <xsl:for-each select="marc:subfield[@code='d']">
1433 <xsl:call-template name="chopPunctuation">
1434 <xsl:with-param name="chopString" select="."></xsl:with-param>
1435 </xsl:call-template>
1438 </hierarchicalGeographic>
1441 <xsl:for-each select="marc:datafield[@tag=045][marc:subfield[@code='b']]">
1444 <xsl:when test="@ind1=2">
1445 <temporal encoding="iso8601" point="start">
1446 <xsl:call-template name="chopPunctuation">
1447 <xsl:with-param name="chopString">
1448 <xsl:value-of select="marc:subfield[@code='b'][1]"></xsl:value-of>
1450 </xsl:call-template>
1452 <temporal encoding="iso8601" point="end">
1453 <xsl:call-template name="chopPunctuation">
1454 <xsl:with-param name="chopString">
1455 <xsl:value-of select="marc:subfield[@code='b'][2]"></xsl:value-of>
1457 </xsl:call-template>
1461 <xsl:for-each select="marc:subfield[@code='b']">
1462 <temporal encoding="iso8601">
1463 <xsl:call-template name="chopPunctuation">
1464 <xsl:with-param name="chopString" select="."></xsl:with-param>
1465 </xsl:call-template>
1472 <xsl:for-each select="marc:datafield[@tag=050]">
1473 <xsl:for-each select="marc:subfield[@code='b']">
1474 <classification authority="lcc">
1475 <xsl:if test="../marc:subfield[@code='3']">
1476 <xsl:attribute name="displayLabel">
1477 <xsl:value-of select="../marc:subfield[@code='3']"></xsl:value-of>
1480 <xsl:value-of select="preceding-sibling::marc:subfield[@code='a'][1]"></xsl:value-of>
1481 <xsl:text> </xsl:text>
1482 <xsl:value-of select="text()"></xsl:value-of>
1485 <xsl:for-each select="marc:subfield[@code='a'][not(following-sibling::marc:subfield[@code='b'])]">
1486 <classification authority="lcc">
1487 <xsl:if test="../marc:subfield[@code='3']">
1488 <xsl:attribute name="displayLabel">
1489 <xsl:value-of select="../marc:subfield[@code='3']"></xsl:value-of>
1492 <xsl:value-of select="text()"></xsl:value-of>
1496 <xsl:for-each select="marc:datafield[@tag=082]">
1497 <classification authority="ddc">
1498 <xsl:if test="marc:subfield[@code='2']">
1499 <xsl:attribute name="edition">
1500 <xsl:value-of select="marc:subfield[@code='2']"></xsl:value-of>
1503 <xsl:call-template name="subfieldSelect">
1504 <xsl:with-param name="codes">ab</xsl:with-param>
1505 </xsl:call-template>
1508 <xsl:for-each select="marc:datafield[@tag=080]">
1509 <classification authority="udc">
1510 <xsl:call-template name="subfieldSelect">
1511 <xsl:with-param name="codes">abx</xsl:with-param>
1512 </xsl:call-template>
1515 <xsl:for-each select="marc:datafield[@tag=060]">
1516 <classification authority="nlm">
1517 <xsl:call-template name="subfieldSelect">
1518 <xsl:with-param name="codes">ab</xsl:with-param>
1519 </xsl:call-template>
1522 <xsl:for-each select="marc:datafield[@tag=086][@ind1=0]">
1523 <classification authority="sudocs">
1524 <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
1527 <xsl:for-each select="marc:datafield[@tag=086][@ind1=1]">
1528 <classification authority="candoc">
1529 <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
1532 <xsl:for-each select="marc:datafield[@tag=086]">
1534 <xsl:attribute name="authority">
1535 <xsl:value-of select="marc:subfield[@code='2']"></xsl:value-of>
1537 <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
1540 <xsl:for-each select="marc:datafield[@tag=084]">
1542 <xsl:attribute name="authority">
1543 <xsl:value-of select="marc:subfield[@code='2']"></xsl:value-of>
1545 <xsl:call-template name="subfieldSelect">
1546 <xsl:with-param name="codes">ab</xsl:with-param>
1547 </xsl:call-template>
1550 <xsl:for-each select="marc:datafield[@tag=440]">
1551 <relatedItem type="series">
1554 <xsl:call-template name="chopPunctuation">
1555 <xsl:with-param name="chopString">
1556 <xsl:call-template name="subfieldSelect">
1557 <xsl:with-param name="codes">av</xsl:with-param>
1558 </xsl:call-template>
1560 </xsl:call-template>
1562 <xsl:call-template name="part"></xsl:call-template>
1566 <xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
1567 <relatedItem type="series">
1570 <xsl:call-template name="chopPunctuation">
1571 <xsl:with-param name="chopString">
1572 <xsl:call-template name="subfieldSelect">
1573 <xsl:with-param name="codes">av</xsl:with-param>
1574 </xsl:call-template>
1576 </xsl:call-template>
1578 <xsl:call-template name="part"></xsl:call-template>
1582 <xsl:for-each select="marc:datafield[@tag=510]">
1583 <relatedItem type="isReferencedBy">
1585 <xsl:call-template name="subfieldSelect">
1586 <xsl:with-param name="codes">abcx3</xsl:with-param>
1587 </xsl:call-template>
1591 <xsl:for-each select="marc:datafield[@tag=534]">
1592 <relatedItem type="original">
1593 <xsl:call-template name="relatedTitle"></xsl:call-template>
1594 <xsl:call-template name="relatedName"></xsl:call-template>
1595 <xsl:if test="marc:subfield[@code='b' or @code='c']">
1597 <xsl:for-each select="marc:subfield[@code='c']">
1599 <xsl:value-of select="."></xsl:value-of>
1602 <xsl:for-each select="marc:subfield[@code='b']">
1604 <xsl:value-of select="."></xsl:value-of>
1609 <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
1610 <xsl:for-each select="marc:subfield[@code='z']">
1611 <identifier type="isbn">
1612 <xsl:value-of select="."></xsl:value-of>
1615 <xsl:call-template name="relatedNote"></xsl:call-template>
1618 <xsl:for-each select="marc:datafield[@tag=700][marc:subfield[@code='t']]">
1620 <xsl:call-template name="constituentOrRelatedType"></xsl:call-template>
1623 <xsl:call-template name="chopPunctuation">
1624 <xsl:with-param name="chopString">
1625 <xsl:call-template name="specialSubfieldSelect">
1626 <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
1627 <xsl:with-param name="axis">t</xsl:with-param>
1628 <xsl:with-param name="afterCodes">g</xsl:with-param>
1629 </xsl:call-template>
1631 </xsl:call-template>
1633 <xsl:call-template name="part"></xsl:call-template>
1635 <name type="personal">
1637 <xsl:call-template name="specialSubfieldSelect">
1638 <xsl:with-param name="anyCodes">aq</xsl:with-param>
1639 <xsl:with-param name="axis">t</xsl:with-param>
1640 <xsl:with-param name="beforeCodes">g</xsl:with-param>
1641 </xsl:call-template>
1643 <xsl:call-template name="termsOfAddress"></xsl:call-template>
1644 <xsl:call-template name="nameDate"></xsl:call-template>
1645 <xsl:call-template name="role"></xsl:call-template>
1647 <xsl:call-template name="relatedForm"></xsl:call-template>
1648 <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
1651 <xsl:for-each select="marc:datafield[@tag=710][marc:subfield[@code='t']]">
1653 <xsl:call-template name="constituentOrRelatedType"></xsl:call-template>
1656 <xsl:call-template name="chopPunctuation">
1657 <xsl:with-param name="chopString">
1658 <xsl:call-template name="specialSubfieldSelect">
1659 <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
1660 <xsl:with-param name="axis">t</xsl:with-param>
1661 <xsl:with-param name="afterCodes">dg</xsl:with-param>
1662 </xsl:call-template>
1664 </xsl:call-template>
1666 <xsl:call-template name="relatedPartNumName"></xsl:call-template>
1668 <name type="corporate">
1669 <xsl:for-each select="marc:subfield[@code='a']">
1671 <xsl:value-of select="."></xsl:value-of>
1674 <xsl:for-each select="marc:subfield[@code='b']">
1676 <xsl:value-of select="."></xsl:value-of>
1679 <xsl:variable name="tempNamePart">
1680 <xsl:call-template name="specialSubfieldSelect">
1681 <xsl:with-param name="anyCodes">c</xsl:with-param>
1682 <xsl:with-param name="axis">t</xsl:with-param>
1683 <xsl:with-param name="beforeCodes">dgn</xsl:with-param>
1684 </xsl:call-template>
1686 <xsl:if test="normalize-space($tempNamePart)">
1688 <xsl:value-of select="$tempNamePart"></xsl:value-of>
1691 <xsl:call-template name="role"></xsl:call-template>
1693 <xsl:call-template name="relatedForm"></xsl:call-template>
1694 <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
1697 <xsl:for-each select="marc:datafield[@tag=711][marc:subfield[@code='t']]">
1699 <xsl:call-template name="constituentOrRelatedType"></xsl:call-template>
1702 <xsl:call-template name="chopPunctuation">
1703 <xsl:with-param name="chopString">
1704 <xsl:call-template name="specialSubfieldSelect">
1705 <xsl:with-param name="anyCodes">tfklsv</xsl:with-param>
1706 <xsl:with-param name="axis">t</xsl:with-param>
1707 <xsl:with-param name="afterCodes">g</xsl:with-param>
1708 </xsl:call-template>
1710 </xsl:call-template>
1712 <xsl:call-template name="relatedPartNumName"></xsl:call-template>
1714 <name type="conference">
1716 <xsl:call-template name="specialSubfieldSelect">
1717 <xsl:with-param name="anyCodes">aqdc</xsl:with-param>
1718 <xsl:with-param name="axis">t</xsl:with-param>
1719 <xsl:with-param name="beforeCodes">gn</xsl:with-param>
1720 </xsl:call-template>
1723 <xsl:call-template name="relatedForm"></xsl:call-template>
1724 <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
1727 <xsl:for-each select="marc:datafield[@tag=730][@ind2=2]">
1729 <xsl:call-template name="constituentOrRelatedType"></xsl:call-template>
1732 <xsl:call-template name="chopPunctuation">
1733 <xsl:with-param name="chopString">
1734 <xsl:call-template name="subfieldSelect">
1735 <xsl:with-param name="codes">adfgklmorsv</xsl:with-param>
1736 </xsl:call-template>
1738 </xsl:call-template>
1740 <xsl:call-template name="part"></xsl:call-template>
1742 <xsl:call-template name="relatedForm"></xsl:call-template>
1743 <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
1746 <xsl:for-each select="marc:datafield[@tag=740][@ind2=2]">
1748 <xsl:call-template name="constituentOrRelatedType"></xsl:call-template>
1751 <xsl:call-template name="chopPunctuation">
1752 <xsl:with-param name="chopString">
1753 <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
1755 </xsl:call-template>
1757 <xsl:call-template name="part"></xsl:call-template>
1759 <xsl:call-template name="relatedForm"></xsl:call-template>
1762 <xsl:for-each select="marc:datafield[@tag=760]|marc:datafield[@tag=762]">
1763 <relatedItem type="series">
1764 <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
1767 <xsl:for-each select="marc:datafield[@tag=765]|marc:datafield[@tag=767]|marc:datafield[@tag=777]|marc:datafield[@tag=787]">
1769 <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
1772 <xsl:for-each select="marc:datafield[@tag=775]">
1773 <relatedItem type="otherVersion">
1774 <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
1777 <xsl:for-each select="marc:datafield[@tag=770]|marc:datafield[@tag=774]">
1778 <relatedItem type="constituent">
1779 <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
1782 <xsl:for-each select="marc:datafield[@tag=772]|marc:datafield[@tag=773]">
1783 <relatedItem type="host">
1784 <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
1787 <xsl:for-each select="marc:datafield[@tag=776]">
1788 <relatedItem type="otherFormat">
1789 <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
1792 <xsl:for-each select="marc:datafield[@tag=780]">
1793 <relatedItem type="preceding">
1794 <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
1797 <xsl:for-each select="marc:datafield[@tag=785]">
1798 <relatedItem type="succeeding">
1799 <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
1802 <xsl:for-each select="marc:datafield[@tag=786]">
1803 <relatedItem type="original">
1804 <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
1807 <xsl:for-each select="marc:datafield[@tag=800]">
1808 <relatedItem type="series">
1811 <xsl:call-template name="chopPunctuation">
1812 <xsl:with-param name="chopString">
1813 <xsl:call-template name="specialSubfieldSelect">
1814 <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
1815 <xsl:with-param name="axis">t</xsl:with-param>
1816 <xsl:with-param name="afterCodes">g</xsl:with-param>
1817 </xsl:call-template>
1819 </xsl:call-template>
1821 <xsl:call-template name="part"></xsl:call-template>
1823 <name type="personal">
1825 <xsl:call-template name="chopPunctuation">
1826 <xsl:with-param name="chopString">
1827 <xsl:call-template name="specialSubfieldSelect">
1828 <xsl:with-param name="anyCodes">aq</xsl:with-param>
1829 <xsl:with-param name="axis">t</xsl:with-param>
1830 <xsl:with-param name="beforeCodes">g</xsl:with-param>
1831 </xsl:call-template>
1833 </xsl:call-template>
1835 <xsl:call-template name="termsOfAddress"></xsl:call-template>
1836 <xsl:call-template name="nameDate"></xsl:call-template>
1837 <xsl:call-template name="role"></xsl:call-template>
1839 <xsl:call-template name="relatedForm"></xsl:call-template>
1842 <xsl:for-each select="marc:datafield[@tag=810]">
1843 <relatedItem type="series">
1846 <xsl:call-template name="chopPunctuation">
1847 <xsl:with-param name="chopString">
1848 <xsl:call-template name="specialSubfieldSelect">
1849 <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
1850 <xsl:with-param name="axis">t</xsl:with-param>
1851 <xsl:with-param name="afterCodes">dg</xsl:with-param>
1852 </xsl:call-template>
1854 </xsl:call-template>
1856 <xsl:call-template name="relatedPartNumName"></xsl:call-template>
1858 <name type="corporate">
1859 <xsl:for-each select="marc:subfield[@code='a']">
1861 <xsl:value-of select="."></xsl:value-of>
1864 <xsl:for-each select="marc:subfield[@code='b']">
1866 <xsl:value-of select="."></xsl:value-of>
1870 <xsl:call-template name="specialSubfieldSelect">
1871 <xsl:with-param name="anyCodes">c</xsl:with-param>
1872 <xsl:with-param name="axis">t</xsl:with-param>
1873 <xsl:with-param name="beforeCodes">dgn</xsl:with-param>
1874 </xsl:call-template>
1876 <xsl:call-template name="role"></xsl:call-template>
1878 <xsl:call-template name="relatedForm"></xsl:call-template>
1881 <xsl:for-each select="marc:datafield[@tag=811]">
1882 <relatedItem type="series">
1885 <xsl:call-template name="chopPunctuation">
1886 <xsl:with-param name="chopString">
1887 <xsl:call-template name="specialSubfieldSelect">
1888 <xsl:with-param name="anyCodes">tfklsv</xsl:with-param>
1889 <xsl:with-param name="axis">t</xsl:with-param>
1890 <xsl:with-param name="afterCodes">g</xsl:with-param>
1891 </xsl:call-template>
1893 </xsl:call-template>
1895 <xsl:call-template name="relatedPartNumName"/>
1897 <name type="conference">
1899 <xsl:call-template name="specialSubfieldSelect">
1900 <xsl:with-param name="anyCodes">aqdc</xsl:with-param>
1901 <xsl:with-param name="axis">t</xsl:with-param>
1902 <xsl:with-param name="beforeCodes">gn</xsl:with-param>
1903 </xsl:call-template>
1905 <xsl:call-template name="role"/>
1907 <xsl:call-template name="relatedForm"/>
1910 <xsl:for-each select="marc:datafield[@tag='830']">
1911 <relatedItem type="series">
1914 <xsl:call-template name="chopPunctuation">
1915 <xsl:with-param name="chopString">
1916 <xsl:call-template name="subfieldSelect">
1917 <xsl:with-param name="codes">adfgklmorsv</xsl:with-param>
1918 </xsl:call-template>
1920 </xsl:call-template>
1922 <xsl:call-template name="part"/>
1924 <xsl:call-template name="relatedForm"/>
1927 <xsl:for-each select="marc:datafield[@tag='856'][@ind2='2']/marc:subfield[@code='q']">
1930 <xsl:value-of select="."/>
1931 </internetMediaType>
1934 <xsl:for-each select="marc:datafield[@tag='020']">
1935 <xsl:call-template name="isInvalid">
1936 <xsl:with-param name="type">isbn</xsl:with-param>
1937 </xsl:call-template>
1938 <xsl:if test="marc:subfield[@code='a']">
1939 <identifier type="isbn">
1940 <xsl:value-of select="marc:subfield[@code='a']"/>
1944 <xsl:for-each select="marc:datafield[@tag='024'][@ind1='0']">
1945 <xsl:call-template name="isInvalid">
1946 <xsl:with-param name="type">isrc</xsl:with-param>
1947 </xsl:call-template>
1948 <xsl:if test="marc:subfield[@code='a']">
1949 <identifier type="isrc">
1950 <xsl:value-of select="marc:subfield[@code='a']"/>
1954 <xsl:for-each select="marc:datafield[@tag='024'][@ind1='2']">
1955 <xsl:call-template name="isInvalid">
1956 <xsl:with-param name="type">ismn</xsl:with-param>
1957 </xsl:call-template>
1958 <xsl:if test="marc:subfield[@code='a']">
1959 <identifier type="ismn">
1960 <xsl:value-of select="marc:subfield[@code='a']"/>
1964 <xsl:for-each select="marc:datafield[@tag='024'][@ind1='4']">
1965 <xsl:call-template name="isInvalid">
1966 <xsl:with-param name="type">sici</xsl:with-param>
1967 </xsl:call-template>
1968 <identifier type="sici">
1969 <xsl:call-template name="subfieldSelect">
1970 <xsl:with-param name="codes">ab</xsl:with-param>
1971 </xsl:call-template>
1974 <xsl:for-each select="marc:datafield[@tag='022']">
1975 <xsl:call-template name="isInvalid">
1976 <xsl:with-param name="type">issn</xsl:with-param>
1977 </xsl:call-template>
1978 <identifier type="issn">
1979 <xsl:value-of select="marc:subfield[@code='a']"/>
1982 <xsl:for-each select="marc:datafield[@tag='010']">
1983 <xsl:call-template name="isInvalid">
1984 <xsl:with-param name="type">lccn</xsl:with-param>
1985 </xsl:call-template>
1986 <identifier type="lccn">
1987 <xsl:value-of select="normalize-space(marc:subfield[@code='a'])"/>
1990 <xsl:for-each select="marc:datafield[@tag='028']">
1992 <xsl:attribute name="type">
1994 <xsl:when test="@ind1='0'">issue number</xsl:when>
1995 <xsl:when test="@ind1='1'">matrix number</xsl:when>
1996 <xsl:when test="@ind1='2'">music plate</xsl:when>
1997 <xsl:when test="@ind1='3'">music publisher</xsl:when>
1998 <xsl:when test="@ind1='4'">videorecording identifier</xsl:when>
2001 <!--<xsl:call-template name="isInvalid"/>--> <!-- no $z in 028 -->
2002 <xsl:call-template name="subfieldSelect">
2003 <xsl:with-param name="codes">
2005 <xsl:when test="@ind1='0'">ba</xsl:when>
2006 <xsl:otherwise>ab</xsl:otherwise>
2009 </xsl:call-template>
2012 <xsl:for-each select="marc:datafield[@tag='037']">
2013 <identifier type="stock number">
2014 <!--<xsl:call-template name="isInvalid"/>--> <!-- no $z in 037 -->
2015 <xsl:call-template name="subfieldSelect">
2016 <xsl:with-param name="codes">ab</xsl:with-param>
2017 </xsl:call-template>
2020 <xsl:for-each select="marc:datafield[@tag='856'][marc:subfield[@code='u']]">
2022 <xsl:attribute name="type">
2024 <xsl:when test="starts-with(marc:subfield[@code='u'],'urn:doi') or starts-with(marc:subfield[@code='u'],'doi')">doi</xsl:when>
2025 <xsl:when test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl') or starts-with(marc:subfield[@code='u'],'http://hdl.loc.gov')">hdl</xsl:when>
2026 <xsl:otherwise>uri</xsl:otherwise>
2030 <xsl:when test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl') or starts-with(marc:subfield[@code='u'],'http://hdl.loc.gov') ">
2031 <xsl:value-of select="concat('hdl:',substring-after(marc:subfield[@code='u'],'http://hdl.loc.gov/'))"></xsl:value-of>
2034 <xsl:value-of select="marc:subfield[@code='u']"></xsl:value-of>
2038 <xsl:if test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl')">
2039 <identifier type="hdl">
2040 <xsl:if test="marc:subfield[@code='y' or @code='3' or @code='z']">
2041 <xsl:attribute name="displayLabel">
2042 <xsl:call-template name="subfieldSelect">
2043 <xsl:with-param name="codes">y3z</xsl:with-param>
2044 </xsl:call-template>
2047 <xsl:value-of select="concat('hdl:',substring-after(marc:subfield[@code='u'],'http://hdl.loc.gov/'))"></xsl:value-of>
2051 <xsl:for-each select="marc:datafield[@tag=024][@ind1=1]">
2052 <identifier type="upc">
2053 <xsl:call-template name="isInvalid"/>
2054 <xsl:value-of select="marc:subfield[@code='a']"/>
2057 <!-- 1/04 fix added $y -->
2058 <xsl:for-each select="marc:datafield[@tag=856][marc:subfield[@code='u']]">
2061 <xsl:if test="marc:subfield[@code='y' or @code='3']">
2062 <xsl:attribute name="displayLabel">
2063 <xsl:call-template name="subfieldSelect">
2064 <xsl:with-param name="codes">y3</xsl:with-param>
2065 </xsl:call-template>
2068 <xsl:if test="marc:subfield[@code='z' ]">
2069 <xsl:attribute name="note">
2070 <xsl:call-template name="subfieldSelect">
2071 <xsl:with-param name="codes">z</xsl:with-param>
2072 </xsl:call-template>
2075 <xsl:value-of select="marc:subfield[@code='u']"></xsl:value-of>
2081 <!-- 3.2 change tmee 856z -->
2084 <xsl:for-each select="marc:datafield[@tag=852]">
2087 <xsl:call-template name="displayLabel"></xsl:call-template>
2088 <xsl:call-template name="subfieldSelect">
2089 <xsl:with-param name="codes">abje</xsl:with-param>
2090 </xsl:call-template>
2094 <xsl:for-each select="marc:datafield[@tag=506]">
2095 <accessCondition type="restrictionOnAccess">
2096 <xsl:call-template name="subfieldSelect">
2097 <xsl:with-param name="codes">abcd35</xsl:with-param>
2098 </xsl:call-template>
2101 <xsl:for-each select="marc:datafield[@tag=540]">
2102 <accessCondition type="useAndReproduction">
2103 <xsl:call-template name="subfieldSelect">
2104 <xsl:with-param name="codes">abcde35</xsl:with-param>
2105 </xsl:call-template>
2109 <xsl:for-each select="marc:datafield[@tag=040]">
2110 <recordContentSource authority="marcorg">
2111 <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
2112 </recordContentSource>
2114 <xsl:for-each select="marc:controlfield[@tag=008]">
2115 <recordCreationDate encoding="marc">
2116 <xsl:value-of select="substring(.,1,6)"></xsl:value-of>
2117 </recordCreationDate>
2119 <xsl:for-each select="marc:controlfield[@tag=005]">
2120 <recordChangeDate encoding="iso8601">
2121 <xsl:value-of select="."></xsl:value-of>
2124 <xsl:for-each select="marc:controlfield[@tag=001]">
2126 <xsl:if test="../marc:controlfield[@tag=003]">
2127 <xsl:attribute name="source">
2128 <xsl:value-of select="../marc:controlfield[@tag=003]"></xsl:value-of>
2131 <xsl:value-of select="."></xsl:value-of>
2134 <xsl:for-each select="marc:datafield[@tag=040]/marc:subfield[@code='b']">
2135 <languageOfCataloging>
2136 <languageTerm authority="iso639-2b" type="code">
2137 <xsl:value-of select="."></xsl:value-of>
2139 </languageOfCataloging>
2143 <xsl:template name="displayForm">
2144 <xsl:for-each select="marc:subfield[@code='c']">
2146 <xsl:value-of select="."></xsl:value-of>
2150 <xsl:template name="affiliation">
2151 <xsl:for-each select="marc:subfield[@code='u']">
2153 <xsl:value-of select="."></xsl:value-of>
2157 <xsl:template name="uri">
2158 <xsl:for-each select="marc:subfield[@code='u']">
2159 <xsl:attribute name="xlink:href">
2160 <xsl:value-of select="."></xsl:value-of>
2164 <xsl:template name="role">
2165 <xsl:for-each select="marc:subfield[@code='e']">
2167 <roleTerm type="text">
2168 <xsl:value-of select="."></xsl:value-of>
2172 <xsl:for-each select="marc:subfield[@code='4']">
2174 <roleTerm authority="marcrelator" type="code">
2175 <xsl:value-of select="."></xsl:value-of>
2180 <xsl:template name="part">
2181 <xsl:variable name="partNumber">
2182 <xsl:call-template name="specialSubfieldSelect">
2183 <xsl:with-param name="axis">n</xsl:with-param>
2184 <xsl:with-param name="anyCodes">n</xsl:with-param>
2185 <xsl:with-param name="afterCodes">fgkdlmor</xsl:with-param>
2186 </xsl:call-template>
2188 <xsl:variable name="partName">
2189 <xsl:call-template name="specialSubfieldSelect">
2190 <xsl:with-param name="axis">p</xsl:with-param>
2191 <xsl:with-param name="anyCodes">p</xsl:with-param>
2192 <xsl:with-param name="afterCodes">fgkdlmor</xsl:with-param>
2193 </xsl:call-template>
2195 <xsl:if test="string-length(normalize-space($partNumber))">
2197 <xsl:call-template name="chopPunctuation">
2198 <xsl:with-param name="chopString" select="$partNumber"></xsl:with-param>
2199 </xsl:call-template>
2202 <xsl:if test="string-length(normalize-space($partName))">
2204 <xsl:call-template name="chopPunctuation">
2205 <xsl:with-param name="chopString" select="$partName"></xsl:with-param>
2206 </xsl:call-template>
2210 <xsl:template name="relatedPart">
2211 <xsl:if test="@tag=773">
2212 <xsl:for-each select="marc:subfield[@code='g']">
2215 <xsl:value-of select="."></xsl:value-of>
2219 <xsl:for-each select="marc:subfield[@code='q']">
2221 <xsl:call-template name="parsePart"></xsl:call-template>
2226 <xsl:template name="relatedPartNumName">
2227 <xsl:variable name="partNumber">
2228 <xsl:call-template name="specialSubfieldSelect">
2229 <xsl:with-param name="axis">g</xsl:with-param>
2230 <xsl:with-param name="anyCodes">g</xsl:with-param>
2231 <xsl:with-param name="afterCodes">pst</xsl:with-param>
2232 </xsl:call-template>
2234 <xsl:variable name="partName">
2235 <xsl:call-template name="specialSubfieldSelect">
2236 <xsl:with-param name="axis">p</xsl:with-param>
2237 <xsl:with-param name="anyCodes">p</xsl:with-param>
2238 <xsl:with-param name="afterCodes">fgkdlmor</xsl:with-param>
2239 </xsl:call-template>
2241 <xsl:if test="string-length(normalize-space($partNumber))">
2243 <xsl:value-of select="$partNumber"></xsl:value-of>
2246 <xsl:if test="string-length(normalize-space($partName))">
2248 <xsl:value-of select="$partName"></xsl:value-of>
2252 <xsl:template name="relatedName">
2253 <xsl:for-each select="marc:subfield[@code='a']">
2256 <xsl:value-of select="."></xsl:value-of>
2261 <xsl:template name="relatedForm">
2262 <xsl:for-each select="marc:subfield[@code='h']">
2263 <physicalDescription>
2265 <xsl:value-of select="."></xsl:value-of>
2267 </physicalDescription>
2270 <xsl:template name="relatedExtent">
2271 <xsl:for-each select="marc:subfield[@code='h']">
2272 <physicalDescription>
2274 <xsl:value-of select="."></xsl:value-of>
2276 </physicalDescription>
2279 <xsl:template name="relatedNote">
2280 <xsl:for-each select="marc:subfield[@code='n']">
2282 <xsl:value-of select="."></xsl:value-of>
2286 <xsl:template name="relatedSubject">
2287 <xsl:for-each select="marc:subfield[@code='j']">
2289 <temporal encoding="iso8601">
2290 <xsl:call-template name="chopPunctuation">
2291 <xsl:with-param name="chopString" select="."></xsl:with-param>
2292 </xsl:call-template>
2297 <xsl:template name="relatedIdentifierISSN">
2298 <xsl:for-each select="marc:subfield[@code='x']">
2299 <identifier type="issn">
2300 <xsl:value-of select="."></xsl:value-of>
2304 <xsl:template name="relatedIdentifierLocal">
2305 <xsl:for-each select="marc:subfield[@code='w']">
2306 <identifier type="local">
2307 <xsl:value-of select="."></xsl:value-of>
2311 <xsl:template name="relatedIdentifier">
2312 <xsl:for-each select="marc:subfield[@code='o']">
2314 <xsl:value-of select="."></xsl:value-of>
2318 <xsl:template name="relatedItem76X-78X">
2319 <xsl:call-template name="displayLabel"></xsl:call-template>
2320 <xsl:call-template name="relatedTitle76X-78X"></xsl:call-template>
2321 <xsl:call-template name="relatedName"></xsl:call-template>
2322 <xsl:call-template name="relatedOriginInfo"></xsl:call-template>
2323 <xsl:call-template name="relatedLanguage"></xsl:call-template>
2324 <xsl:call-template name="relatedExtent"></xsl:call-template>
2325 <xsl:call-template name="relatedNote"></xsl:call-template>
2326 <xsl:call-template name="relatedSubject"></xsl:call-template>
2327 <xsl:call-template name="relatedIdentifier"></xsl:call-template>
2328 <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
2329 <xsl:call-template name="relatedIdentifierLocal"></xsl:call-template>
2330 <xsl:call-template name="relatedPart"></xsl:call-template>
2332 <xsl:template name="subjectGeographicZ">
2334 <xsl:call-template name="chopPunctuation">
2335 <xsl:with-param name="chopString" select="."></xsl:with-param>
2336 </xsl:call-template>
2339 <xsl:template name="subjectTemporalY">
2341 <xsl:call-template name="chopPunctuation">
2342 <xsl:with-param name="chopString" select="."></xsl:with-param>
2343 </xsl:call-template>
2346 <xsl:template name="subjectTopic">
2348 <xsl:call-template name="chopPunctuation">
2349 <xsl:with-param name="chopString" select="."></xsl:with-param>
2350 </xsl:call-template>
2353 <!-- 3.2 change tmee 6xx $v genre -->
2354 <xsl:template name="subjectGenre">
2356 <xsl:call-template name="chopPunctuation">
2357 <xsl:with-param name="chopString" select="."></xsl:with-param>
2358 </xsl:call-template>
2362 <xsl:template name="nameABCDN">
2363 <xsl:for-each select="marc:subfield[@code='a']">
2365 <xsl:call-template name="chopPunctuation">
2366 <xsl:with-param name="chopString" select="."></xsl:with-param>
2367 </xsl:call-template>
2370 <xsl:for-each select="marc:subfield[@code='b']">
2372 <xsl:value-of select="."></xsl:value-of>
2375 <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
2377 <xsl:call-template name="subfieldSelect">
2378 <xsl:with-param name="codes">cdn</xsl:with-param>
2379 </xsl:call-template>
2383 <xsl:template name="nameABCDQ">
2385 <xsl:call-template name="chopPunctuation">
2386 <xsl:with-param name="chopString">
2387 <xsl:call-template name="subfieldSelect">
2388 <xsl:with-param name="codes">aq</xsl:with-param>
2389 </xsl:call-template>
2391 <xsl:with-param name="punctuation">
2392 <xsl:text>:,;/ </xsl:text>
2394 </xsl:call-template>
2396 <xsl:call-template name="termsOfAddress"></xsl:call-template>
2397 <xsl:call-template name="nameDate"></xsl:call-template>
2399 <xsl:template name="nameACDEQ">
2401 <xsl:call-template name="subfieldSelect">
2402 <xsl:with-param name="codes">acdeq</xsl:with-param>
2403 </xsl:call-template>
2406 <xsl:template name="constituentOrRelatedType">
2407 <xsl:if test="@ind2=2">
2408 <xsl:attribute name="type">constituent</xsl:attribute>
2411 <xsl:template name="relatedTitle">
2412 <xsl:for-each select="marc:subfield[@code='t']">
2415 <xsl:call-template name="chopPunctuation">
2416 <xsl:with-param name="chopString">
2417 <xsl:value-of select="."></xsl:value-of>
2419 </xsl:call-template>
2424 <xsl:template name="relatedTitle76X-78X">
2425 <xsl:for-each select="marc:subfield[@code='t']">
2428 <xsl:call-template name="chopPunctuation">
2429 <xsl:with-param name="chopString">
2430 <xsl:value-of select="."></xsl:value-of>
2432 </xsl:call-template>
2434 <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
2435 <xsl:call-template name="relatedPartNumName"></xsl:call-template>
2439 <xsl:for-each select="marc:subfield[@code='p']">
2440 <titleInfo type="abbreviated">
2442 <xsl:call-template name="chopPunctuation">
2443 <xsl:with-param name="chopString">
2444 <xsl:value-of select="."></xsl:value-of>
2446 </xsl:call-template>
2448 <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
2449 <xsl:call-template name="relatedPartNumName"></xsl:call-template>
2453 <xsl:for-each select="marc:subfield[@code='s']">
2454 <titleInfo type="uniform">
2456 <xsl:call-template name="chopPunctuation">
2457 <xsl:with-param name="chopString">
2458 <xsl:value-of select="."></xsl:value-of>
2460 </xsl:call-template>
2462 <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
2463 <xsl:call-template name="relatedPartNumName"></xsl:call-template>
2468 <xsl:template name="relatedOriginInfo">
2469 <xsl:if test="marc:subfield[@code='b' or @code='d'] or marc:subfield[@code='f']">
2471 <xsl:if test="@tag=775">
2472 <xsl:for-each select="marc:subfield[@code='f']">
2475 <xsl:attribute name="type">code</xsl:attribute>
2476 <xsl:attribute name="authority">marcgac</xsl:attribute>
2477 <xsl:value-of select="."></xsl:value-of>
2482 <xsl:for-each select="marc:subfield[@code='d']">
2484 <xsl:value-of select="."></xsl:value-of>
2487 <xsl:for-each select="marc:subfield[@code='b']">
2489 <xsl:value-of select="."></xsl:value-of>
2495 <xsl:template name="relatedLanguage">
2496 <xsl:for-each select="marc:subfield[@code='e']">
2497 <xsl:call-template name="getLanguage">
2498 <xsl:with-param name="langString">
2499 <xsl:value-of select="."></xsl:value-of>
2501 </xsl:call-template>
2504 <xsl:template name="nameDate">
2505 <xsl:for-each select="marc:subfield[@code='d']">
2506 <namePart type="date">
2507 <xsl:call-template name="chopPunctuation">
2508 <xsl:with-param name="chopString" select="."></xsl:with-param>
2509 </xsl:call-template>
2513 <xsl:template name="subjectAuthority">
2514 <xsl:if test="@ind2!=4">
2515 <xsl:if test="@ind2!=' '">
2516 <xsl:if test="@ind2!=8">
2517 <xsl:if test="@ind2!=9">
2518 <xsl:attribute name="authority">
2520 <xsl:when test="@ind2=0">lcsh</xsl:when>
2521 <xsl:when test="@ind2=1">lcshac</xsl:when>
2522 <xsl:when test="@ind2=2">mesh</xsl:when>
2524 <xsl:when test="@ind2=3">nal</xsl:when>
2525 <xsl:when test="@ind2=5">csh</xsl:when>
2526 <xsl:when test="@ind2=6">rvm</xsl:when>
2527 <xsl:when test="@ind2=7">
2528 <xsl:value-of select="marc:subfield[@code='2']"></xsl:value-of>
2537 <xsl:template name="subjectAnyOrder">
2538 <xsl:for-each select="marc:subfield[@code='v' or @code='x' or @code='y' or @code='z']">
2540 <xsl:when test="@code='v'">
2541 <xsl:call-template name="subjectGenre"></xsl:call-template>
2543 <xsl:when test="@code='x'">
2544 <xsl:call-template name="subjectTopic"></xsl:call-template>
2546 <xsl:when test="@code='y'">
2547 <xsl:call-template name="subjectTemporalY"></xsl:call-template>
2549 <xsl:when test="@code='z'">
2550 <xsl:call-template name="subjectGeographicZ"></xsl:call-template>
2555 <xsl:template name="specialSubfieldSelect">
2556 <xsl:param name="anyCodes"></xsl:param>
2557 <xsl:param name="axis"></xsl:param>
2558 <xsl:param name="beforeCodes"></xsl:param>
2559 <xsl:param name="afterCodes"></xsl:param>
2560 <xsl:variable name="str">
2561 <xsl:for-each select="marc:subfield">
2562 <xsl:if test="contains($anyCodes, @code) or (contains($beforeCodes,@code) and following-sibling::marc:subfield[@code=$axis]) or (contains($afterCodes,@code) and preceding-sibling::marc:subfield[@code=$axis])">
2563 <xsl:value-of select="text()"></xsl:value-of>
2564 <xsl:text> </xsl:text>
2568 <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
2571 <!-- 3.2 change tmee 6xx $v genre -->
2572 <xsl:template match="marc:datafield[@tag=600]">
2574 <xsl:call-template name="subjectAuthority"></xsl:call-template>
2575 <name type="personal">
2576 <xsl:call-template name="termsOfAddress"></xsl:call-template>
2578 <xsl:call-template name="chopPunctuation">
2579 <xsl:with-param name="chopString">
2580 <xsl:call-template name="subfieldSelect">
2581 <xsl:with-param name="codes">aq</xsl:with-param>
2582 </xsl:call-template>
2584 </xsl:call-template>
2586 <xsl:call-template name="nameDate"></xsl:call-template>
2587 <xsl:call-template name="affiliation"></xsl:call-template>
2588 <xsl:call-template name="role"></xsl:call-template>
2590 <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
2593 <xsl:template match="marc:datafield[@tag=610]">
2595 <xsl:call-template name="subjectAuthority"></xsl:call-template>
2596 <name type="corporate">
2597 <xsl:for-each select="marc:subfield[@code='a']">
2599 <xsl:value-of select="."></xsl:value-of>
2602 <xsl:for-each select="marc:subfield[@code='b']">
2604 <xsl:value-of select="."></xsl:value-of>
2607 <xsl:if test="marc:subfield[@code='c' or @code='d' or @code='n' or @code='p']">
2609 <xsl:call-template name="subfieldSelect">
2610 <xsl:with-param name="codes">cdnp</xsl:with-param>
2611 </xsl:call-template>
2614 <xsl:call-template name="role"></xsl:call-template>
2616 <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
2619 <xsl:template match="marc:datafield[@tag=611]">
2621 <xsl:call-template name="subjectAuthority"></xsl:call-template>
2622 <name type="conference">
2624 <xsl:call-template name="subfieldSelect">
2625 <xsl:with-param name="codes">abcdeqnp</xsl:with-param>
2626 </xsl:call-template>
2628 <xsl:for-each select="marc:subfield[@code='4']">
2630 <roleTerm authority="marcrelator" type="code">
2631 <xsl:value-of select="."></xsl:value-of>
2636 <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
2639 <xsl:template match="marc:datafield[@tag=630]">
2641 <xsl:call-template name="subjectAuthority"></xsl:call-template>
2644 <xsl:call-template name="chopPunctuation">
2645 <xsl:with-param name="chopString">
2646 <xsl:call-template name="subfieldSelect">
2647 <xsl:with-param name="codes">adfhklor</xsl:with-param>
2648 </xsl:call-template>
2650 </xsl:call-template>
2651 <xsl:call-template name="part"></xsl:call-template>
2654 <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
2657 <xsl:template match="marc:datafield[@tag=650]">
2659 <xsl:call-template name="subjectAuthority"></xsl:call-template>
2661 <xsl:call-template name="chopPunctuation">
2662 <xsl:with-param name="chopString">
2663 <xsl:call-template name="subfieldSelect">
2664 <xsl:with-param name="codes">abcd</xsl:with-param>
2665 </xsl:call-template>
2667 </xsl:call-template>
2669 <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
2672 <xsl:template match="marc:datafield[@tag=651]">
2674 <xsl:call-template name="subjectAuthority"></xsl:call-template>
2675 <xsl:for-each select="marc:subfield[@code='a']">
2677 <xsl:call-template name="chopPunctuation">
2678 <xsl:with-param name="chopString" select="."></xsl:with-param>
2679 </xsl:call-template>
2682 <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
2685 <xsl:template match="marc:datafield[@tag=653]">
2687 <xsl:for-each select="marc:subfield[@code='a']">
2689 <xsl:value-of select="."></xsl:value-of>
2694 <xsl:template match="marc:datafield[@tag=656]">
2696 <xsl:if test="marc:subfield[@code=2]">
2697 <xsl:attribute name="authority">
2698 <xsl:value-of select="marc:subfield[@code=2]"></xsl:value-of>
2702 <xsl:call-template name="chopPunctuation">
2703 <xsl:with-param name="chopString">
2704 <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
2706 </xsl:call-template>
2710 <xsl:template name="termsOfAddress">
2711 <xsl:if test="marc:subfield[@code='b' or @code='c']">
2712 <namePart type="termsOfAddress">
2713 <xsl:call-template name="chopPunctuation">
2714 <xsl:with-param name="chopString">
2715 <xsl:call-template name="subfieldSelect">
2716 <xsl:with-param name="codes">bc</xsl:with-param>
2717 </xsl:call-template>
2719 </xsl:call-template>
2723 <xsl:template name="displayLabel">
2724 <xsl:if test="marc:subfield[@code='i']">
2725 <xsl:attribute name="displayLabel">
2726 <xsl:value-of select="marc:subfield[@code='i']"></xsl:value-of>
2729 <xsl:if test="marc:subfield[@code='3']">
2730 <xsl:attribute name="displayLabel">
2731 <xsl:value-of select="marc:subfield[@code='3']"></xsl:value-of>
2735 <xsl:template name="isInvalid">
2736 <xsl:param name="type"/>
2737 <xsl:if test="marc:subfield[@code='z'] or marc:subfield[@code='y']">
2739 <xsl:attribute name="type">
2740 <xsl:value-of select="$type"/>
2742 <xsl:attribute name="invalid">
2743 <xsl:text>yes</xsl:text>
2745 <xsl:if test="marc:subfield[@code='z']">
2746 <xsl:value-of select="marc:subfield[@code='z']"/>
2748 <xsl:if test="marc:subfield[@code='y']">
2749 <xsl:value-of select="marc:subfield[@code='y']"/>
2754 <xsl:template name="subtitle">
2755 <xsl:if test="marc:subfield[@code='b']">
2757 <xsl:call-template name="chopPunctuation">
2758 <xsl:with-param name="chopString">
2759 <xsl:value-of select="marc:subfield[@code='b']"/>
2760 <!--<xsl:call-template name="subfieldSelect">
2761 <xsl:with-param name="codes">b</xsl:with-param>
2762 </xsl:call-template>-->
2764 </xsl:call-template>
2768 <xsl:template name="script">
2769 <xsl:param name="scriptCode"></xsl:param>
2770 <xsl:attribute name="script">
2772 <xsl:when test="$scriptCode='(3'">Arabic</xsl:when>
2773 <xsl:when test="$scriptCode='(B'">Latin</xsl:when>
2774 <xsl:when test="$scriptCode='$1'">Chinese, Japanese, Korean</xsl:when>
2775 <xsl:when test="$scriptCode='(N'">Cyrillic</xsl:when>
2776 <xsl:when test="$scriptCode='(2'">Hebrew</xsl:when>
2777 <xsl:when test="$scriptCode='(S'">Greek</xsl:when>
2781 <xsl:template name="parsePart">
2782 <!-- assumes 773$q= 1:2:3<4
2783 with up to 3 levels and one optional start page
2785 <xsl:variable name="level1">
2787 <xsl:when test="contains(text(),':')">
2789 <xsl:value-of select="substring-before(text(),':')"></xsl:value-of>
2791 <xsl:when test="not(contains(text(),':'))">
2793 <xsl:if test="contains(text(),'<')">
2795 <xsl:value-of select="substring-before(text(),'<')"></xsl:value-of>
2797 <xsl:if test="not(contains(text(),'<'))">
2799 <xsl:value-of select="text()"></xsl:value-of>
2804 <xsl:variable name="sici2">
2806 <xsl:when test="starts-with(substring-after(text(),$level1),':')">
2807 <xsl:value-of select="substring(substring-after(text(),$level1),2)"></xsl:value-of>
2810 <xsl:value-of select="substring-after(text(),$level1)"></xsl:value-of>
2814 <xsl:variable name="level2">
2816 <xsl:when test="contains($sici2,':')">
2818 <xsl:value-of select="substring-before($sici2,':')"></xsl:value-of>
2820 <xsl:when test="contains($sici2,'<')">
2822 <xsl:value-of select="substring-before($sici2,'<')"></xsl:value-of>
2825 <xsl:value-of select="$sici2"></xsl:value-of>
2830 <xsl:variable name="sici3">
2832 <xsl:when test="starts-with(substring-after($sici2,$level2),':')">
2833 <xsl:value-of select="substring(substring-after($sici2,$level2),2)"></xsl:value-of>
2836 <xsl:value-of select="substring-after($sici2,$level2)"></xsl:value-of>
2840 <xsl:variable name="level3">
2842 <xsl:when test="contains($sici3,'<')">
2844 <xsl:value-of select="substring-before($sici3,'<')"></xsl:value-of>
2847 <xsl:value-of select="$sici3"></xsl:value-of>
2852 <xsl:variable name="page">
2853 <xsl:if test="contains(text(),'<')">
2854 <xsl:value-of select="substring-after(text(),'<')"></xsl:value-of>
2857 <xsl:if test="$level1">
2860 <xsl:value-of select="$level1"></xsl:value-of>
2864 <xsl:if test="$level2">
2867 <xsl:value-of select="$level2"></xsl:value-of>
2871 <xsl:if test="$level3">
2874 <xsl:value-of select="$level3"></xsl:value-of>
2878 <xsl:if test="$page">
2879 <extent unit="page">
2881 <xsl:value-of select="$page"></xsl:value-of>
2886 <xsl:template name="getLanguage">
2887 <xsl:param name="langString"></xsl:param>
2888 <xsl:param name="controlField008-35-37"></xsl:param>
2889 <xsl:variable name="length" select="string-length($langString)"></xsl:variable>
2891 <xsl:when test="$length=0"></xsl:when>
2892 <xsl:when test="$controlField008-35-37=substring($langString,1,3)">
2893 <xsl:call-template name="getLanguage">
2894 <xsl:with-param name="langString" select="substring($langString,4,$length)"></xsl:with-param>
2895 <xsl:with-param name="controlField008-35-37" select="$controlField008-35-37"></xsl:with-param>
2896 </xsl:call-template>
2900 <languageTerm authority="iso639-2b" type="code">
2901 <xsl:value-of select="substring($langString,1,3)"></xsl:value-of>
2904 <xsl:call-template name="getLanguage">
2905 <xsl:with-param name="langString" select="substring($langString,4,$length)"></xsl:with-param>
2906 <xsl:with-param name="controlField008-35-37" select="$controlField008-35-37"></xsl:with-param>
2907 </xsl:call-template>
2911 <xsl:template name="isoLanguage">
2912 <xsl:param name="currentLanguage"></xsl:param>
2913 <xsl:param name="usedLanguages"></xsl:param>
2914 <xsl:param name="remainingLanguages"></xsl:param>
2916 <xsl:when test="string-length($currentLanguage)=0"></xsl:when>
2917 <xsl:when test="not(contains($usedLanguages, $currentLanguage))">
2919 <xsl:if test="@code!='a'">
2920 <xsl:attribute name="objectPart">
2922 <xsl:when test="@code='b'">summary or subtitle</xsl:when>
2923 <xsl:when test="@code='d'">sung or spoken text</xsl:when>
2924 <xsl:when test="@code='e'">libretto</xsl:when>
2925 <xsl:when test="@code='f'">table of contents</xsl:when>
2926 <xsl:when test="@code='g'">accompanying material</xsl:when>
2927 <xsl:when test="@code='h'">translation</xsl:when>
2931 <languageTerm authority="iso639-2b" type="code">
2932 <xsl:value-of select="$currentLanguage"></xsl:value-of>
2935 <xsl:call-template name="isoLanguage">
2936 <xsl:with-param name="currentLanguage">
2937 <xsl:value-of select="substring($remainingLanguages,1,3)"></xsl:value-of>
2939 <xsl:with-param name="usedLanguages">
2940 <xsl:value-of select="concat($usedLanguages,$currentLanguage)"></xsl:value-of>
2942 <xsl:with-param name="remainingLanguages">
2943 <xsl:value-of select="substring($remainingLanguages,4,string-length($remainingLanguages))"></xsl:value-of>
2945 </xsl:call-template>
2948 <xsl:call-template name="isoLanguage">
2949 <xsl:with-param name="currentLanguage">
2950 <xsl:value-of select="substring($remainingLanguages,1,3)"></xsl:value-of>
2952 <xsl:with-param name="usedLanguages">
2953 <xsl:value-of select="concat($usedLanguages,$currentLanguage)"></xsl:value-of>
2955 <xsl:with-param name="remainingLanguages">
2956 <xsl:value-of select="substring($remainingLanguages,4,string-length($remainingLanguages))"></xsl:value-of>
2958 </xsl:call-template>
2962 <xsl:template name="chopBrackets">
2963 <xsl:param name="chopString"></xsl:param>
2964 <xsl:variable name="string">
2965 <xsl:call-template name="chopPunctuation">
2966 <xsl:with-param name="chopString" select="$chopString"></xsl:with-param>
2967 </xsl:call-template>
2969 <xsl:if test="substring($string, 1,1)='['">
2970 <xsl:value-of select="substring($string,2, string-length($string)-2)"></xsl:value-of>
2972 <xsl:if test="substring($string, 1,1)!='['">
2973 <xsl:value-of select="$string"></xsl:value-of>
2976 <xsl:template name="rfcLanguages">
2977 <xsl:param name="nodeNum"></xsl:param>
2978 <xsl:param name="usedLanguages"></xsl:param>
2979 <xsl:param name="controlField008-35-37"></xsl:param>
2980 <xsl:variable name="currentLanguage" select="."></xsl:variable>
2982 <xsl:when test="not($currentLanguage)"></xsl:when>
2983 <xsl:when test="$currentLanguage!=$controlField008-35-37 and $currentLanguage!='rfc3066'">
2984 <xsl:if test="not(contains($usedLanguages,$currentLanguage))">
2986 <xsl:if test="@code!='a'">
2987 <xsl:attribute name="objectPart">
2989 <xsl:when test="@code='b'">summary or subtitle</xsl:when>
2990 <xsl:when test="@code='d'">sung or spoken text</xsl:when>
2991 <xsl:when test="@code='e'">libretto</xsl:when>
2992 <xsl:when test="@code='f'">table of contents</xsl:when>
2993 <xsl:when test="@code='g'">accompanying material</xsl:when>
2994 <xsl:when test="@code='h'">translation</xsl:when>
2998 <languageTerm authority="rfc3066" type="code">
2999 <xsl:value-of select="$currentLanguage"/>