1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <xsl:stylesheet version="1.0" xmlns="http://www.loc.gov/mods/v3" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
\r
4 <xsl:include href="http://www.loc.gov/marcxml/xslt/MARC21slimUtils.xsl"/>
\r
5 <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
\r
8 adapted from MARC21Slim2MODS3.xsl ntra 7/6/05
\r
9 revised rsg/jer 11/29/05
\r
12 <!-- authority attribute defaults to 'naf' if not set using this authority parameter, for <authority> descriptors: name, titleInfo, geographic -->
\r
13 <xsl:param name="authority"/>
\r
14 <xsl:variable name="auth">
\r
16 <xsl:when test="$authority">
\r
17 <xsl:value-of select="$authority"/>
\r
19 <xsl:otherwise>naf</xsl:otherwise>
\r
22 <xsl:variable name="controlField008-11" select="substring(descendant-or-self::marc:controlfield[@tag=008],12,1)"/>
\r
23 <xsl:variable name="controlField008-14" select="substring(descendant-or-self::marc:controlfield[@tag=008],15,1)"/>
\r
24 <xsl:template match="/">
\r
26 <xsl:when test="descendant-or-self::marc:collection">
\r
27 <madsCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/mads http://www.loc.gov/standards/mads/mads.xsd">
\r
28 <xsl:for-each select="descendant-or-self::marc:collection/marc:record">
\r
29 <mads version="beta">
\r
30 <xsl:call-template name="marcRecord"/>
\r
36 <mads version="beta" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/mads http://www.loc.gov/standards/mads/mads.xsd">
\r
37 <xsl:for-each select="descendant-or-self::marc:record">
\r
38 <xsl:call-template name="marcRecord"/>
\r
45 <xsl:template name="marcRecord">
\r
46 <xsl:if test="contains(marc:datafield[@tag='035'],'tea2003000479')">
\r
50 <xsl:apply-templates select="marc:datafield[100 <= @tag and @tag < 200]"/>
\r
53 <xsl:apply-templates select="marc:datafield[500 <= @tag and @tag <= 585]|marc:datafield[700 <= @tag and @tag <= 785]"/>
\r
56 <xsl:apply-templates select="marc:datafield[400 <= @tag and @tag <= 485]"/>
\r
58 <xsl:apply-templates select="marc:datafield[667 <= @tag and @tag <= 688]"/>
\r
60 <xsl:apply-templates select="marc:datafield[@tag=856]"/>
\r
62 <xsl:apply-templates select="marc:datafield[@tag=010]"/>
\r
63 <xsl:apply-templates select="marc:datafield[@tag=024]"/>
\r
64 <xsl:apply-templates select="marc:datafield[@tag=040]/marc:subfield[@code='a']"/>
\r
65 <xsl:apply-templates select="marc:controlfield[@tag=008]"/>
\r
66 <xsl:apply-templates select="marc:controlfield[@tag=005]"/>
\r
67 <xsl:apply-templates select="marc:controlfield[@tag=001]"/>
\r
68 <xsl:apply-templates select="marc:datafield[@tag=040]/marc:subfield[@code='b']"/>
\r
72 <!-- start of secondary templates -->
\r
74 <!-- ======== xlink ======== -->
\r
76 <!-- <xsl:template name="uri">
\r
77 <xsl:for-each select="marc:subfield[@code='0']">
\r
78 <xsl:attribute name="xlink:href">
\r
79 <xsl:value-of select="."/>
\r
84 <xsl:template match="marc:subfield[@code='i']">
\r
85 <xsl:attribute name="type">
\r
86 <xsl:value-of select="."/>
\r
90 <xsl:template name="role">
\r
91 <xsl:for-each select="marc:subfield[@code='e']">
\r
93 <roleTerm type="text">
\r
94 <xsl:value-of select="."/>
\r
100 <xsl:template name="part">
\r
101 <xsl:variable name="partNumber">
\r
102 <xsl:call-template name="specialSubfieldSelect">
\r
103 <xsl:with-param name="axis">n</xsl:with-param>
\r
104 <xsl:with-param name="anyCodes">n</xsl:with-param>
\r
105 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
\r
106 </xsl:call-template>
\r
108 <xsl:variable name="partName">
\r
109 <xsl:call-template name="specialSubfieldSelect">
\r
110 <xsl:with-param name="axis">p</xsl:with-param>
\r
111 <xsl:with-param name="anyCodes">p</xsl:with-param>
\r
112 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
\r
113 </xsl:call-template>
\r
115 <xsl:if test="string-length(normalize-space($partNumber))">
\r
117 <xsl:call-template name="chopPunctuation">
\r
118 <xsl:with-param name="chopString" select="$partNumber"/>
\r
119 </xsl:call-template>
\r
122 <xsl:if test="string-length(normalize-space($partName))">
\r
124 <xsl:call-template name="chopPunctuation">
\r
125 <xsl:with-param name="chopString" select="$partName"/>
\r
126 </xsl:call-template>
\r
131 <xsl:template name="nameABCDN">
\r
132 <xsl:for-each select="marc:subfield[@code='a']">
\r
134 <xsl:call-template name="chopPunctuation">
\r
135 <xsl:with-param name="chopString" select="."/>
\r
136 </xsl:call-template>
\r
139 <xsl:for-each select="marc:subfield[@code='b']">
\r
141 <xsl:value-of select="."/>
\r
144 <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
\r
146 <xsl:call-template name="subfieldSelect">
\r
147 <xsl:with-param name="codes">cdn</xsl:with-param>
\r
148 </xsl:call-template>
\r
153 <xsl:template name="nameABCDQ">
\r
155 <xsl:call-template name="chopPunctuation">
\r
156 <xsl:with-param name="chopString">
\r
157 <xsl:call-template name="subfieldSelect">
\r
158 <xsl:with-param name="codes">aq</xsl:with-param>
\r
159 </xsl:call-template>
\r
161 </xsl:call-template>
\r
163 <xsl:call-template name="termsOfAddress"/>
\r
164 <xsl:call-template name="nameDate"/>
\r
167 <xsl:template name="nameACDENQ">
\r
169 <xsl:call-template name="subfieldSelect">
\r
170 <xsl:with-param name="codes">acdenq</xsl:with-param>
\r
171 </xsl:call-template>
\r
175 <xsl:template name="nameDate">
\r
176 <xsl:for-each select="marc:subfield[@code='d']">
\r
177 <namePart type="date">
\r
178 <xsl:call-template name="chopPunctuation">
\r
179 <xsl:with-param name="chopString" select="."/>
\r
180 </xsl:call-template>
\r
185 <xsl:template name="specialSubfieldSelect">
\r
186 <xsl:param name="anyCodes"/>
\r
187 <xsl:param name="axis"/>
\r
188 <xsl:param name="beforeCodes"/>
\r
189 <xsl:param name="afterCodes"/>
\r
190 <xsl:variable name="str">
\r
191 <xsl:for-each select="marc:subfield">
\r
192 <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])">
\r
193 <xsl:value-of select="text()"/>
\r
194 <xsl:text> </xsl:text>
\r
198 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
\r
201 <xsl:template name="termsOfAddress">
\r
202 <xsl:if test="marc:subfield[@code='b' or @code='c']">
\r
203 <namePart type="termsOfAddress">
\r
204 <xsl:call-template name="chopPunctuation">
\r
205 <xsl:with-param name="chopString">
\r
206 <xsl:call-template name="subfieldSelect">
\r
207 <xsl:with-param name="codes">bc</xsl:with-param>
\r
208 </xsl:call-template>
\r
210 </xsl:call-template>
\r
215 <xsl:template name="displayLabel">
\r
216 <xsl:if test="marc:subfield[@code='z']">
\r
217 <xsl:attribute name="displayLabel">
\r
218 <xsl:value-of select="marc:subfield[@code='z']"/>
\r
221 <xsl:if test="marc:subfield[@code='3']">
\r
222 <xsl:attribute name="displayLabel">
\r
223 <xsl:value-of select="marc:subfield[@code='3']"/>
\r
228 <xsl:template name="isInvalid">
\r
229 <xsl:if test="marc:subfield[@code='z']">
\r
230 <xsl:attribute name="invalid">yes</xsl:attribute>
\r
234 <xsl:template name="sub2Attribute">
\r
236 <xsl:if test="marc:subfield[@code='2']">
\r
237 <xsl:attribute name="type">
\r
238 <xsl:value-of select="marc:subfield[@code='2']"/>
\r
242 <xsl:template match="marc:controlfield[@tag=001]">
\r
244 <xsl:if test="../marc:controlfield[@tag=003]">
\r
245 <xsl:attribute name="source">
\r
246 <xsl:value-of select="../marc:controlfield[@tag=003]"/>
\r
249 <xsl:value-of select="."/>
\r
250 </recordIdentifier>
\r
253 <xsl:template match="marc:controlfield[@tag=005]">
\r
254 <recordChangeDate encoding="iso8601">
\r
255 <xsl:value-of select="."/>
\r
256 </recordChangeDate>
\r
259 <xsl:template match="marc:controlfield[@tag=008]">
\r
260 <recordCreationDate encoding="marc">
\r
261 <xsl:value-of select="substring(.,1,6)"/>
\r
262 </recordCreationDate>
\r
265 <xsl:template match="marc:datafield[@tag=010]">
\r
267 <xsl:call-template name="isInvalid"/>
\r
268 <xsl:call-template name="sub2Attribute"/>
\r
269 <xsl:value-of select="marc:subfield[@code='a']"/>
\r
273 <xsl:template match="marc:datafield[@tag=024]">
\r
275 <xsl:call-template name="isInvalid"/>
\r
276 <xsl:call-template name="sub2Attribute"/>
\r
277 <xsl:value-of select="marc:subfield[@code='a']"/>
\r
281 <xsl:template match="marc:datafield[@tag=040]/marc:subfield[@code='a']">
\r
282 <recordContentSource authority="marcorg">
\r
283 <xsl:value-of select="."/>
\r
284 </recordContentSource>
\r
287 <xsl:template match="marc:datafield[@tag=040]/marc:subfield[@code='b']">
\r
288 <languageOfCataloging>
\r
289 <languageTerm authority="iso639-2b" type="code">
\r
290 <xsl:value-of select="."/>
\r
292 </languageOfCataloging>
\r
295 <!-- ========== names ========== -->
\r
296 <xsl:template match="marc:datafield[@tag=100]">
\r
297 <name type="personal">
\r
298 <xsl:call-template name="setAuthority"/>
\r
299 <xsl:call-template name="nameABCDQ"/>
\r
300 <xsl:call-template name="role"/>
\r
302 <xsl:apply-templates select="*[marc:subfield[not(contains('abcdeq',@code))]]"/>
\r
303 <xsl:call-template name="title"/>
\r
304 <xsl:apply-templates/>
\r
307 <xsl:template match="marc:datafield[@tag=110]">
\r
308 <name type="corporate">
\r
309 <xsl:call-template name="setAuthority"/>
\r
310 <xsl:call-template name="nameABCDN"/>
\r
311 <xsl:call-template name="role"/>
\r
313 <xsl:apply-templates/>
\r
316 <xsl:template match="marc:datafield[@tag=111]">
\r
317 <name type="conference">
\r
318 <xsl:call-template name="setAuthority"/>
\r
319 <xsl:call-template name="nameACDENQ"/>
\r
321 <xsl:apply-templates/>
\r
324 <xsl:template match="marc:datafield[@tag=400]">
\r
326 <xsl:call-template name="variantTypeAttribute"/>
\r
327 <name type="personal">
\r
328 <xsl:call-template name="nameABCDQ"/>
\r
329 <xsl:call-template name="role"/>
\r
331 <xsl:apply-templates/>
\r
332 <xsl:call-template name="title"/>
\r
336 <xsl:template match="marc:datafield[@tag=410]">
\r
338 <xsl:call-template name="variantTypeAttribute"/>
\r
339 <name type="corporate">
\r
340 <xsl:call-template name="nameABCDN"/>
\r
341 <xsl:call-template name="role"/>
\r
343 <xsl:apply-templates/>
\r
347 <xsl:template match="marc:datafield[@tag=411]">
\r
349 <xsl:call-template name="variantTypeAttribute"/>
\r
350 <name type="conference">
\r
351 <xsl:call-template name="nameACDENQ"/>
\r
353 <xsl:apply-templates/>
\r
357 <xsl:template match="marc:datafield[@tag=500]|marc:datafield[@tag=700]">
\r
359 <xsl:call-template name="relatedTypeAttribute"/>
\r
360 <!-- <xsl:call-template name="uri"/> -->
\r
361 <name type="personal">
\r
362 <xsl:call-template name="setAuthority"/>
\r
363 <xsl:call-template name="nameABCDQ"/>
\r
364 <xsl:call-template name="role"/>
\r
366 <xsl:call-template name="title"/>
\r
367 <xsl:apply-templates/>
\r
371 <xsl:template match="marc:datafield[@tag=510]|marc:datafield[@tag=710]">
\r
373 <xsl:call-template name="relatedTypeAttribute"/>
\r
374 <!-- <xsl:call-template name="uri"/> -->
\r
375 <name type="corporate">
\r
376 <xsl:call-template name="setAuthority"/>
\r
377 <xsl:call-template name="nameABCDN"/>
\r
378 <xsl:call-template name="role"/>
\r
380 <xsl:apply-templates/>
\r
384 <xsl:template match="marc:datafield[@tag=511]|marc:datafield[@tag=711]">
\r
386 <xsl:call-template name="relatedTypeAttribute"/>
\r
387 <!-- <xsl:call-template name="uri"/> -->
\r
388 <name type="conference">
\r
389 <xsl:call-template name="setAuthority"/>
\r
390 <xsl:call-template name="nameACDENQ"/>
\r
392 <xsl:apply-templates/>
\r
396 <!-- ========== titles ========== -->
\r
397 <xsl:template match="marc:datafield[@tag=130]">
\r
398 <xsl:call-template name="uniform-title"/>
\r
399 <xsl:apply-templates/>
\r
402 <xsl:template match="marc:datafield[@tag=430]">
\r
404 <xsl:call-template name="variantTypeAttribute"/>
\r
405 <xsl:call-template name="uniform-title"/>
\r
406 <xsl:apply-templates/>
\r
410 <xsl:template match="marc:datafield[@tag=530]|marc:datafield[@tag=730]">
\r
412 <xsl:call-template name="relatedTypeAttribute"/>
\r
413 <xsl:call-template name="uniform-title"/>
\r
414 <xsl:apply-templates/>
\r
418 <xsl:template name="title">
\r
420 <xsl:call-template name="setAuthority"/>
\r
422 <xsl:variable name="str">
\r
423 <xsl:for-each select="marc:subfield">
\r
424 <xsl:if test="(contains('tfghklmors',@code) )">
\r
425 <xsl:value-of select="text()"/>
\r
426 <xsl:text> </xsl:text>
\r
431 <xsl:call-template name="chopPunctuation">
\r
432 <xsl:with-param name="chopString">
\r
433 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
\r
435 </xsl:call-template>
\r
437 <xsl:call-template name="part"/>
\r
438 <!-- <xsl:call-template name="uri"/> -->
\r
442 <xsl:template name="uniform-title">
\r
444 <xsl:call-template name="setAuthority"/>
\r
446 <xsl:variable name="str">
\r
447 <xsl:for-each select="marc:subfield">
\r
448 <xsl:if test="(contains('adfghklmors',@code) )">
\r
449 <xsl:value-of select="text()"/>
\r
450 <xsl:text> </xsl:text>
\r
455 <xsl:call-template name="chopPunctuation">
\r
456 <xsl:with-param name="chopString">
\r
457 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
\r
459 </xsl:call-template>
\r
461 <xsl:call-template name="part"/>
\r
462 <!-- <xsl:call-template name="uri"/> -->
\r
467 <!-- ========== topics ========== -->
\r
468 <xsl:template match="marc:subfield[@code='x']">
\r
470 <xsl:call-template name="chopPunctuation">
\r
471 <xsl:with-param name="chopString">
\r
472 <xsl:value-of select="."/>
\r
474 </xsl:call-template>
\r
478 <xsl:template match="marc:datafield[@tag=150][marc:subfield[@code='a' or @code='b']]|marc:datafield[@tag=180][marc:subfield[@code='x']]">
\r
479 <xsl:call-template name="topic"/>
\r
482 <xsl:template match="marc:datafield[@tag=450][marc:subfield[@code='a' or @code='b']]|marc:datafield[@tag=480][marc:subfield[@code='x']]">
\r
484 <xsl:call-template name="variantTypeAttribute"/>
\r
485 <xsl:call-template name="topic"/>
\r
489 <xsl:template match="marc:datafield[@tag=550 or @tag=750][marc:subfield[@code='a' or @code='b']]">
\r
491 <xsl:call-template name="relatedTypeAttribute"/>
\r
492 <!-- <xsl:call-template name="uri"/> -->
\r
493 <xsl:call-template name="topic"/>
\r
497 <xsl:template name="topic">
\r
499 <xsl:if test="@tag=550 or @tag=750">
\r
500 <xsl:call-template name="subfieldSelect">
\r
501 <xsl:with-param name="codes">ab</xsl:with-param>
\r
502 </xsl:call-template>
\r
504 <xsl:call-template name="setAuthority"/>
\r
505 <xsl:call-template name="chopPunctuation">
\r
506 <xsl:with-param name="chopString">
\r
508 <xsl:when test="@tag=180 or @tag=480 or @tag=580 or @tag=780">
\r
509 <xsl:apply-templates select="marc:subfield[@code='x']"/>
\r
512 <xsl:call-template name="subfieldSelect">
\r
513 <xsl:with-param name="codes">ab</xsl:with-param>
\r
514 </xsl:call-template>
\r
518 </xsl:call-template>
\r
520 <xsl:apply-templates/>
\r
523 <!-- ========= temporals ========== -->
\r
525 <xsl:template match="marc:subfield[@code='y']">
\r
527 <xsl:call-template name="chopPunctuation">
\r
528 <xsl:with-param name="chopString">
\r
529 <xsl:value-of select="."/>
\r
531 </xsl:call-template>
\r
535 <xsl:template match="marc:datafield[@tag=148][marc:subfield[@code='a']]|marc:datafield[@tag=182 ][marc:subfield[@code='y']]">
\r
536 <xsl:call-template name="temporal"/>
\r
539 <xsl:template match="marc:datafield[@tag=448][marc:subfield[@code='a']]|marc:datafield[@tag=482][marc:subfield[@code='y']]">
\r
541 <xsl:call-template name="variantTypeAttribute"/>
\r
542 <xsl:call-template name="temporal"/>
\r
546 <xsl:template match="marc:datafield[@tag=548 or @tag=748][marc:subfield[@code='a']]|marc:datafield[@tag=582 or @tag=782][marc:subfield[@code='y']]">
\r
548 <xsl:call-template name="relatedTypeAttribute"/>
\r
549 <!-- <xsl:call-template name="uri"/> -->
\r
550 <xsl:call-template name="temporal"/>
\r
554 <xsl:template name="temporal">
\r
556 <xsl:if test="@tag=548 or @tag=748">
\r
557 <xsl:value-of select="marc:subfield[@code='a']"/>
\r
559 <xsl:call-template name="setAuthority"/>
\r
560 <xsl:call-template name="chopPunctuation">
\r
561 <xsl:with-param name="chopString">
\r
563 <xsl:when test="@tag=182 or @tag=482 or @tag=582 or @tag=782">
\r
564 <xsl:apply-templates select="marc:subfield[@code='y']"/>
\r
567 <xsl:value-of select="marc:subfield[@code='a']"/>
\r
571 </xsl:call-template>
\r
573 <xsl:apply-templates/>
\r
576 <!-- ========== genre ========== -->
\r
577 <xsl:template match="marc:subfield[@code='v']">
\r
579 <xsl:call-template name="chopPunctuation">
\r
580 <xsl:with-param name="chopString">
\r
581 <xsl:value-of select="."/>
\r
583 </xsl:call-template>
\r
587 <xsl:template match="marc:datafield[@tag=155][marc:subfield[@code='a']]|marc:datafield[@tag=185][marc:subfield[@code='v']]">
\r
588 <xsl:call-template name="genre"/>
\r
591 <xsl:template match="marc:datafield[@tag=455][marc:subfield[@code='a']]|marc:datafield[@tag=485 ][marc:subfield[@code='v']]">
\r
593 <xsl:call-template name="variantTypeAttribute"/>
\r
594 <xsl:call-template name="genre"/>
\r
598 <xsl:template match="marc:datafield[@tag=555]">
\r
600 <xsl:call-template name="relatedTypeAttribute"/>
\r
601 <!-- <xsl:call-template name="uri"/> -->
\r
602 <xsl:call-template name="genre"/>
\r
606 <xsl:template match="marc:datafield[@tag=555 or @tag=755][marc:subfield[@code='a']]|marc:datafield[@tag=585][marc:subfield[@code='v']]">
\r
608 <xsl:call-template name="relatedTypeAttribute"/>
\r
609 <xsl:call-template name="genre"/>
\r
613 <xsl:template name="genre">
\r
615 <xsl:if test="@tag=555">
\r
616 <xsl:value-of select="marc:subfield[@code='a']"/>
\r
618 <xsl:call-template name="setAuthority"/>
\r
619 <xsl:call-template name="chopPunctuation">
\r
620 <xsl:with-param name="chopString">
\r
622 <xsl:when test="@tag=185 or @tag=485 or @tag=585">
\r
623 <xsl:apply-templates select="marc:subfield[@code='v']"/>
\r
626 <xsl:value-of select="marc:subfield[@code='a']"/>
\r
630 </xsl:call-template>
\r
632 <xsl:apply-templates/>
\r
635 <!-- ========= geographic ========== -->
\r
636 <xsl:template match="marc:subfield[@code='z']">
\r
638 <xsl:call-template name="chopPunctuation">
\r
639 <xsl:with-param name="chopString">
\r
640 <xsl:value-of select="."/>
\r
642 </xsl:call-template>
\r
646 <xsl:template name="geographic">
\r
648 <xsl:if test="@tag=551">
\r
649 <xsl:value-of select="marc:subfield[@code='a']"/>
\r
651 <xsl:call-template name="setAuthority"/>
\r
652 <xsl:call-template name="chopPunctuation">
\r
653 <xsl:with-param name="chopString">
\r
655 <xsl:when test="@tag=181 or @tag=481 or @tag=581">
\r
656 <xsl:apply-templates select="marc:subfield[@code='z']"/>
\r
659 <xsl:value-of select="marc:subfield[@code='a']"/>
\r
663 </xsl:call-template>
\r
665 <xsl:apply-templates/>
\r
668 <xsl:template match="marc:datafield[@tag=151][marc:subfield[@code='a']]|marc:datafield[@tag=181][marc:subfield[@code='z']]">
\r
669 <xsl:call-template name="geographic"/>
\r
672 <xsl:template match="marc:datafield[@tag=451][marc:subfield[@code='a']]|marc:datafield[@tag=481][marc:subfield[@code='z']]">
\r
674 <xsl:call-template name="variantTypeAttribute"/>
\r
675 <xsl:call-template name="geographic"/>
\r
679 <xsl:template match="marc:datafield[@tag=551]|marc:datafield[@tag=581][marc:subfield[@code='z']]">
\r
681 <xsl:call-template name="relatedTypeAttribute"/>
\r
682 <!-- <xsl:call-template name="uri"/> -->
\r
683 <xsl:call-template name="geographic"/>
\r
687 <xsl:template match="marc:datafield[@tag=580]">
\r
689 <xsl:call-template name="relatedTypeAttribute"/>
\r
690 <xsl:apply-templates/>
\r
694 <xsl:template match="marc:datafield[@tag=751][marc:subfield[@code='z']]|marc:datafield[@tag=781][marc:subfield[@code='z']]">
\r
696 <xsl:call-template name="relatedTypeAttribute"/>
\r
697 <xsl:call-template name="geographic"/>
\r
701 <xsl:template match="marc:datafield[@tag=755]">
\r
703 <xsl:call-template name="relatedTypeAttribute"/>
\r
704 <xsl:call-template name="genre"/>
\r
705 <xsl:call-template name="setAuthority"/>
\r
706 <xsl:apply-templates/>
\r
710 <xsl:template match="marc:datafield[@tag=780]">
\r
712 <xsl:call-template name="relatedTypeAttribute"/>
\r
713 <xsl:apply-templates/>
\r
717 <xsl:template match="marc:datafield[@tag=785]">
\r
719 <xsl:call-template name="relatedTypeAttribute"/>
\r
720 <xsl:apply-templates/>
\r
724 <!-- ========== notes ========== -->
\r
725 <xsl:template match="marc:datafield[667 <= @tag and @tag <= 688]">
\r
728 <xsl:when test="@tag=667">
\r
729 <xsl:attribute name="type">nonpublic</xsl:attribute>
\r
731 <xsl:when test="@tag=670">
\r
732 <xsl:attribute name="type">source</xsl:attribute>
\r
734 <xsl:when test="@tag=675">
\r
735 <xsl:attribute name="type">notFound</xsl:attribute>
\r
737 <xsl:when test="@tag=678">
\r
738 <xsl:attribute name="type">history</xsl:attribute>
\r
740 <xsl:when test="@tag=681">
\r
741 <xsl:attribute name="type">subject example</xsl:attribute>
\r
743 <xsl:when test="@tag=682">
\r
744 <xsl:attribute name="type">deleted heading information</xsl:attribute>
\r
746 <xsl:when test="@tag=688">
\r
747 <xsl:attribute name="type">application history</xsl:attribute>
\r
750 <xsl:call-template name="chopPunctuation">
\r
751 <xsl:with-param name="chopString">
\r
753 <xsl:when test="@tag=667 or @tag=675">
\r
754 <xsl:value-of select="marc:subfield[@code='a']"/>
\r
756 <xsl:when test="@tag=670 or @tag=678">
\r
757 <xsl:call-template name="subfieldSelect">
\r
758 <xsl:with-param name="codes">ab</xsl:with-param>
\r
759 </xsl:call-template>
\r
761 <xsl:when test="680 <= @tag and @tag <=688">
\r
762 <xsl:call-template name="subfieldSelect">
\r
763 <xsl:with-param name="codes">ai</xsl:with-param>
\r
764 </xsl:call-template>
\r
768 </xsl:call-template>
\r
771 <!-- ========== url ========== -->
\r
772 <xsl:template match="marc:datafield[@tag=856][marc:subfield[@code='u']]">
\r
774 <xsl:if test="marc:subfield[@code='z' or @code='3']">
\r
775 <xsl:attribute name="displayLabel">
\r
776 <xsl:call-template name="subfieldSelect">
\r
777 <xsl:with-param name="codes">z3</xsl:with-param>
\r
778 </xsl:call-template>
\r
781 <xsl:value-of select="marc:subfield[@code='u']"/>
\r
785 <xsl:template name="relatedTypeAttribute">
\r
787 <xsl:when test="@tag=500 or @tag=510 or @tag=511 or @tag=548 or @tag=550 or @tag=551 or @tag=555 or @tag=580 or @tag=581 or @tag=582 or @tag=585">
\r
788 <xsl:if test="substring(marc:subfield[@code='w'],1,1)='a'">
\r
789 <xsl:attribute name="type">earlier</xsl:attribute>
\r
791 <xsl:if test="substring(marc:subfield[@code='w'],1,1)='b'">
\r
792 <xsl:attribute name="type">later</xsl:attribute>
\r
794 <xsl:if test="substring(marc:subfield[@code='w'],1,1)='t'">
\r
795 <xsl:attribute name="type">parentOrg</xsl:attribute>
\r
797 <xsl:if test="substring(marc:subfield[@code='w'],1,1)='g'">
\r
798 <xsl:attribute name="type">broader</xsl:attribute>
\r
800 <xsl:if test="substring(marc:subfield[@code='w'],1,1)='h'">
\r
801 <xsl:attribute name="type">narrower</xsl:attribute>
\r
803 <xsl:if test="contains('fin|', substring(marc:subfield[@code='w'],1,1))">
\r
804 <xsl:attribute name="type">other</xsl:attribute>
\r
807 <xsl:when test="@tag=530 or @tag=730">
\r
808 <xsl:attribute name="type">other</xsl:attribute>
\r
812 <xsl:attribute name="type">equivalent</xsl:attribute>
\r
815 <xsl:apply-templates select="marc:subfield[@code='i']"/>
\r
818 <xsl:template name="variantTypeAttribute">
\r
820 <xsl:when test="@tag=400 or @tag=410 or @tag=411 or @tag=451 or @tag=455 or @tag=480 or @tag=481 or @tag=482 or @tag=485">
\r
821 <xsl:if test="substring(marc:subfield[@code='w'],1,1)='d'">
\r
822 <xsl:attribute name="type">acronym</xsl:attribute>
\r
824 <xsl:if test="contains('fit', substring(marc:subfield[@code='w'],1,1))">
\r
825 <xsl:attribute name="type">other</xsl:attribute>
\r
830 <xsl:attribute name="type">other</xsl:attribute>
\r
833 <xsl:apply-templates select="marc:subfield[@code='i']"/>
\r
835 <xsl:template name="setAuthority">
\r
837 <!-- can be called from the datafield or subfield level, so "..//@tag" means
\r
838 the tag can be at the subfield's parent level or at the datafields own level -->
\r
839 <xsl:when test="ancestor-or-self::marc:datafield/@tag=100 and (@ind1=0 or @ind1=1) and $controlField008-11='a' and $controlField008-14='a'">
\r
840 <xsl:attribute name="authority"><xsl:text>naf</xsl:text></xsl:attribute>
\r
842 <xsl:when test="ancestor-or-self::marc:datafield/@tag=100 and (@ind1=0 or @ind1=1) and $controlField008-11='a' and $controlField008-14='b'">
\r
843 <xsl:attribute name="authority"><xsl:text>lcsh</xsl:text></xsl:attribute>
\r
845 <xsl:when test="ancestor-or-self::marc:datafield/@tag=100 and (@ind1=0 or @ind1=1) and $controlField008-11='k'">
\r
846 <xsl:attribute name="authority"><xsl:text>lacnaf</xsl:text></xsl:attribute>
\r
848 <xsl:when test="ancestor-or-self::marc:datafield/@tag=100 and @ind1=3 and $controlField008-11='a' and $controlField008-14='b'">
\r
849 <xsl:attribute name="authority"><xsl:text>lcsh</xsl:text></xsl:attribute>
\r
851 <xsl:when test="ancestor-or-self::marc:datafield/@tag=100 and @ind1=3 and $controlField008-11='k' and $controlField008-14='b'">
\r
852 <xsl:attribute name="authority">cash</xsl:attribute>
\r
854 <xsl:when test="ancestor-or-self::marc:datafield/@tag=110 and $controlField008-11='a' and $controlField008-14='a'">
\r
855 <xsl:attribute name="authority">naf</xsl:attribute>
\r
857 <xsl:when test="ancestor-or-self::marc:datafield/@tag=110 and $controlField008-11='a' and $controlField008-14='b'">
\r
858 <xsl:attribute name="authority">lcsh</xsl:attribute>
\r
860 <xsl:when test="ancestor-or-self::marc:datafield/@tag=110 and $controlField008-11='k' and $controlField008-14='a'">
\r
861 <xsl:attribute name="authority"><xsl:text>lacnaf</xsl:text></xsl:attribute>
\r
863 <xsl:when test="ancestor-or-self::marc:datafield/@tag=110 and $controlField008-11='k' and $controlField008-14='b'">
\r
864 <xsl:attribute name="authority"><xsl:text>cash</xsl:text></xsl:attribute>
\r
866 <xsl:when test="100 <= ancestor-or-self::marc:datafield/@tag and ancestor-or-self::marc:datafield/@tag <= 155 and $controlField008-11='b'">
\r
867 <xsl:attribute name="authority"><xsl:text>lcshcl</xsl:text></xsl:attribute>
\r
869 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=100 or ancestor-or-self::marc:datafield/@tag=110 or ancestor-or-self::marc:datafield/@tag=111 or ancestor-or-self::marc:datafield/@tag=130 or ancestor-or-self::marc:datafield/@tag=151) and $controlField008-11='c'">
\r
870 <xsl:attribute name="authority"><xsl:text>nlmnaf</xsl:text></xsl:attribute>
\r
872 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=100 or ancestor-or-self::marc:datafield/@tag=110 or ancestor-or-self::marc:datafield/@tag=111 or ancestor-or-self::marc:datafield/@tag=130 or ancestor-or-self::marc:datafield/@tag=151) and $controlField008-11='d'">
\r
873 <xsl:attribute name="authority"><xsl:text>nalnaf</xsl:text></xsl:attribute>
\r
875 <xsl:when test="100 <= ancestor-or-self::marc:datafield/@tag and ancestor-or-self::marc:datafield/@tag <= 155 and $controlField008-11='r'">
\r
876 <xsl:attribute name="authority"><xsl:text>aat</xsl:text></xsl:attribute>
\r
878 <xsl:when test="100 <= ancestor-or-self::marc:datafield/@tag and ancestor-or-self::marc:datafield/@tag <= 155 and $controlField008-11='s'">
\r
879 <xsl:attribute name="authority">sears</xsl:attribute>
\r
881 <xsl:when test="100 <= ancestor-or-self::marc:datafield/@tag and ancestor-or-self::marc:datafield/@tag <= 155 and $controlField008-11='v'">
\r
882 <xsl:attribute name="authority">rvm</xsl:attribute>
\r
884 <xsl:when test="100 <= ancestor-or-self::marc:datafield/@tag and ancestor-or-self::marc:datafield/@tag <= 155 and $controlField008-11='z'">
\r
885 <xsl:attribute name="authority"><xsl:value-of select="../marc:datafield[ancestor-or-self::marc:datafield/@tag=040]/marc:subfield[@code='f']"/></xsl:attribute>
\r
887 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=111 or ancestor-or-self::marc:datafield/@tag=130) and $controlField008-11='a' and $controlField008-14='a'">
\r
888 <xsl:attribute name="authority"><xsl:text>naf</xsl:text></xsl:attribute>
\r
890 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=111 or ancestor-or-self::marc:datafield/@tag=130) and $controlField008-11='a' and $controlField008-14='b'">
\r
891 <xsl:attribute name="authority"><xsl:text>lcsh</xsl:text></xsl:attribute>
\r
893 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=111 or ancestor-or-self::marc:datafield/@tag=130) and $controlField008-11='k' ">
\r
894 <xsl:attribute name="authority"><xsl:text>lacnaf</xsl:text></xsl:attribute>
\r
896 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=148 or ancestor-or-self::marc:datafield/@tag=150 or ancestor-or-self::marc:datafield/@tag=155) and $controlField008-11='a' ">
\r
897 <xsl:attribute name="authority"><xsl:text>lcsh</xsl:text></xsl:attribute>
\r
899 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=148 or ancestor-or-self::marc:datafield/@tag=150 or ancestor-or-self::marc:datafield/@tag=155) and $controlField008-11='a' ">
\r
900 <xsl:attribute name="authority"><xsl:text>lcsh</xsl:text></xsl:attribute>
\r
902 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=148 or ancestor-or-self::marc:datafield/@tag=150 or ancestor-or-self::marc:datafield/@tag=155) and $controlField008-11='c' ">
\r
903 <xsl:attribute name="authority"><xsl:text>mesh</xsl:text></xsl:attribute>
\r
905 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=148 or ancestor-or-self::marc:datafield/@tag=150 or ancestor-or-self::marc:datafield/@tag=155) and $controlField008-11='d' ">
\r
906 <xsl:attribute name="authority"><xsl:text>nal</xsl:text></xsl:attribute>
\r
908 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=148 or ancestor-or-self::marc:datafield/@tag=150 or ancestor-or-self::marc:datafield/@tag=155) and $controlField008-11='k' ">
\r
909 <xsl:attribute name="authority"><xsl:text>cash</xsl:text></xsl:attribute>
\r
911 <xsl:when test="ancestor-or-self::marc:datafield/@tag=151 and $controlField008-11='a' and $controlField008-14='a'">
\r
912 <xsl:attribute name="authority"><xsl:text>naf</xsl:text></xsl:attribute>
\r
914 <xsl:when test="ancestor-or-self::marc:datafield/@tag=151 and $controlField008-11='a' and $controlField008-14='b'">
\r
915 <xsl:attribute name="authority">lcsh</xsl:attribute>
\r
917 <xsl:when test="ancestor-or-self::marc:datafield/@tag=151 and $controlField008-11='k' and $controlField008-14='a'">
\r
918 <xsl:attribute name="authority">lacnaf</xsl:attribute>
\r
920 <xsl:when test="ancestor-or-self::marc:datafield/@tag=151 and $controlField008-11='k' and $controlField008-14='b'">
\r
921 <xsl:attribute name="authority">cash</xsl:attribute>
\r
924 <xsl:when test="(..//ancestor-or-self::marc:datafield/@tag=180 or ..//ancestor-or-self::marc:datafield/@tag=181 or ..//ancestor-or-self::marc:datafield/@tag=182 or ..//ancestor-or-self::marc:datafield/@tag=185) and $controlField008-11='a'">
\r
925 <xsl:attribute name="authority">lcsh</xsl:attribute>
\r
928 <xsl:when test="ancestor-or-self::marc:datafield/@tag=700 and (@ind1='0' or @ind1='1') and @ind2='0'">
\r
929 <xsl:attribute name="authority">naf</xsl:attribute>
\r
931 <xsl:when test="ancestor-or-self::marc:datafield/@tag=700 and (@ind1='0' or @ind1='1') and @ind2='5'">
\r
932 <xsl:attribute name="authority">lacnaf</xsl:attribute>
\r
934 <xsl:when test="ancestor-or-self::marc:datafield/@tag=700 and @ind1='3' and @ind2='0'">
\r
935 <xsl:attribute name="authority">lcsh</xsl:attribute>
\r
937 <xsl:when test="ancestor-or-self::marc:datafield/@tag=700 and @ind1='3' and @ind2='5'">
\r
938 <xsl:attribute name="authority">cash</xsl:attribute>
\r
940 <xsl:when test="(700 <= ancestor-or-self::marc:datafield/@tag and ancestor-or-self::marc:datafield/@tag <= 755 ) and @ind2='1'">
\r
941 <xsl:attribute name="authority">lcshcl</xsl:attribute>
\r
943 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=700 or ancestor-or-self::marc:datafield/@tag=710 or ancestor-or-self::marc:datafield/@tag=711 or ancestor-or-self::marc:datafield/@tag=730 or ancestor-or-self::marc:datafield/@tag=751) and @ind2='2'">
\r
944 <xsl:attribute name="authority">nlmnaf</xsl:attribute>
\r
946 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=700 or ancestor-or-self::marc:datafield/@tag=710 or ancestor-or-self::marc:datafield/@tag=711 or ancestor-or-self::marc:datafield/@tag=730 or ancestor-or-self::marc:datafield/@tag=751) and @ind2='3'">
\r
947 <xsl:attribute name="authority">nalnaf</xsl:attribute>
\r
949 <xsl:when test="(700 <= ancestor-or-self::marc:datafield/@tag and ancestor-or-self::marc:datafield/@tag <= 755 ) and @ind2='6'">
\r
950 <xsl:attribute name="authority">rvm</xsl:attribute>
\r
952 <xsl:when test="(700 <= ancestor-or-self::marc:datafield/@tag and ancestor-or-self::marc:datafield/@tag <= 755 ) and @ind2='7'">
\r
953 <xsl:attribute name="authority">
\r
954 <xsl:value-of select="marc:subfield[@code='2']"/>
\r
957 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=710 or ancestor-or-self::marc:datafield/@tag=711 or ancestor-or-self::marc:datafield/@tag=730 or ancestor-or-self::marc:datafield/@tag=751) and @ind2='5'">
\r
958 <xsl:attribute name="authority">lacnaf</xsl:attribute>
\r
960 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=710 or ancestor-or-self::marc:datafield/@tag=711 or ancestor-or-self::marc:datafield/@tag=730 or ancestor-or-self::marc:datafield/@tag=751) and @ind2='0'">
\r
961 <xsl:attribute name="authority">naf</xsl:attribute>
\r
963 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=748 or ancestor-or-self::marc:datafield/@tag=750 or ancestor-or-self::marc:datafield/@tag=755) and @ind2='0'">
\r
964 <xsl:attribute name="authority">lcsh</xsl:attribute>
\r
966 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=748 or ancestor-or-self::marc:datafield/@tag=750 or ancestor-or-self::marc:datafield/@tag=755) and @ind2='2'">
\r
967 <xsl:attribute name="authority">mesh</xsl:attribute>
\r
969 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=748 or ancestor-or-self::marc:datafield/@tag=750 or ancestor-or-self::marc:datafield/@tag=755) and @ind2='3'">
\r
970 <xsl:attribute name="authority">nal</xsl:attribute>
\r
972 <xsl:when test="(ancestor-or-self::marc:datafield/@tag=748 or ancestor-or-self::marc:datafield/@tag=750 or ancestor-or-self::marc:datafield/@tag=755) and @ind2='5'">
\r
973 <xsl:attribute name="authority">cash</xsl:attribute>
\r
978 <!--<xsl:template name="oldsetAuth">
\r
979 <xsl:param name="ind2"/>
\r
980 <xsl:if test="100 <= @tag and @tag < 200">
\r
981 <xsl:attribute name="authority">
\r
982 <xsl:value-of select="$auth"/>
\r
985 <xsl:if test="(700 <= @tag and @tag < 800) or /marc:datafield[700 <=@tag and @tag < 800]">
\r
986 <xsl:attribute name="authority">
\r
988 <xsl:when test="$ind2='0'">naf</xsl:when>
\r
989 <xsl:when test="$ind2='2'">nlm</xsl:when>
\r
990 <xsl:when test="$ind2='3'">nal</xsl:when>
\r
991 <xsl:when test="$ind2='5'">lac</xsl:when>
\r
992 <xsl:when test="$ind2='6'">rvm</xsl:when>
\r
993 <xsl:when test="$ind2='7'"><xsl:value-of select="../marc:subfield[@code='2']"/></xsl:when>
\r
999 <!--<xsl:template name="oldsetAuth2">
\r
1000 <xsl:param name="ind2"/>
\r
1001 <xsl:if test="(100 <= @tag and @tag < 200) or ../marc:datafield[100 <=@tag and @tag < 200]">
\r
1002 <xsl:attribute name="authority">
\r
1004 <xsl:when test="$controlField008-11='a'">lcsh</xsl:when>
\r
1005 <xsl:when test="$controlField008-11='b'">lcac</xsl:when>
\r
1006 <xsl:when test="$controlField008-11='c'">mesh</xsl:when>
\r
1007 <xsl:when test="$controlField008-11='d'">nal</xsl:when>
\r
1008 <xsl:when test="$controlField008-11='k'">cash</xsl:when>
\r
1009 <xsl:when test="$controlField008-11='r'">aat</xsl:when>
\r
1010 <xsl:when test="$controlField008-11='s'">sears</xsl:when>
\r
1011 <xsl:when test="$controlField008-11='v'">rvm</xsl:when>
\r
1012 <xsl:when test="$controlField008-11='z'"><xsl:value-of select="../marc:datafield[@tag=040]/marc:subfield[@code='f']"/></xsl:when>
\r
1016 <xsl:if test="(500 <= @tag and @tag < 800) or /marc:datafield[500 <=@tag and @tag < 800]">
\r
1017 <xsl:attribute name="authority">
\r
1019 <xsl:when test="$ind2='0'">lcsh</xsl:when>
\r
1020 <xsl:when test="$ind2='1'">lcac</xsl:when>
\r
1021 <xsl:when test="$ind2='2'">mesh</xsl:when>
\r
1022 <xsl:when test="$ind2='3'">nal</xsl:when>
\r
1023 <xsl:when test="$ind2='5'">cash</xsl:when>
\r
1024 <xsl:when test="$ind2='6'">rvm</xsl:when>
\r
1025 <xsl:when test="$ind2='7'"><xsl:value-of select="../marc:subfield[@code='2']"/></xsl:when>
\r
1029 </xsl:template>-->
\r
1030 <!--<xsl:template match="marc:subfield[@code='0']">
\r
1031 <xsl:attribute name="xlink:href">
\r
1032 <xsl:value-of select="."/>
\r
1036 <xsl:template match="*"/>
\r
1037 <!--<xsl:template match="*">
\r
1038 <n><xsl:attribute name="tag"><xsl:value-of select="@tag"/></xsl:attribute>
\r
1039 <xsl:attribute name="code"><xsl:value-of select="@code"/></xsl:attribute>
\r
1040 <xsl:value-of select="name()"/>
\r
1042 <v><xsl:value-of select="."/></v></n>
\r
1043 </xsl:template>-->
\r
1044 </xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2003 Copyright Sonic Software Corporation. All rights reserved.
\r
1046 <scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="..\..\documents\mads_short.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"/>
\r
1047 </metaInformation>
\r