1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0" xmlns:xlink="http://www.w3.org/TR/xlink" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns="http://www.loc.gov/mods/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
3 <xsl:include href="MARC21slimUtils.xsl"/>
4 <xsl:output method="xml" indent="yes"/>
6 <xsl:template match="/">
7 <collection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/mods/ http://www.loc.gov/standards/marcxml/schema/mods.xsd">
12 <xsl:template match="marc:record">
14 <xsl:variable name="leader" select="marc:leader"/>
15 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
16 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
17 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
19 <xsl:variable name="typeOf008">
21 <xsl:when test="$leader6='a'">
23 <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
24 <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">SE</xsl:when>
27 <xsl:when test="$leader6='t'">BK</xsl:when>
28 <xsl:when test="$leader6='p'">MM</xsl:when>
29 <xsl:when test="$leader6='m'">CF</xsl:when>
30 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
31 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='o' or $leader6='r'">VM</xsl:when>
32 <xsl:when test="$leader6='c' or $leader6='d' or $leader6='i' or $leader6='j'">MU</xsl:when>
36 <xsl:for-each select="marc:datafield[@tag=245]">
38 <xsl:variable name="title">
39 <xsl:call-template name="chopPunctuation">
40 <xsl:with-param name="chopString">
41 <xsl:call-template name="subfieldSelect">
42 <xsl:with-param name="codes">abfghk</xsl:with-param>
48 <xsl:when test="@ind2>0">
50 <xsl:value-of select="substring($title,1,@ind2)"/>
53 <xsl:value-of select="substring($title,@ind2+1)"/>
58 <xsl:value-of select="$title"/>
62 <xsl:call-template name="part"/>
66 <xsl:for-each select="marc:datafield[@tag=210]">
67 <titleInfo type="abbreviated">
69 <xsl:call-template name="subfieldSelect">
70 <xsl:with-param name="codes">ab</xsl:with-param>
76 <xsl:for-each select="marc:datafield[@tag=242]">
77 <titleInfo type="translated">
79 <xsl:call-template name="subfieldSelect">
80 <xsl:with-param name="codes">abh</xsl:with-param>
83 <xsl:call-template name="part"/>
87 <xsl:for-each select="marc:datafield[@tag=246]">
88 <titleInfo type="alternative">
89 <xsl:for-each select="marc:subfield[@code='i']">
90 <xsl:attribute name="displayLabel">
91 <xsl:value-of select="text()"/>
95 <xsl:call-template name="subfieldSelect">
96 <xsl:with-param name="codes">abfh</xsl:with-param>
99 <xsl:call-template name="part"/>
103 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
104 <titleInfo type="uniform">
106 <xsl:variable name="str">
107 <xsl:for-each select="marc:subfield">
108 <xsl:if test="(contains('adfhklmor',@code) and (not(../marc:subfield[@code='n' or @code='p']) or (following-sibling::marc:subfield[@code='n' or @code='p'])))">
109 <xsl:value-of select="text()"/><xsl:text> </xsl:text>
113 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
115 <xsl:call-template name="part"/>
119 <xsl:for-each select="marc:datafield[@tag=740][@ind2!=2]">
120 <titleInfo type="alternative">
122 <xsl:call-template name="subfieldSelect">
123 <xsl:with-param name="codes">ah</xsl:with-param>
126 <xsl:call-template name="part"/>
130 <xsl:for-each select="marc:datafield[@tag=100]">
131 <name type="personal">
132 <xsl:call-template name="nameABCDQ"/>
133 <xsl:call-template name="affiliation"/>
135 <xsl:call-template name="role"/>
140 <xsl:for-each select="marc:datafield[@tag=110]">
141 <name type="corporate">
142 <xsl:call-template name="nameABCDN"/>
144 <xsl:call-template name="role"/>
148 <xsl:for-each select="marc:datafield[@tag=111]">
149 <name type="conference">
150 <xsl:call-template name="nameACDEQ"/>
152 <xsl:for-each select="marc:subfield[@code='4']">
153 <role><xsl:value-of select="."/></role>
158 <xsl:for-each select="marc:datafield[@tag=700][not(marc:subfield[@code='t'])]">
159 <name type="personal">
160 <xsl:call-template name="nameABCDQ"/>
161 <xsl:call-template name="affiliation"/>
162 <xsl:call-template name="role"/>
166 <xsl:for-each select="marc:datafield[@tag=710][not(marc:subfield[@code='t'])]">
167 <name type="corporate">
168 <xsl:call-template name="nameABCDN"/>
169 <xsl:call-template name="role"/>
173 <xsl:for-each select="marc:datafield[@tag=711][not(marc:subfield[@code='t'])]">
174 <name type="conference">
175 <xsl:call-template name="nameACDEQ"/>
176 <xsl:for-each select="marc:subfield[@code='4']">
177 <role><xsl:value-of select="."/></role>
182 <xsl:for-each select="marc:datafield[@tag=720][not(marc:subfield[@code='t'])]">
184 <xsl:if test="@ind1=1">
185 <xsl:attribute name="type">personal</xsl:attribute>
188 <xsl:value-of select="marc:subfield[@code='a']"/>
190 <xsl:call-template name="role"/>
195 <xsl:if test="$leader7='c'">
196 <xsl:attribute name="collection">yes</xsl:attribute>
198 <xsl:if test="$leader6='d' or $leader6='f' or $leader6='p' or $leader6='t'">
199 <xsl:attribute name="manuscript">yes</xsl:attribute>
203 <xsl:when test="$leader6='a' or $leader6='t'">text</xsl:when>
204 <xsl:when test="$leader6='e' or $leader6='f'">cartographic</xsl:when>
205 <xsl:when test="$leader6='c' or $leader6='d'">notated music</xsl:when>
206 <xsl:when test="$leader6='i' or $leader6='j'">sound recording</xsl:when>
207 <xsl:when test="$leader6='k'">still image</xsl:when>
208 <xsl:when test="$leader6='g'">moving image</xsl:when>
209 <xsl:when test="$leader6='r'">three dimensional object</xsl:when>
210 <xsl:when test="$leader6='m'">software, multimedia</xsl:when>
211 <xsl:when test="$leader6='p'">mixed material</xsl:when>
215 <xsl:if test="substring($controlField008,26,1)='d'">
216 <genre authority="marc">globe</genre>
219 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='r']">
220 <genre authority="marc">remote sensing image</genre>
223 <xsl:if test="$typeOf008='MP'">
224 <xsl:variable name="controlField008-25" select="substring($controlField008,26,1)"/>
226 <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']">
227 <genre authority="marc">map</genre>
229 <xsl:when test="$controlField008-25='e' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
230 <genre authority="marc">atlas</genre>
235 <xsl:if test="$typeOf008='SE'">
236 <xsl:variable name="controlField008-21" select="substring($controlField008,22,1)"/>
238 <xsl:when test="$controlField008-21='d'">
239 <genre authority="marc">database</genre>
241 <xsl:when test="$controlField008-21='l'">
242 <genre authority="marc">loose-leaf</genre>
244 <xsl:when test="$controlField008-21='m'">
245 <genre authority="marc">series</genre>
247 <xsl:when test="$controlField008-21='n'">
248 <genre authority="marc">newspaper</genre>
250 <xsl:when test="$controlField008-21='p'">
251 <genre authority="marc">periodical</genre>
253 <xsl:when test="$controlField008-21='w'">
254 <genre authority="marc">web site</genre>
259 <xsl:if test="$typeOf008='BK' or $typeOf008='SE'">
260 <xsl:variable name="controlField008-24" select="substring($controlField008,25,4)"/>
262 <xsl:when test="contains($controlField008-24,'a')">
263 <genre authority="marc">abstract or summary</genre>
265 <xsl:when test="contains($controlField008-24,'b')">
266 <genre authority="marc">bibliography</genre>
268 <xsl:when test="contains($controlField008-24,'c')">
269 <genre authority="marc">catalog</genre>
271 <xsl:when test="contains($controlField008-24,'d')">
272 <genre authority="marc">dictionary</genre>
274 <xsl:when test="contains($controlField008-24,'e')">
275 <genre authority="marc">encyclopedia</genre>
277 <xsl:when test="contains($controlField008-24,'f')">
278 <genre authority="marc">handbook</genre>
280 <xsl:when test="contains($controlField008-24,'g')">
281 <genre authority="marc">legal article</genre>
283 <xsl:when test="contains($controlField008-24,'i')">
284 <genre authority="marc">index</genre>
286 <xsl:when test="contains($controlField008-24,'k')">
287 <genre authority="marc">discography</genre>
289 <xsl:when test="contains($controlField008-24,'l')">
290 <genre authority="marc">legislation</genre>
292 <xsl:when test="contains($controlField008-24,'m')">
293 <genre authority="marc">theses</genre>
295 <xsl:when test="contains($controlField008-24,'n')">
296 <genre authority="marc">survey of literature</genre>
298 <xsl:when test="contains($controlField008-24,'o')">
299 <genre authority="marc">review</genre>
301 <xsl:when test="contains($controlField008-24,'p')">
302 <genre authority="marc">programmed text</genre>
304 <xsl:when test="contains($controlField008-24,'q')">
305 <genre authority="marc">filmography</genre>
307 <xsl:when test="contains($controlField008-24,'r')">
308 <genre authority="marc">directory</genre>
310 <xsl:when test="contains($controlField008-24,'s')">
311 <genre authority="marc">statistics</genre>
313 <xsl:when test="contains($controlField008-24,'t')">
314 <genre authority="marc">technical report</genre>
316 <xsl:when test="contains($controlField008-24,'v')">
317 <genre authority="marc">legal case and case notes</genre>
319 <xsl:when test="contains($controlField008-24,'w')">
320 <genre authority="marc">law report or digest</genre>
322 <xsl:when test="contains($controlField008-24,'z')">
323 <genre authority="marc">treaty</genre>
326 <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"/>
328 <xsl:when test="$controlField008-29='1'">
329 <genre authority="marc">conference publication</genre>
334 <xsl:if test="$typeOf008='CF'">
335 <xsl:variable name="controlField008-26" select="substring($controlField008,27,1)"/>
337 <xsl:when test="$controlField008-26='a'">
338 <genre authority="marc">numeric data</genre>
340 <xsl:when test="$controlField008-26='e'">
341 <genre authority="marc">database</genre>
343 <xsl:when test="$controlField008-26='f'">
344 <genre authority="marc">font</genre>
346 <xsl:when test="$controlField008-26='g'">
347 <genre authority="marc">game</genre>
352 <xsl:if test="$typeOf008='BK'">
353 <xsl:if test="substring($controlField008,25,1)='j'">
354 <genre authority="marc">patent</genre>
356 <xsl:if test="substring($controlField008,31,1)='1'">
357 <genre authority="marc">festschrift</genre>
360 <xsl:variable name="controlField008-34" select="substring($controlField008,35,1)"/>
361 <xsl:if test="$controlField008-34='a' or $controlField008-34='b' or $controlField008-34='c' or $controlField008-34='d'">
362 <genre authority="marc">biography</genre>
365 <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"/>
367 <xsl:when test="$controlField008-33='e'">
368 <genre authority="marc">essay</genre>
370 <xsl:when test="$controlField008-33='d'">
371 <genre authority="marc">drama</genre>
373 <xsl:when test="$controlField008-33='c'">
374 <genre authority="marc">comic strip</genre>
376 <xsl:when test="$controlField008-33='l'">
377 <genre authority="marc">fiction</genre>
379 <xsl:when test="$controlField008-33='h'">
380 <genre authority="marc">humor, satire</genre>
382 <xsl:when test="$controlField008-33='i'">
383 <genre authority="marc">letter</genre>
385 <xsl:when test="$controlField008-33='f'">
386 <genre authority="marc">novel</genre>
388 <xsl:when test="$controlField008-33='j'">
389 <genre authority="marc">short story</genre>
391 <xsl:when test="$controlField008-33='s'">
392 <genre authority="marc">speech</genre>
397 <xsl:if test="$typeOf008='MU'">
398 <xsl:variable name="controlField008-30-31" select="substring($controlField008,31,2)"/>
399 <xsl:if test="contains($controlField008-30-31,'b')">
400 <genre authority="marc">biography</genre>
402 <xsl:if test="contains($controlField008-30-31,'c')">
403 <genre authority="marc">conference publication</genre>
405 <xsl:if test="contains($controlField008-30-31,'d')">
406 <genre authority="marc">drama</genre>
408 <xsl:if test="contains($controlField008-30-31,'e')">
409 <genre authority="marc">essay</genre>
411 <xsl:if test="contains($controlField008-30-31,'f')">
412 <genre authority="marc">fiction</genre>
414 <xsl:if test="contains($controlField008-30-31,'o')">
415 <genre authority="marc">folktale</genre>
417 <xsl:if test="contains($controlField008-30-31,'h')">
418 <genre authority="marc">history</genre>
420 <xsl:if test="contains($controlField008-30-31,'k')">
421 <genre authority="marc">humor, satire</genre>
423 <xsl:if test="contains($controlField008-30-31,'m')">
424 <genre authority="marc">memoir</genre>
426 <xsl:if test="contains($controlField008-30-31,'p')">
427 <genre authority="marc">poetry</genre>
429 <xsl:if test="contains($controlField008-30-31,'r')">
430 <genre authority="marc">rehersal</genre>
432 <xsl:if test="contains($controlField008-30-31,'g')">
433 <genre authority="marc">reporting</genre>
435 <xsl:if test="contains($controlField008-30-31,'s')">
436 <genre authority="marc">sound</genre>
438 <xsl:if test="contains($controlField008-30-31,'l')">
439 <genre authority="marc">speech</genre>
443 <xsl:if test="$typeOf008='VM'">
444 <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"/>
446 <xsl:when test="$controlField008-33='a'">
447 <genre authority="marc">art original</genre>
449 <xsl:when test="$controlField008-33='b'">
450 <genre authority="marc">kit</genre>
452 <xsl:when test="$controlField008-33='c'">
453 <genre authority="marc">art reproduction</genre>
455 <xsl:when test="$controlField008-33='d'">
456 <genre authority="marc">diorama</genre>
458 <xsl:when test="$controlField008-33='f'">
459 <genre authority="marc">filmstrip</genre>
461 <xsl:when test="$controlField008-33='g'">
462 <genre authority="marc">legal article</genre>
464 <xsl:when test="$controlField008-33='i'">
465 <genre authority="marc">picture</genre>
467 <xsl:when test="$controlField008-33='k'">
468 <genre authority="marc">graphic</genre>
470 <xsl:when test="$controlField008-33='l'">
471 <genre authority="marc">technical drawing</genre>
473 <xsl:when test="$controlField008-33='m'">
474 <genre authority="marc">motion picture</genre>
476 <xsl:when test="$controlField008-33='n'">
477 <genre authority="marc">chart</genre>
479 <xsl:when test="$controlField008-33='o'">
480 <genre authority="marc">flash card</genre>
482 <xsl:when test="$controlField008-33='p'">
483 <genre authority="marc">microscope slide</genre>
485 <xsl:when test="$controlField008-33='q' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
486 <genre authority="marc">model</genre>
488 <xsl:when test="$controlField008-33='r'">
489 <genre authority="marc">realia</genre>
491 <xsl:when test="$controlField008-33='s'">
492 <genre authority="marc">slide</genre>
494 <xsl:when test="$controlField008-33='t'">
495 <genre authority="marc">transparency</genre>
497 <xsl:when test="$controlField008-33='v'">
498 <genre authority="marc">videorecording</genre>
500 <xsl:when test="$controlField008-33='w'">
501 <genre authority="marc">toy</genre>
506 <xsl:for-each select="marc:datafield[@tag=655]">
507 <genre authority="marc">
508 <xsl:attribute name="authority">
509 <xsl:value-of select="marc:subfield[@code='2']"/>
511 <xsl:call-template name="subfieldSelect">
512 <xsl:with-param name="codes">abvxyz</xsl:with-param>
513 <xsl:with-param name="delimeter">-</xsl:with-param>
519 <xsl:variable name="MARCpublicationCode" select="normalize-space(substring($controlField008,16,3))"/>
521 <xsl:if test="translate($MARCpublicationCode,'|','')">
522 <placeCode authority="marc">
523 <xsl:value-of select="$MARCpublicationCode"/>
527 <xsl:for-each select="marc:datafield[@tag=044]/marc:subfield[@code='c']">
528 <placeCode authority="iso3166">
529 <xsl:value-of select="."/>
533 <xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='a' or @code='b' or @code='c' or @code='g']">
535 <xsl:when test="@code='a'">
537 <xsl:call-template name="chopPunctuation">
538 <xsl:with-param name="chopString" select="."/>
542 <xsl:when test="@code='b'">
544 <xsl:call-template name="chopPunctuation">
545 <xsl:with-param name="chopString" select="."/>
549 <xsl:when test="@code='c'">
551 <xsl:call-template name="chopPunctuation">
552 <xsl:with-param name="chopString" select="."/>
556 <xsl:when test="@code='g'">
558 <xsl:value-of select="."/>
564 <xsl:variable name="dataField260c">
565 <xsl:call-template name="chopPunctuation">
566 <xsl:with-param name="chopString" select="marc:datafield[@tag=260]/marc:subfield[@code='c']"/>
570 <xsl:variable name="controlField008-7-10" select="normalize-space(substring($controlField008, 8, 4))"/>
571 <xsl:variable name="controlField008-11-14" select="normalize-space(substring($controlField008, 12, 4))"/>
572 <xsl:variable name="controlField008-6" select="normalize-space(substring($controlField008, 7, 1))"/>
574 <xsl:if test="$controlField008-6='e' or $controlField008-6='p' or $controlField008-6='r' or $controlField008-6='t' or $controlField008-6='s'">
575 <xsl:if test="$controlField008-7-10 and ($controlField008-7-10 != $dataField260c)">
576 <dateIssued encoding="marc">
577 <xsl:value-of select="$controlField008-7-10"/>
582 <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'">
583 <xsl:if test="$controlField008-7-10">
584 <dateIssued encoding="marc" point="start">
585 <xsl:value-of select="$controlField008-7-10"/>
590 <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'">
591 <xsl:if test="$controlField008-11-14">
592 <dateIssued encoding="marc" point="end">
593 <xsl:value-of select="$controlField008-11-14"/>
598 <xsl:for-each select="marc:datafield[@tag=033][@ind1=0 or @ind1=1]/marc:subfield[@code='a']">
599 <dateCaptured encoding="iso8601">
600 <xsl:value-of select="."/>
604 <xsl:for-each select="marc:datafield[@tag=033][@ind1=2]/marc:subfield[@code='a'][1]">
605 <dateCaptured encoding="iso8601" point="start">
606 <xsl:value-of select="."/>
610 <xsl:for-each select="marc:datafield[@tag=033][@ind1=2]/marc:subfield[@code='a'][2]">
611 <dateCaptured encoding="iso8601" point="end">
612 <xsl:value-of select="."/>
616 <xsl:for-each select="marc:datafield[@tag=250]/marc:subfield[@code='a']">
618 <xsl:value-of select="."/>
622 <xsl:for-each select="marc:leader">
625 <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">monographic</xsl:when>
626 <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">continuing</xsl:when>
631 <xsl:for-each select="marc:datafield[@tag=310]|marc:datafield[@tag=321]">
633 <xsl:call-template name="subfieldSelect">
634 <xsl:with-param name="codes">ab</xsl:with-param>
641 <xsl:for-each select="marc:controlfield[@tag=041]">
642 <xsl:for-each select="marc:subfield[@code='a' or @code='d' or @code='e']">
645 <xsl:when test="../marc:subfield[@code='2']">
646 <xsl:attribute name="authority">rfc3066</xsl:attribute>
649 <xsl:attribute name="authority">iso639-2b</xsl:attribute>
652 <xsl:value-of select="text()"/>
657 <xsl:variable name="controlField008-35-37" select="normalize-space(translate(substring($controlField008,36,3),'|#',''))"/>
658 <xsl:if test="$controlField008-35-37">
659 <language authority="iso639-2b">
660 <xsl:value-of select="substring($controlField008,36,3)"/>
664 <xsl:variable name="physicalDescription">
665 <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='a' or substring(.,12,1)='b']">
666 <digitalOrigin>reformatted digital</digitalOrigin>
669 <xsl:variable name="controlField008-23" select="substring($controlField008,24,1)"/>
670 <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"/>
672 <xsl:variable name="check008-23">
673 <xsl:if test="$typeOf008='BK' or $typeOf008='MU' or $typeOf008='SE' or $typeOf008='MM'">
674 <xsl:value-of select="true()"/>
678 <xsl:variable name="check008-29">
679 <xsl:if test="$typeOf008='MP' or $typeOf008='VM'">
680 <xsl:value-of select="true()"/>
685 <xsl:when test="($check008-23 and $controlField008-23='f') or ($check008-29 and $controlField008-29='f')">
686 <form><controlled>braille</controlled></form>
688 <xsl:when test="$leader6 = 'm' or ($check008-23 and $controlField008-23='s') or ($check008-29 and $controlField008-29='s')">
689 <form><controlled>electronic</controlled></form>
691 <xsl:when test="($check008-23 and $controlField008-23='b') or ($check008-29 and $controlField008-29='b')">
692 <form><controlled>microfiche</controlled></form>
694 <xsl:when test="($check008-23 and $controlField008-23='a') or ($check008-29 and $controlField008-29='a')">
695 <form><controlled>microfilm</controlled></form>
699 <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q'][string-length(.)>1]">
701 <xsl:value-of select="."/>
705 <xsl:for-each select="marc:datafield[@tag=256]/marc:subfield[@code='a']">
708 <xsl:value-of select="."/>
713 <xsl:for-each select="marc:datafield[@tag=300]">
715 <xsl:call-template name="subfieldSelect">
716 <xsl:with-param name="codes">abce</xsl:with-param>
722 <xsl:if test="string-length(normalize-space($physicalDescription))">
723 <physicalDescription>
724 <xsl:copy-of select="$physicalDescription"/>
725 </physicalDescription>
728 <xsl:for-each select="marc:datafield[@tag=520]">
730 <xsl:call-template name="uri"/>
731 <xsl:call-template name="subfieldSelect">
732 <xsl:with-param name="codes">ab</xsl:with-param>
737 <xsl:for-each select="marc:datafield[@tag=505]">
739 <xsl:call-template name="uri"/>
740 <xsl:call-template name="subfieldSelect">
741 <xsl:with-param name="codes">agrt</xsl:with-param>
746 <xsl:for-each select="marc:datafield[@tag=521]">
748 <xsl:call-template name="subfieldSelect">
749 <xsl:with-param name="codes">ab</xsl:with-param>
754 <xsl:if test="$typeOf008='BK' or $typeOf008='CF' or $typeOf008='MU' or $typeOf008='VM'">
755 <xsl:variable name="controlField008-22" select="substring($controlField008,23,1)"/>
757 <xsl:when test="$controlField008-22='d'">
758 <targetAudience>adolescent</targetAudience>
760 <xsl:when test="$controlField008-22='e'">
761 <targetAudience>adult</targetAudience>
763 <xsl:when test="$controlField008-22='g'">
764 <targetAudience>general</targetAudience>
766 <xsl:when test="$controlField008-22='b' or $controlField008-22='c' or $controlField008-22='j'">
767 <targetAudience>juvenile</targetAudience>
769 <xsl:when test="$controlField008-22='a'">
770 <targetAudience>preschool</targetAudience>
772 <xsl:when test="$controlField008-22='f'">
773 <targetAudience>specialized</targetAudience>
778 <!-- Not in mapping but in conversion -->
779 <xsl:for-each select="marc:datafield[@tag=245]/marc:subfield[@code='c']">
780 <note type="statement of responsibility">
781 <xsl:value-of select="."/>
785 <xsl:for-each select="marc:datafield[@tag=500]">
787 <xsl:value-of select="marc:subfield[@code='a']"/>
788 <xsl:call-template name="uri"/>
792 <xsl:for-each select="marc:datafield[@tag=511]">
793 <note type="performers">
794 <xsl:call-template name="uri"/>
795 <xsl:value-of select="marc:subfield[@code='a']"/>
799 <xsl:for-each select="marc:datafield[@tag=518]">
801 <xsl:call-template name="uri"/>
802 <xsl:value-of select="marc:subfield[@code='a']"/>
806 <xsl:for-each select="marc:datafield[@tag=501 or @tag=502 or @tag=504 or @tag=506 or @tag=507 or @tag=508 or @tag=510 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=530 or @tag=533 or @tag=534 or @tag=535 or @tag=536 or @tag=538 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=583 or @tag=584 or @tag=585 or @tag=586]">
808 <xsl:call-template name="uri"/>
809 <xsl:variable name="str">
810 <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
811 <xsl:value-of select="."/><xsl:text> </xsl:text>
814 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
818 <xsl:for-each select="marc:datafield[@tag=034][marc:subfield[@code='d' or @code='e' or @code='f' or @code='g']]">
821 <xsl:call-template name="subfieldSelect">
822 <xsl:with-param name="codes">defg</xsl:with-param>
828 <xsl:for-each select="marc:datafield[@tag=255]">
830 <xsl:for-each select="marc:subfield[@code='c']">
832 <xsl:value-of select="."/>
835 <xsl:for-each select="marc:subfield[@code='a']">
837 <xsl:value-of select="."/>
840 <xsl:for-each select="marc:subfield[@code='b']">
842 <xsl:value-of select="."/>
848 <xsl:apply-templates select="marc:datafield[653 >= @tag and @tag >= 600]"/>
850 <xsl:for-each select="marc:datafield[@tag=752]">
852 <hierarchicalGeographic>
853 <xsl:for-each select="marc:subfield[@code='a']">
855 <xsl:value-of select="."/>
858 <xsl:for-each select="marc:subfield[@code='b']">
860 <xsl:value-of select="."/>
863 <xsl:for-each select="marc:subfield[@code='c']">
865 <xsl:value-of select="."/>
868 <xsl:for-each select="marc:subfield[@code='d']">
870 <xsl:value-of select="."/>
873 </hierarchicalGeographic>
877 <xsl:for-each select="marc:datafield[@tag=050]">
878 <xsl:for-each select="marc:subfield[@code='b']">
879 <classification authority="lcc">
880 <xsl:value-of select="preceding-sibling::marc:subfield[@code='a'][1]"/>
881 <xsl:text> </xsl:text>
882 <xsl:value-of select="text()"/>
885 <xsl:for-each select="marc:subfield[@code='a'][not(following-sibling::marc:subfield[@code='b'])]">
886 <classification authority="lcc">
887 <xsl:value-of select="text()"/>
892 <xsl:for-each select="marc:datafield[@tag=082]">
893 <classification authority="ddc">
894 <xsl:if test="marc:subfield[@code='2']">
895 <xsl:attribute name="edition">
896 <xsl:value-of select="marc:subfield[@code='2']"/>
899 <xsl:call-template name="subfieldSelect">
900 <xsl:with-param name="codes">ab</xsl:with-param>
905 <xsl:for-each select="marc:datafield[@tag=080]">
906 <classification authority="udc">
907 <xsl:call-template name="subfieldSelect">
908 <xsl:with-param name="codes">abx</xsl:with-param>
913 <xsl:for-each select="marc:datafield[@tag=060]">
914 <classification authority="nlm">
915 <xsl:call-template name="subfieldSelect">
916 <xsl:with-param name="codes">ab</xsl:with-param>
921 <xsl:for-each select="marc:datafield[@tag=086][@ind1=0]">
922 <classification authority="sudocs">
923 <xsl:value-of select="marc:subfield[@code='a']"/>
927 <xsl:for-each select="marc:datafield[@tag=086][@ind1=1]">
928 <classification authority="candoc">
929 <xsl:value-of select="marc:subfield[@code='a']"/>
933 <xsl:for-each select="marc:datafield[@tag=086]">
935 <xsl:attribute name="authority">
936 <xsl:value-of select="marc:subfield[@code='2']"/>
938 <xsl:value-of select="marc:subfield[@code='a']"/>
942 <xsl:for-each select="marc:datafield[@tag=084]">
944 <xsl:attribute name="authority">
945 <xsl:value-of select="marc:subfield[@code='2']"/>
947 <xsl:call-template name="subfieldSelect">
948 <xsl:with-param name="codes">ab</xsl:with-param>
953 <xsl:for-each select="marc:datafield[@tag=440]">
954 <relatedItem type="series">
957 <xsl:call-template name="subfieldSelect">
958 <xsl:with-param name="codes">av</xsl:with-param>
960 <xsl:call-template name="part"/>
966 <xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
967 <relatedItem type="series">
970 <xsl:call-template name="subfieldSelect">
971 <xsl:with-param name="codes">av</xsl:with-param>
973 <xsl:call-template name="part"/>
979 <xsl:for-each select="marc:datafield[@tag=534]">
980 <relatedItem type="original">
981 <xsl:call-template name="relatedTitle"/>
982 <xsl:call-template name="relatedName"/>
983 <xsl:call-template name="relatedIdentifierISSN"/>
984 <xsl:for-each select="marc:subfield[@code='z']">
985 <identifier type="isbn">
986 <xsl:value-of select="."/>
989 <xsl:call-template name="relatedNote"/>
993 <xsl:for-each select="marc:datafield[@tag=700][marc:subfield[@code='t']]">
995 <xsl:call-template name="constituentOrRelatedType"/>
998 <xsl:call-template name="specialSubfieldSelect">
999 <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
1000 <xsl:with-param name="axis">t</xsl:with-param>
1001 <xsl:with-param name="afterCodes">g</xsl:with-param>
1002 </xsl:call-template>
1004 <xsl:call-template name="part"/>
1006 <name type="personal">
1008 <xsl:call-template name="specialSubfieldSelect">
1009 <xsl:with-param name="anyCodes">abcq</xsl:with-param>
1010 <xsl:with-param name="axis">t</xsl:with-param>
1011 <xsl:with-param name="beforeCodes">g</xsl:with-param>
1012 </xsl:call-template>
1014 <xsl:call-template name="nameDate"/>
1015 <xsl:for-each select="marc:subfield[@code='e']">
1017 <xsl:value-of select="."/>
1021 <xsl:call-template name="relatedForm"/>
1022 <xsl:call-template name="relatedIdentifierISSN"/>
1026 <xsl:for-each select="marc:datafield[@tag=710][marc:subfield[@code='t']]">
1028 <xsl:call-template name="constituentOrRelatedType"/>
1031 <xsl:call-template name="specialSubfieldSelect">
1032 <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
1033 <xsl:with-param name="axis">t</xsl:with-param>
1034 <xsl:with-param name="afterCodes">dg</xsl:with-param>
1035 </xsl:call-template>
1037 <xsl:call-template name="relatedPart"/>
1039 <name type="corporate">
1040 <xsl:for-each select="marc:subfield[@code='a']">
1042 <xsl:value-of select="."/>
1045 <xsl:for-each select="marc:subfield[@code='b']">
1047 <xsl:value-of select="."/>
1050 <xsl:variable name="tempNamePart">
1051 <xsl:call-template name="specialSubfieldSelect">
1052 <xsl:with-param name="anyCodes">c</xsl:with-param>
1053 <xsl:with-param name="axis">t</xsl:with-param>
1054 <xsl:with-param name="beforeCodes">dgn</xsl:with-param>
1055 </xsl:call-template>
1057 <xsl:if test="normalize-space($tempNamePart)">
1059 <xsl:value-of select="$tempNamePart"/>
1062 <xsl:for-each select="marc:subfield[@code='e']">
1064 <xsl:value-of select="."/>
1068 <xsl:call-template name="relatedForm"/>
1069 <xsl:call-template name="relatedIdentifierISSN"/>
1073 <xsl:for-each select="marc:datafield[@tag=711][marc:subfield[@code='t']]">
1075 <xsl:call-template name="constituentOrRelatedType"/>
1078 <xsl:call-template name="specialSubfieldSelect">
1079 <xsl:with-param name="anyCodes">tfklsv</xsl:with-param>
1080 <xsl:with-param name="axis">t</xsl:with-param>
1081 <xsl:with-param name="afterCodes">g</xsl:with-param>
1082 </xsl:call-template>
1084 <xsl:call-template name="relatedPart"/>
1086 <name type="conference">
1088 <xsl:call-template name="specialSubfieldSelect">
1089 <xsl:with-param name="anyCodes">aqdc</xsl:with-param>
1090 <xsl:with-param name="axis">t</xsl:with-param>
1091 <xsl:with-param name="beforeCodes">gn</xsl:with-param>
1092 </xsl:call-template>
1095 <xsl:call-template name="relatedForm"/>
1096 <xsl:call-template name="relatedIdentifierISSN"/>
1100 <xsl:for-each select="marc:datafield[@tag=730][@ind2=2]">
1102 <xsl:call-template name="constituentOrRelatedType"/>
1105 <xsl:call-template name="subfieldSelect">
1106 <xsl:with-param name="codes">adfgklmorsv</xsl:with-param>
1107 </xsl:call-template>
1109 <xsl:call-template name="part"/>
1111 <xsl:call-template name="relatedForm"/>
1112 <xsl:call-template name="relatedIdentifierISSN"/>
1116 <xsl:for-each select="marc:datafield[@tag=740][@ind2=2]">
1118 <xsl:call-template name="constituentOrRelatedType"/>
1121 <xsl:value-of select="marc:subfield[@code='a']"/>
1123 <xsl:call-template name="part"/>
1125 <xsl:call-template name="relatedForm"/>
1129 <xsl:for-each select="marc:datafield[@tag=760]|marc:datafield[@tag=762]">
1130 <relatedItem type="series">
1131 <xsl:call-template name="relatedItem76X-78X"/>
1135 <xsl:for-each select="marc:datafield[@tag=765]|marc:datafield[@tag=767]|marc:datafield[@tag=775]|marc:datafield[@tag=777]|marc:datafield[@tag=787]">
1136 <relatedItem type="related">
1137 <xsl:call-template name="relatedItem76X-78X"/>
1141 <xsl:for-each select="marc:datafield[@tag=770]|marc:datafield[@tag=774]">
1142 <relatedItem type="constituent">
1143 <xsl:call-template name="relatedItem76X-78X"/>
1147 <xsl:for-each select="marc:datafield[@tag=772]|marc:datafield[@tag=773]">
1148 <relatedItem type="host">
1149 <xsl:call-template name="relatedItem76X-78X"/>
1153 <xsl:for-each select="marc:datafield[@tag=776]">
1154 <relatedItem type="reproduction">
1155 <xsl:call-template name="relatedItem76X-78X"/>
1159 <xsl:for-each select="marc:datafield[@tag=780]">
1160 <relatedItem type="preceding">
1161 <xsl:call-template name="relatedItem76X-78X"/>
1165 <xsl:for-each select="marc:datafield[@tag=785]">
1166 <relatedItem type="succeeding">
1167 <xsl:call-template name="relatedItem76X-78X"/>
1171 <xsl:for-each select="marc:datafield[@tag=786]">
1172 <relatedItem type="original">
1173 <xsl:call-template name="relatedItem76X-78X"/>
1177 <xsl:for-each select="marc:datafield[@tag=800]">
1178 <relatedItem type="series">
1181 <xsl:call-template name="specialSubfieldSelect">
1182 <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
1183 <xsl:with-param name="axis">t</xsl:with-param>
1184 <xsl:with-param name="afterCodes">g</xsl:with-param>
1185 </xsl:call-template>
1187 <xsl:call-template name="part"/>
1189 <name type="personal">
1191 <xsl:call-template name="chopPunctuation">
1192 <xsl:with-param name="chopString">
1193 <xsl:call-template name="specialSubfieldSelect">
1194 <xsl:with-param name="anyCodes">abcq</xsl:with-param>
1195 <xsl:with-param name="axis">t</xsl:with-param>
1196 <xsl:with-param name="beforeCodes">g</xsl:with-param>
1197 </xsl:call-template>
1199 </xsl:call-template>
1201 <xsl:call-template name="nameDate"/>
1202 <xsl:for-each select="marc:subfield[@code='e']">
1204 <xsl:value-of select="."/>
1208 <xsl:call-template name="relatedForm"/>
1212 <xsl:for-each select="marc:datafield[@tag=810]">
1213 <relatedItem type="series">
1216 <xsl:call-template name="specialSubfieldSelect">
1217 <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
1218 <xsl:with-param name="axis">t</xsl:with-param>
1219 <xsl:with-param name="afterCodes">dg</xsl:with-param>
1220 </xsl:call-template>
1222 <xsl:call-template name="relatedPart"/>
1224 <name type="corporate">
1225 <xsl:for-each select="marc:subfield[@code='a']">
1227 <xsl:value-of select="."/>
1230 <xsl:for-each select="marc:subfield[@code='b']">
1232 <xsl:value-of select="."/>
1236 <xsl:call-template name="specialSubfieldSelect">
1237 <xsl:with-param name="anyCodes">c</xsl:with-param>
1238 <xsl:with-param name="axis">t</xsl:with-param>
1239 <xsl:with-param name="beforeCodes">dgn</xsl:with-param>
1240 </xsl:call-template>
1242 <xsl:for-each select="marc:subfield[@code='e']">
1244 <xsl:value-of select="."/>
1248 <xsl:call-template name="relatedForm"/>
1252 <xsl:for-each select="marc:datafield[@tag=811]">
1253 <relatedItem type="series">
1256 <xsl:call-template name="specialSubfieldSelect">
1257 <xsl:with-param name="anyCodes">tfklsv</xsl:with-param>
1258 <xsl:with-param name="axis">t</xsl:with-param>
1259 <xsl:with-param name="afterCodes">g</xsl:with-param>
1260 </xsl:call-template>
1262 <xsl:call-template name="relatedPart"/>
1264 <name type="conference">
1266 <xsl:call-template name="specialSubfieldSelect">
1267 <xsl:with-param name="anyCodes">aqdc</xsl:with-param>
1268 <xsl:with-param name="axis">t</xsl:with-param>
1269 <xsl:with-param name="beforeCodes">gn</xsl:with-param>
1270 </xsl:call-template>
1273 <xsl:call-template name="relatedForm"/>
1277 <xsl:for-each select="marc:datafield[@tag=830]">
1278 <relatedItem type="series">
1281 <xsl:call-template name="subfieldSelect">
1282 <xsl:with-param name="codes">adfgklmorsv</xsl:with-param>
1283 </xsl:call-template>
1285 <xsl:call-template name="part"/>
1287 <xsl:call-template name="relatedForm"/>
1291 <xsl:for-each select="marc:datafield[@tag=856][@ind2=2]/marc:subfield[@code='q']">
1294 <xsl:value-of select="."/>
1295 </internetMediaType>
1299 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
1300 <identifier type="isbn">
1301 <xsl:value-of select="."/>
1305 <xsl:for-each select="marc:datafield[@tag=024][@ind1=0]/marc:subfield[@code='a']">
1306 <identifier type="isrc">
1307 <xsl:value-of select="."/>
1311 <xsl:for-each select="marc:datafield[@tag=024][@ind1=2]/marc:subfield[@code='a']">
1312 <identifier type="ismn">
1313 <xsl:value-of select="."/>
1317 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
1318 <identifier type="issn">
1319 <xsl:value-of select="."/>
1323 <xsl:for-each select="marc:datafield[@tag=010]/marc:subfield[@code='a']">
1324 <identifier type="lccn">
1325 <xsl:value-of select="normalize-space(text())"/>
1329 <xsl:for-each select="marc:datafield[@tag=028]">
1331 <xsl:attribute name="type">
1333 <xsl:when test="@ind1=0">issue number</xsl:when>
1334 <xsl:when test="@ind1=1">matrix number</xsl:when>
1335 <xsl:when test="@ind1=2">music plate</xsl:when>
1336 <xsl:when test="@ind1=3">music publisher</xsl:when>
1337 <xsl:when test="@ind1=4">videorecording identifier</xsl:when>
1340 <xsl:call-template name="subfieldSelect">
1341 <xsl:with-param name="codes">ab</xsl:with-param>
1342 </xsl:call-template>
1346 <xsl:for-each select="marc:datafield[@tag=024][@ind1=4]">
1347 <identifier type="sici">
1348 <xsl:call-template name="subfieldSelect">
1349 <xsl:with-param name="codes">ab</xsl:with-param>
1350 </xsl:call-template>
1354 <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='u']">
1356 <xsl:attribute name="type">
1358 <xsl:when test="starts-with(.,'urn:doi') or starts-with(.,'doi:')">doi</xsl:when>
1359 <xsl:otherwise>uri</xsl:otherwise>
1362 <xsl:value-of select="."/>
1366 <xsl:for-each select="marc:datafield[@tag=024][@ind1=1]/marc:subfield[@code='a']">
1367 <identifier type="upc">
1368 <xsl:value-of select="."/>
1372 <xsl:for-each select="marc:datafield[@tag=852]">
1374 <xsl:call-template name="subfieldSelect">
1375 <xsl:with-param name="codes">abj</xsl:with-param>
1376 </xsl:call-template>
1380 <xsl:for-each select="marc:datafield[@tag=506]">
1381 <accessCondition type="restrictionOnAccess">
1382 <xsl:call-template name="subfieldSelect">
1383 <xsl:with-param name="codes">abcd35</xsl:with-param>
1384 </xsl:call-template>
1388 <xsl:for-each select="marc:datafield[@tag=540]">
1389 <accessCondition type="useAndReproduction">
1390 <xsl:call-template name="subfieldSelect">
1391 <xsl:with-param name="codes">abcde35</xsl:with-param>
1392 </xsl:call-template>
1397 <xsl:for-each select="marc:datafield[@tag=040]">
1398 <recordContentSource>
1399 <xsl:value-of select="marc:subfield[@code='a']"/>
1400 </recordContentSource>
1403 <xsl:for-each select="marc:controlfield[@tag=008]">
1404 <recordCreationDate encoding="marc">
1405 <xsl:value-of select="substring(.,1,6)"/>
1406 </recordCreationDate>
1409 <xsl:for-each select="marc:controlfield[@tag=005]">
1410 <recordChangeDate encoding="iso8601">
1411 <xsl:value-of select="."/>
1415 <xsl:for-each select="marc:controlfield[@tag=001]">
1417 <xsl:if test="../marc:controlfield[@tag=003]">
1418 <xsl:attribute name="source">
1419 <xsl:value-of select="../marc:controlfield[@tag=003]"/>
1422 <xsl:value-of select="."/>
1429 <xsl:template name="displayForm">
1430 <xsl:for-each select="marc:subfield[@code='c']">
1432 <xsl:value-of select="."/>
1437 <xsl:template name="affiliation">
1438 <xsl:for-each select="marc:subfield[@code='u']">
1440 <xsl:value-of select="."/>
1445 <xsl:template name="uri">
1446 <xsl:for-each select="marc:subfield[@code='u']">
1447 <xsl:attribute name="xlink:href">
1448 <xsl:value-of select="."/>
1453 <xsl:template name="role">
1455 <xsl:when test="marc:subfield[@code='e']">
1456 <role><xsl:value-of select="marc:subfield[@code='e']"/></role>
1458 <xsl:when test="marc:subfield[@code='4']">
1459 <xsl:for-each select="marc:subfield[@code='4']">
1460 <role><xsl:value-of select="text()"/></role>
1466 <xsl:template name="part">
1467 <xsl:variable name="partNumber">
1468 <xsl:call-template name="specialSubfieldSelect">
1469 <xsl:with-param name="axis">n</xsl:with-param>
1470 <xsl:with-param name="anyCodes">n</xsl:with-param>
1471 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1472 </xsl:call-template>
1474 <xsl:variable name="partName">
1475 <xsl:call-template name="specialSubfieldSelect">
1476 <xsl:with-param name="axis">p</xsl:with-param>
1477 <xsl:with-param name="anyCodes">p</xsl:with-param>
1478 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1479 </xsl:call-template>
1481 <xsl:if test="string-length(normalize-space($partNumber))">
1483 <xsl:value-of select="$partNumber"/>
1486 <xsl:if test="string-length(normalize-space($partName))">
1488 <xsl:value-of select="$partName"/>
1493 <xsl:template name="relatedPart">
1494 <xsl:for-each select="marc:subfield[@code='n'][preceding-sibling::marc:subfield[@code='t']]">
1496 <xsl:value-of select="."/>
1499 <xsl:for-each select="marc:subfield[@code='p']">
1501 <xsl:value-of select="."/>
1506 <xsl:template name="relatedName">
1507 <xsl:for-each select="marc:subfield[@code='a']">
1510 <xsl:value-of select="."/>
1516 <xsl:template name="relatedForm">
1517 <xsl:for-each select="marc:subfield[@code='h']">
1518 <physicalDescription>
1521 <xsl:value-of select="."/>
1524 </physicalDescription>
1528 <xsl:template name="relatedExtent">
1529 <xsl:for-each select="marc:subfield[@code='h']">
1530 <physicalDescription>
1532 <xsl:value-of select="."/>
1534 </physicalDescription>
1538 <xsl:template name="relatedNote">
1539 <xsl:for-each select="marc:subfield[@code='n']">
1541 <xsl:value-of select="."/>
1546 <xsl:template name="relatedIdentifierISSN">
1547 <xsl:for-each select="marc:subfield[@code='x']">
1548 <identifier type="issn">
1549 <xsl:value-of select="."/>
1554 <xsl:template name="relatedIdentifierLocal">
1555 <xsl:for-each select="marc:subfield[@code='w']">
1556 <identifier type="local">
1557 <xsl:value-of select="."/>
1562 <xsl:template name="relatedIdentifier">
1563 <xsl:for-each select="marc:subfield[@code='o']">
1565 <xsl:value-of select="."/>
1570 <xsl:template name="relatedItem76X-78X">
1571 <xsl:call-template name="relatedTitle76X-78X"/>
1572 <xsl:call-template name="relatedName"/>
1573 <xsl:call-template name="relatedExtent"/>
1574 <xsl:call-template name="relatedIdentifier"/>
1575 <xsl:call-template name="relatedIdentifierISSN"/>
1576 <xsl:call-template name="relatedIdentifierLocal"/>
1577 <xsl:call-template name="relatedNote"/>
1580 <xsl:template name="subjectGeographicZ">
1582 <xsl:value-of select="."/>
1586 <xsl:template name="subjectTemporalY">
1588 <xsl:value-of select="."/>
1592 <xsl:template name="subjectTopic">
1594 <xsl:call-template name="chopPunctuation">
1595 <xsl:with-param name="chopString" select="."/>
1596 </xsl:call-template>
1600 <xsl:template name="nameABCDN">
1601 <xsl:for-each select="marc:subfield[@code='a']">
1603 <xsl:call-template name="chopPunctuation">
1604 <xsl:with-param name="chopString" select="."/>
1605 </xsl:call-template>
1608 <xsl:for-each select="marc:subfield[@code='b']">
1610 <xsl:value-of select="."/>
1613 <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
1615 <xsl:call-template name="subfieldSelect">
1616 <xsl:with-param name="codes">cdn</xsl:with-param>
1617 </xsl:call-template>
1622 <xsl:template name="nameABCDQ">
1624 <xsl:call-template name="chopPunctuation">
1625 <xsl:with-param name="chopString">
1626 <xsl:call-template name="subfieldSelect">
1627 <xsl:with-param name="codes">abcq</xsl:with-param>
1628 </xsl:call-template>
1630 </xsl:call-template>
1632 <xsl:call-template name="nameDate"/>
1635 <xsl:template name="nameACDEQ">
1637 <xsl:call-template name="subfieldSelect">
1638 <xsl:with-param name="codes">acdeq</xsl:with-param>
1639 </xsl:call-template>
1643 <xsl:template name="constituentOrRelatedType">
1644 <xsl:attribute name="type">
1646 <xsl:when test="@ind2=2">constituent</xsl:when>
1647 <xsl:otherwise>related</xsl:otherwise>
1652 <xsl:template name="relatedTitle">
1653 <xsl:for-each select="marc:subfield[@code='t']">
1656 <xsl:value-of select="."/>
1662 <xsl:template name="relatedTitle76X-78X">
1664 <xsl:for-each select="marc:subfield[@code='t']">
1666 <xsl:value-of select="."/>
1669 <xsl:for-each select="marc:subfield[@code='g']">
1671 <xsl:value-of select="."/>
1677 <xsl:template name="nameDate">
1678 <xsl:for-each select="marc:subfield[@code='d']">
1679 <namePart type="date">
1680 <xsl:call-template name="chopPunctuation">
1681 <xsl:with-param name="chopString" select="."/>
1682 </xsl:call-template>
1687 <xsl:template name="subjectAuthority">
1688 <xsl:attribute name="authority">
1690 <xsl:when test="@ind2=0">lcsh</xsl:when>
1691 <xsl:when test="@ind2=1">lcshac</xsl:when>
1692 <xsl:when test="@ind2=2">mesh</xsl:when>
1693 <xsl:when test="@ind2=3">csh</xsl:when>
1694 <xsl:when test="@ind2=5">nal</xsl:when>
1695 <xsl:when test="@ind2=6">rvm</xsl:when>
1696 <xsl:when test="@ind2=7"><xsl:value-of select="marc:subfield[@code='2']"/></xsl:when>
1701 <xsl:template name="subjectAnyOrder">
1702 <xsl:for-each select="marc:subfield[@code='v' or @code='x' or @code='y' or @code='z']">
1704 <xsl:when test="@code='v'">
1705 <xsl:call-template name="subjectTopic"/>
1707 <xsl:when test="@code='x'">
1708 <xsl:call-template name="subjectTopic"/>
1710 <xsl:when test="@code='y'">
1711 <xsl:call-template name="subjectTemporalY"/>
1713 <xsl:when test="@code='z'">
1714 <xsl:call-template name="subjectGeographicZ"/>
1720 <!-- <xsl:template name="subfieldSelect">
1721 <xsl:param name="codes"/>
1722 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1723 <xsl:variable name="str">
1724 <xsl:for-each select="marc:subfield">
1725 <xsl:if test="contains($codes, @code)">
1726 <xsl:value-of select="text()"/><xsl:value-of select="$delimeter"/>
1730 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
1734 <xsl:template name="specialSubfieldSelect">
1735 <xsl:param name="anyCodes"/>
1736 <xsl:param name="axis"/>
1737 <xsl:param name="beforeCodes"/>
1738 <xsl:param name="afterCodes"/>
1739 <xsl:variable name="str">
1740 <xsl:for-each select="marc:subfield">
1741 <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])">
1742 <xsl:value-of select="text()"/><xsl:text> </xsl:text>
1746 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1749 <xsl:template match="marc:datafield[@tag=600]">
1751 <xsl:call-template name="subjectAuthority"/>
1752 <name type="personal">
1754 <xsl:call-template name="chopPunctuation">
1755 <xsl:with-param name="chopString">
1756 <xsl:call-template name="subfieldSelect">
1757 <xsl:with-param name="codes">abcq</xsl:with-param>
1758 </xsl:call-template>
1760 </xsl:call-template>
1762 <xsl:call-template name="nameDate"/>
1763 <xsl:call-template name="affiliation"/>
1764 <xsl:call-template name="role"/>
1766 <xsl:call-template name="subjectAnyOrder"/>
1770 <xsl:template match="marc:datafield[@tag=610]">
1772 <xsl:call-template name="subjectAuthority"/>
1773 <name type="corporate">
1774 <xsl:for-each select="marc:subfield[@code='a']">
1776 <xsl:value-of select="."/>
1779 <xsl:for-each select="marc:subfield[@code='b']">
1781 <xsl:value-of select="."/>
1784 <xsl:if test="marc:subfield[@code='c' or @code='d' or @code='n' or @code='p']">
1786 <xsl:call-template name="subfieldSelect">
1787 <xsl:with-param name="codes">cdnp</xsl:with-param>
1788 </xsl:call-template>
1791 <xsl:call-template name="role"/>
1793 <xsl:call-template name="subjectAnyOrder"/>
1797 <xsl:template match="marc:datafield[@tag=611]">
1799 <xsl:call-template name="subjectAuthority"/>
1800 <name type="conference">
1802 <xsl:call-template name="subfieldSelect">
1803 <xsl:with-param name="codes">abcdeqnp</xsl:with-param>
1804 </xsl:call-template>
1806 <xsl:for-each select="marc:subfield[@code='4']">
1808 <xsl:value-of select="."/>
1812 <xsl:call-template name="subjectAnyOrder"/>
1816 <xsl:template match="marc:datafield[@tag=630]">
1818 <xsl:call-template name="subjectAuthority"/>
1821 <xsl:call-template name="subfieldSelect">
1822 <xsl:with-param name="codes">adfhklor</xsl:with-param>
1823 </xsl:call-template>
1824 <xsl:call-template name="part"/>
1827 <xsl:call-template name="subjectAnyOrder"/>
1831 <xsl:template match="marc:datafield[@tag=650]">
1833 <xsl:call-template name="subjectAuthority"/>
1835 <xsl:call-template name="chopPunctuation">
1836 <xsl:with-param name="chopString">
1837 <xsl:call-template name="subfieldSelect">
1838 <xsl:with-param name="codes">abcd</xsl:with-param>
1839 </xsl:call-template>
1841 </xsl:call-template>
1843 <xsl:call-template name="subjectAnyOrder"/>
1848 <xsl:template match="marc:datafield[@tag=651]">
1850 <xsl:call-template name="subjectAuthority"/>
1851 <xsl:for-each select="marc:subfield[@code='a']">
1853 <xsl:value-of select="."/>
1856 <xsl:call-template name="subjectAnyOrder"/>
1860 <xsl:template match="marc:datafield[@tag=653]">
1862 <xsl:for-each select="marc:subfield[@code='a']">
1864 <xsl:value-of select="."/>
1869 </xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.
1871 <scenarios ><scenario default="yes" name="modstst2" userelativepaths="yes" externalpreview="no" url="..\..\..\..\..\..\marcxml\modstst2.xml" htmlbaseurl="" outputurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="no" name="modstest" userelativepaths="yes" externalpreview="no" url="..\..\..\..\..\..\marcxml\modstest.xml" htmlbaseurl="" outputurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="no" name="Scenario1" userelativepaths="yes" externalpreview="no" url="..\..\..\..\..\..\marcxml\t.xml" htmlbaseurl="" outputurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>