1 <?xml version="1.0" encoding="UTF-8"?>
5 <xsl:stylesheet version="1.0" xmlns:mads="http://www.loc.gov/mads/v2"
6 xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:marc="http://www.loc.gov/MARC21/slim"
7 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
9 <xsl:include href="http://www.loc.gov/marcxml/xslt/MARC21slimUtils.xsl"/>
10 <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
11 <xsl:strip-space elements="*"/>
12 <!-- Stylesheet copyright (c) 2011 Library of Congress
16 2.10 fixed type=other and type=otherType for mads:related tmee 09/16/2011
17 2.09 fixed professionTerm and genreTerm empty tag error tmee 09/16/2011
18 2.08 fixed marc:subfield @code='i' matching error tmee 09/16/2011
19 2.07 fixed 555 duplication error tmee 08/10/2011
20 2.06 fixed topic subfield error tmee 08/10/2011
21 2.05 fixed title subfield error tmee 06/20/2011
22 2.04 fixed geographicSubdivision mapping for authority element tmee 06/16/2011
23 2.03 added classification for 053, 055, 060, 065, 070, 080, 082, 083, 086, 087 tmee 06/03/2011
24 2.02 added descriptionStandard for 008/10 tmee 04/27/2011
25 2.01 added extensions for 046, 336, 370, 374, 375, 376 tmee 04/08/2011
26 2.00 redefined imported MODS elements in version 1.0 to MADS elements in version 2.0 tmee 02/08/2011
27 1.08 added 372 subfields $a $s $t for <fieldOfActivity> tmee 06/24/2010
28 1.07 removed role/roleTerm 100, 110, 111, 400, 410, 411, 500, 510, 511, 700, 710, 711 tmee 06/24/2010
29 1.06 added strip-space tmee 06/24/2010
30 1.05 added subfield $a for 130, 430, 530 tmee 06/21/2010
31 1.04 fixed 550 z omission ntra 08/11/2008
32 1.03 removed duplication of 550 $a text tmee 11/01/2006
33 1.02 fixed namespace references between mads and mods ntra 10/06/2006
34 1.01 revised rgue/jrad 11/29/05
35 1.00 adapted from MARC21Slim2MODS3.xsl ntra 07/06/05
38 <!-- authority attribute defaults to 'naf' if not set using this authority parameter, for <authority> descriptors: name, titleInfo, geographic -->
39 <xsl:param name="authority"/>
40 <xsl:variable name="auth">
42 <xsl:when test="$authority">
43 <xsl:value-of select="$authority"/>
45 <xsl:otherwise>naf</xsl:otherwise>
48 <xsl:variable name="controlField008" select="marc:controlfield[@tag='008']"/>
49 <xsl:variable name="controlField008-06"
50 select="substring(descendant-or-self::marc:controlfield[@tag=008],7,1)"/>
51 <xsl:variable name="controlField008-11"
52 select="substring(descendant-or-self::marc:controlfield[@tag=008],12,1)"/>
53 <xsl:variable name="controlField008-14"
54 select="substring(descendant-or-self::marc:controlfield[@tag=008],15,1)"/>
55 <xsl:template match="/">
57 <xsl:when test="descendant-or-self::marc:collection">
58 <mads:madsCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
59 xsi:schemaLocation="http://www.loc.gov/mads/v2 http://www.loc.gov/standards/mads/v2/mads-2-0.xsd">
60 <xsl:for-each select="descendant-or-self::marc:collection/marc:record">
61 <mads:mads version="2.0">
62 <xsl:call-template name="marcRecord"/>
65 </mads:madsCollection>
68 <mads:mads version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
69 xsi:schemaLocation="http://www.loc.gov/mads/v2 http://www.loc.gov/standards/mads/mads-2-0.xsd">
70 <xsl:for-each select="descendant-or-self::marc:record">
71 <xsl:call-template name="marcRecord"/>
78 <xsl:template name="marcRecord">
82 <xsl:when test="$controlField008-06='d'">
83 <xsl:attribute name="geographicSubdivision">
84 <xsl:text>direct</xsl:text>
87 <xsl:when test="$controlField008-06='i'">
88 <xsl:attribute name="geographicSubdivision">
89 <xsl:text>indirect</xsl:text>
92 <xsl:when test="$controlField008-06='n'">
93 <xsl:attribute name="geographicSubdivision">
94 <xsl:text>not applicable</xsl:text>
99 <xsl:apply-templates select="marc:datafield[100 <= @tag and @tag < 200]"/>
104 select="marc:datafield[500 <= @tag and @tag <= 585]|marc:datafield[700 <= @tag and @tag <= 785]"/>
107 <xsl:apply-templates select="marc:datafield[400 <= @tag and @tag <= 485]"/>
110 <xsl:apply-templates select="marc:datafield[667 <= @tag and @tag <= 688]"/>
113 <xsl:apply-templates select="marc:datafield[@tag=856]"/>
114 <xsl:apply-templates select="marc:datafield[@tag=010]"/>
115 <xsl:apply-templates select="marc:datafield[@tag=024]"/>
116 <xsl:apply-templates select="marc:datafield[@tag=372]"/>
118 <!-- classification -->
119 <xsl:apply-templates select="marc:datafield[@tag=053]"/>
120 <xsl:apply-templates select="marc:datafield[@tag=055]"/>
121 <xsl:apply-templates select="marc:datafield[@tag=060]"/>
122 <xsl:apply-templates select="marc:datafield[@tag=065]"/>
123 <xsl:apply-templates select="marc:datafield[@tag=070]"/>
124 <xsl:apply-templates select="marc:datafield[@tag=080]"/>
125 <xsl:apply-templates select="marc:datafield[@tag=082]"/>
126 <xsl:apply-templates select="marc:datafield[@tag=083]"/>
127 <xsl:apply-templates select="marc:datafield[@tag=086]"/>
128 <xsl:apply-templates select="marc:datafield[@tag=087]"/>
132 <xsl:for-each select="marc:datafield[@tag=373]">
135 <xsl:value-of select="marc:subfield[@code='a']"/>
137 <mads:dateValid point="start">
138 <xsl:value-of select="marc:subfield[@code='s']"/>
140 <mads:dateValid point="end">
141 <xsl:value-of select="marc:subfield[@code='t']"/>
145 <xsl:for-each select="marc:datafield[@tag=371]">
149 <xsl:value-of select="marc:subfield[@code='a']"/>
152 <xsl:value-of select="marc:subfield[@code='b']"/>
155 <xsl:value-of select="marc:subfield[@code='c']"/>
158 <xsl:value-of select="marc:subfield[@code='d']"/>
161 <xsl:value-of select="marc:subfield[@code='e']"/>
165 <xsl:value-of select="marc:subfield[@code='m']"/>
171 <xsl:for-each select="marc:datafield[@tag=336]">
174 <mads:contentType type="text">
175 <xsl:value-of select="marc:subfield[@code='a']"/>
177 <mads:contentType type="code">
178 <xsl:value-of select="marc:subfield[@code='b']"/>
184 <xsl:for-each select="marc:datafield[@tag=374]">
188 <xsl:when test="marc:subfield[@code='a']">
189 <mads:professionTerm>
190 <xsl:value-of select="marc:subfield[@code='a']"/>
191 </mads:professionTerm>
193 <xsl:when test="marc:subfield[@code='s']">
194 <mads:dateValid point="start">
195 <xsl:value-of select="marc:subfield[@code='s']"/>
198 <xsl:when test="marc:subfield[@code='t']">
199 <mads:dateValid point="end">
200 <xsl:value-of select="marc:subfield[@code='t']"/>
208 <xsl:for-each select="marc:datafield[@tag=375]">
212 <xsl:when test="marc:subfield[@code='a']">
214 <xsl:value-of select="marc:subfield[@code='a']"/>
217 <xsl:when test="marc:subfield[@code='s']">
218 <mads:dateValid point="start">
219 <xsl:value-of select="marc:subfield[@code='s']"/>
222 <xsl:when test="marc:subfield[@code='t']">
223 <mads:dateValid point="end">
224 <xsl:value-of select="marc:subfield[@code='t']"/>
232 <xsl:for-each select="marc:datafield[@tag=376]">
234 <mads:familyInformation>
236 <xsl:value-of select="marc:subfield[@code='a']"/>
238 <mads:nameOfProminentMember>
239 <xsl:value-of select="marc:subfield[@code='b']"/>
240 </mads:nameOfProminentMember>
241 <mads:hereditaryTitle>
242 <xsl:value-of select="marc:subfield[@code='c']"/>
243 </mads:hereditaryTitle>
244 <mads:dateValid point="start">
245 <xsl:value-of select="marc:subfield[@code='s']"/>
247 <mads:dateValid point="end">
248 <xsl:value-of select="marc:subfield[@code='t']"/>
250 </mads:familyInformation>
255 <mads:recordOrigin>Converted from MARCXML to MADS version 2.0 (Revision 2.10)</mads:recordOrigin>
256 <!-- <xsl:apply-templates select="marc:datafield[@tag=024]"/> -->
258 <xsl:apply-templates select="marc:datafield[@tag=040]/marc:subfield[@code='a']"/>
259 <xsl:apply-templates select="marc:controlfield[@tag=005]"/>
260 <xsl:apply-templates select="marc:controlfield[@tag=001]"/>
261 <xsl:apply-templates select="marc:datafield[@tag=040]/marc:subfield[@code='b']"/>
262 <xsl:apply-templates select="marc:datafield[@tag=040]/marc:subfield[@code='e']"/>
263 <xsl:for-each select="marc:controlfield[@tag=008]">
264 <xsl:if test="substring(.,11,1)='a'">
265 <mads:descriptionStandard>
266 <xsl:text>earlier rules</xsl:text>
267 </mads:descriptionStandard>
269 <xsl:if test="substring(.,11,1)='b'">
270 <mads:descriptionStandard>
271 <xsl:text>aacr1</xsl:text>
272 </mads:descriptionStandard>
274 <xsl:if test="substring(.,11,1)='c'">
275 <mads:descriptionStandard>
276 <xsl:text>aacr2</xsl:text>
277 </mads:descriptionStandard>
279 <xsl:if test="substring(.,11,1)='d'">
280 <mads:descriptionStandard>
281 <xsl:text>aacr2 compatible</xsl:text>
282 </mads:descriptionStandard>
284 <xsl:if test="substring(.,11,1)='z'">
285 <mads:descriptionStandard>
286 <xsl:text>other rules</xsl:text>
287 </mads:descriptionStandard>
293 <!-- start of secondary templates -->
295 <!-- ======== xlink ======== -->
297 <!-- <xsl:template name="uri">
298 <xsl:for-each select="marc:subfield[@code='0']">
299 <xsl:attribute name="xlink:href">
300 <xsl:value-of select="."/>
305 <xsl:template match="marc:subfield[@code='i']">
306 <xsl:attribute name="otherType">
307 <xsl:value-of select="."/>
311 <!-- No role/roleTerm mapped in MADS 06/24/2010
312 <xsl:template name="role">
313 <xsl:for-each select="marc:subfield[@code='e']">
315 <mads:roleTerm type="text">
316 <xsl:value-of select="."/>
323 <xsl:template name="part">
324 <xsl:variable name="partNumber">
325 <xsl:call-template name="specialSubfieldSelect">
326 <xsl:with-param name="axis">n</xsl:with-param>
327 <xsl:with-param name="anyCodes">n</xsl:with-param>
328 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
331 <xsl:variable name="partName">
332 <xsl:call-template name="specialSubfieldSelect">
333 <xsl:with-param name="axis">p</xsl:with-param>
334 <xsl:with-param name="anyCodes">p</xsl:with-param>
335 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
338 <xsl:if test="string-length(normalize-space($partNumber))">
340 <xsl:call-template name="chopPunctuation">
341 <xsl:with-param name="chopString" select="$partNumber"/>
345 <xsl:if test="string-length(normalize-space($partName))">
347 <xsl:call-template name="chopPunctuation">
348 <xsl:with-param name="chopString" select="$partName"/>
354 <xsl:template name="nameABCDN">
355 <xsl:for-each select="marc:subfield[@code='a']">
357 <xsl:call-template name="chopPunctuation">
358 <xsl:with-param name="chopString" select="."/>
362 <xsl:for-each select="marc:subfield[@code='b']">
364 <xsl:value-of select="."/>
368 test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
370 <xsl:call-template name="subfieldSelect">
371 <xsl:with-param name="codes">cdn</xsl:with-param>
377 <xsl:template name="nameABCDQ">
379 <xsl:call-template name="chopPunctuation">
380 <xsl:with-param name="chopString">
381 <xsl:call-template name="subfieldSelect">
382 <xsl:with-param name="codes">aq</xsl:with-param>
387 <xsl:call-template name="termsOfAddress"/>
388 <xsl:call-template name="nameDate"/>
391 <xsl:template name="nameACDENQ">
393 <xsl:call-template name="subfieldSelect">
394 <xsl:with-param name="codes">acdenq</xsl:with-param>
399 <xsl:template name="nameDate">
400 <xsl:for-each select="marc:subfield[@code='d']">
401 <mads:namePart type="date">
402 <xsl:call-template name="chopPunctuation">
403 <xsl:with-param name="chopString" select="."/>
409 <xsl:template name="specialSubfieldSelect">
410 <xsl:param name="anyCodes"/>
411 <xsl:param name="axis"/>
412 <xsl:param name="beforeCodes"/>
413 <xsl:param name="afterCodes"/>
414 <xsl:variable name="str">
415 <xsl:for-each select="marc:subfield">
417 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])">
418 <xsl:value-of select="text()"/>
419 <xsl:text> </xsl:text>
423 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
426 <xsl:template name="termsOfAddress">
427 <xsl:if test="marc:subfield[@code='b' or @code='c']">
428 <mads:namePart type="termsOfAddress">
429 <xsl:call-template name="chopPunctuation">
430 <xsl:with-param name="chopString">
431 <xsl:call-template name="subfieldSelect">
432 <xsl:with-param name="codes">bc</xsl:with-param>
440 <xsl:template name="displayLabel">
441 <xsl:if test="marc:subfield[@code='z']">
442 <xsl:attribute name="displayLabel">
443 <xsl:value-of select="marc:subfield[@code='z']"/>
446 <xsl:if test="marc:subfield[@code='3']">
447 <xsl:attribute name="displayLabel">
448 <xsl:value-of select="marc:subfield[@code='3']"/>
453 <xsl:template name="isInvalid">
454 <xsl:if test="@code='z'">
455 <xsl:attribute name="invalid">yes</xsl:attribute>
459 <xsl:template name="sub2Attribute">
461 <xsl:if test="../marc:subfield[@code='2']">
462 <xsl:attribute name="type">
463 <xsl:value-of select="../marc:subfield[@code='2']"/>
468 <xsl:template match="marc:controlfield[@tag=001]">
469 <mads:recordIdentifier>
470 <xsl:if test="../marc:controlfield[@tag=003]">
471 <xsl:attribute name="source">
472 <xsl:value-of select="../marc:controlfield[@tag=003]"/>
475 <xsl:value-of select="."/>
476 </mads:recordIdentifier>
479 <xsl:template match="marc:controlfield[@tag=005]">
480 <mads:recordChangeDate encoding="iso8601">
481 <xsl:value-of select="."/>
482 </mads:recordChangeDate>
485 <xsl:template match="marc:controlfield[@tag=008]">
486 <mads:recordCreationDate encoding="marc">
487 <xsl:value-of select="substring(.,1,6)"/>
488 </mads:recordCreationDate>
491 <xsl:template match="marc:datafield[@tag=010]">
492 <xsl:for-each select="marc:subfield">
493 <mads:identifier type="lccn">
494 <xsl:call-template name="isInvalid"/>
495 <xsl:value-of select="."/>
500 <xsl:template match="marc:datafield[@tag=024]">
501 <xsl:for-each select="marc:subfield[not(@code=2)]">
503 <xsl:call-template name="isInvalid"/>
504 <xsl:call-template name="sub2Attribute"/>
505 <xsl:value-of select="."/>
510 <!-- ========== 372 ========== -->
511 <xsl:template match="marc:datafield[@tag=372]">
512 <mads:fieldOfActivity>
513 <xsl:call-template name="subfieldSelect">
514 <xsl:with-param name="codes">a</xsl:with-param>
516 <xsl:text>-</xsl:text>
517 <xsl:call-template name="subfieldSelect">
518 <xsl:with-param name="codes">st</xsl:with-param>
520 </mads:fieldOfActivity>
524 <!-- ========== 040 ========== -->
525 <xsl:template match="marc:datafield[@tag=040]/marc:subfield[@code='a']">
526 <mads:recordContentSource authority="marcorg">
527 <xsl:value-of select="."/>
528 </mads:recordContentSource>
531 <xsl:template match="marc:datafield[@tag=040]/marc:subfield[@code='b']">
532 <mads:languageOfCataloging>
533 <mads:languageTerm authority="iso639-2b" type="code">
534 <xsl:value-of select="."/>
536 </mads:languageOfCataloging>
539 <xsl:template match="marc:datafield[@tag=040]/marc:subfield[@code='e']">
540 <mads:descriptionStandard>
541 <xsl:value-of select="."/>
542 </mads:descriptionStandard>
545 <!-- ========== classification 2.03 ========== -->
547 <xsl:template match="marc:datafield[@tag=053]">
548 <mads:classification>
549 <xsl:value-of select="."/>
550 </mads:classification>
552 <xsl:template match="marc:datafield[@tag=055]">
553 <mads:classification>
554 <xsl:value-of select="."/>
555 </mads:classification>
557 <xsl:template match="marc:datafield[@tag=060]">
558 <mads:classification>
559 <xsl:value-of select="."/>
560 </mads:classification>
562 <xsl:template match="marc:datafield[@tag=065]">
563 <mads:classification>
564 <xsl:value-of select="."/>
565 </mads:classification>
567 <xsl:template match="marc:datafield[@tag=070]">
568 <mads:classification>
569 <xsl:value-of select="."/>
570 </mads:classification>
572 <xsl:template match="marc:datafield[@tag=080]">
573 <mads:classification>
574 <xsl:value-of select="."/>
575 </mads:classification>
577 <xsl:template match="marc:datafield[@tag=082]">
578 <mads:classification>
579 <xsl:value-of select="."/>
580 </mads:classification>
582 <xsl:template match="marc:datafield[@tag=083]">
583 <mads:classification>
584 <xsl:value-of select="."/>
585 </mads:classification>
587 <xsl:template match="marc:datafield[@tag=086]">
588 <mads:classification>
589 <xsl:value-of select="."/>
590 </mads:classification>
592 <xsl:template match="marc:datafield[@tag=087]">
593 <mads:classification>
594 <xsl:value-of select="."/>
595 </mads:classification>
599 <!-- ========== names ========== -->
600 <xsl:template match="marc:datafield[@tag=100]">
601 <mads:name type="personal">
602 <xsl:call-template name="setAuthority"/>
603 <xsl:call-template name="nameABCDQ"/>
605 <xsl:apply-templates select="*[marc:subfield[not(contains('abcdeq',@code))]]"/>
606 <xsl:call-template name="title"/>
607 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
610 <xsl:template match="marc:datafield[@tag=110]">
611 <mads:name type="corporate">
612 <xsl:call-template name="setAuthority"/>
613 <xsl:call-template name="nameABCDN"/>
615 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
618 <xsl:template match="marc:datafield[@tag=111]">
619 <mads:name type="conference">
620 <xsl:call-template name="setAuthority"/>
621 <xsl:call-template name="nameACDENQ"/>
623 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
626 <xsl:template match="marc:datafield[@tag=400]">
628 <xsl:call-template name="variantTypeAttribute"/>
629 <mads:name type="personal">
630 <xsl:call-template name="nameABCDQ"/>
632 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
633 <xsl:call-template name="title"/>
637 <xsl:template match="marc:datafield[@tag=410]">
639 <xsl:call-template name="variantTypeAttribute"/>
640 <mads:name type="corporate">
641 <xsl:call-template name="nameABCDN"/>
643 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
647 <xsl:template match="marc:datafield[@tag=411]">
649 <xsl:call-template name="variantTypeAttribute"/>
650 <mads:name type="conference">
651 <xsl:call-template name="nameACDENQ"/>
653 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
657 <xsl:template match="marc:datafield[@tag=500]|marc:datafield[@tag=700]">
659 <xsl:call-template name="relatedTypeAttribute"/>
660 <!-- <xsl:call-template name="uri"/> -->
661 <mads:name type="personal">
662 <xsl:call-template name="setAuthority"/>
663 <xsl:call-template name="nameABCDQ"/>
665 <xsl:call-template name="title"/>
666 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
670 <xsl:template match="marc:datafield[@tag=510]|marc:datafield[@tag=710]">
672 <xsl:call-template name="relatedTypeAttribute"/>
673 <!-- <xsl:call-template name="uri"/> -->
674 <mads:name type="corporate">
675 <xsl:call-template name="setAuthority"/>
676 <xsl:call-template name="nameABCDN"/>
678 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
682 <xsl:template match="marc:datafield[@tag=511]|marc:datafield[@tag=711]">
684 <xsl:call-template name="relatedTypeAttribute"/>
685 <!-- <xsl:call-template name="uri"/> -->
686 <mads:name type="conference">
687 <xsl:call-template name="setAuthority"/>
688 <xsl:call-template name="nameACDENQ"/>
690 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
694 <!-- ========== titles ========== -->
695 <xsl:template match="marc:datafield[@tag=130]">
696 <xsl:call-template name="uniform-title"/>
697 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
700 <xsl:template match="marc:datafield[@tag=430]">
702 <xsl:call-template name="variantTypeAttribute"/>
703 <xsl:call-template name="uniform-title"/>
704 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
708 <xsl:template match="marc:datafield[@tag=530]|marc:datafield[@tag=730]">
710 <xsl:call-template name="relatedTypeAttribute"/>
711 <xsl:call-template name="uniform-title"/>
712 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
716 <xsl:template name="title">
717 <xsl:variable name="hasTitle">
718 <xsl:for-each select="marc:subfield">
719 <xsl:if test="(contains('tfghklmors',@code) )">
720 <xsl:value-of select="@code"/>
724 <xsl:if test="string-length($hasTitle) > 0 ">
726 <xsl:call-template name="setAuthority"/>
728 <xsl:variable name="str">
729 <xsl:for-each select="marc:subfield">
730 <xsl:if test="(contains('atfghklmors',@code) )">
731 <xsl:value-of select="text()"/>
732 <xsl:text> </xsl:text>
736 <xsl:call-template name="chopPunctuation">
737 <xsl:with-param name="chopString">
738 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
742 <xsl:call-template name="part"/>
743 <!-- <xsl:call-template name="uri"/> -->
748 <xsl:template name="uniform-title">
749 <xsl:variable name="hasTitle">
750 <xsl:for-each select="marc:subfield">
751 <xsl:if test="(contains('atfghklmors',@code) )">
752 <xsl:value-of select="@code"/>
756 <xsl:if test="string-length($hasTitle) > 0 ">
758 <xsl:call-template name="setAuthority"/>
760 <xsl:variable name="str">
761 <xsl:for-each select="marc:subfield">
762 <xsl:if test="(contains('adfghklmors',@code) )">
763 <xsl:value-of select="text()"/>
764 <xsl:text> </xsl:text>
768 <xsl:call-template name="chopPunctuation">
769 <xsl:with-param name="chopString">
770 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
774 <xsl:call-template name="part"/>
775 <!-- <xsl:call-template name="uri"/> -->
781 <!-- ========== topics ========== -->
782 <xsl:template match="marc:subfield[@code='x']">
784 <xsl:call-template name="chopPunctuation">
785 <xsl:with-param name="chopString">
786 <xsl:value-of select="."/>
794 match="marc:datafield[@tag=150][marc:subfield[@code='a' or @code='b']]|marc:datafield[@tag=180][marc:subfield[@code='x']]">
795 <xsl:call-template name="topic"/>
796 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
799 match="marc:datafield[@tag=450][marc:subfield[@code='a' or @code='b']]|marc:datafield[@tag=480][marc:subfield[@code='x']]">
801 <xsl:call-template name="variantTypeAttribute"/>
802 <xsl:call-template name="topic"/>
806 match="marc:datafield[@tag=550 or @tag=750][marc:subfield[@code='a' or @code='b']]">
808 <xsl:call-template name="relatedTypeAttribute"/>
809 <!-- <xsl:call-template name="uri"/> -->
810 <xsl:call-template name="topic"/>
811 <xsl:apply-templates select="marc:subfield[@code='z']"/>
814 <xsl:template name="topic">
816 <xsl:call-template name="setAuthority"/>
817 <!-- tmee2006 dedupe 550a
818 <xsl:if test="@tag=550 or @tag=750">
819 <xsl:call-template name="subfieldSelect">
820 <xsl:with-param name="codes">ab</xsl:with-param>
825 <xsl:when test="@tag=180 or @tag=480 or @tag=580 or @tag=780">
826 <xsl:call-template name="chopPunctuation">
827 <xsl:with-param name="chopString">
828 <xsl:apply-templates select="marc:subfield[@code='x']"/>
833 <xsl:call-template name="chopPunctuation">
834 <xsl:with-param name="chopString">
836 <xsl:when test="@tag=180 or @tag=480 or @tag=580 or @tag=780">
837 <xsl:apply-templates select="marc:subfield[@code='x']"/>
840 <xsl:call-template name="subfieldSelect">
841 <xsl:with-param name="codes">ab</xsl:with-param>
850 <!-- ========= temporals ========== -->
851 <xsl:template match="marc:subfield[@code='y']">
853 <xsl:call-template name="chopPunctuation">
854 <xsl:with-param name="chopString">
855 <xsl:value-of select="."/>
861 match="marc:datafield[@tag=148][marc:subfield[@code='a']]|marc:datafield[@tag=182 ][marc:subfield[@code='y']]">
862 <xsl:call-template name="temporal"/>
865 match="marc:datafield[@tag=448][marc:subfield[@code='a']]|marc:datafield[@tag=482][marc:subfield[@code='y']]">
867 <xsl:call-template name="variantTypeAttribute"/>
868 <xsl:call-template name="temporal"/>
872 match="marc:datafield[@tag=548 or @tag=748][marc:subfield[@code='a']]|marc:datafield[@tag=582 or @tag=782][marc:subfield[@code='y']]">
874 <xsl:call-template name="relatedTypeAttribute"/>
875 <!-- <xsl:call-template name="uri"/> -->
876 <xsl:call-template name="temporal"/>
879 <xsl:template name="temporal">
881 <xsl:call-template name="setAuthority"/>
882 <xsl:if test="@tag=548 or @tag=748">
883 <xsl:value-of select="marc:subfield[@code='a']"/>
885 <xsl:call-template name="chopPunctuation">
886 <xsl:with-param name="chopString">
888 <xsl:when test="@tag=182 or @tag=482 or @tag=582 or @tag=782">
889 <xsl:apply-templates select="marc:subfield[@code='y']"/>
892 <xsl:value-of select="marc:subfield[@code='a']"/>
898 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
901 <!-- ========== genre ========== -->
902 <xsl:template match="marc:subfield[@code='v']">
904 <xsl:call-template name="chopPunctuation">
905 <xsl:with-param name="chopString">
906 <xsl:value-of select="."/>
912 match="marc:datafield[@tag=155][marc:subfield[@code='a']]|marc:datafield[@tag=185][marc:subfield[@code='v']]">
913 <xsl:call-template name="genre"/>
916 match="marc:datafield[@tag=455][marc:subfield[@code='a']]|marc:datafield[@tag=485 ][marc:subfield[@code='v']]">
918 <xsl:call-template name="variantTypeAttribute"/>
919 <xsl:call-template name="genre"/>
923 <xsl:template match="marc:datafield[@tag=555]">
925 <xsl:call-template name="relatedTypeAttribute"/>
926 <xsl:call-template name="uri"/>
927 <xsl:call-template name="genre"/>
932 match="marc:datafield[@tag=555 or @tag=755][marc:subfield[@code='a']]|marc:datafield[@tag=585][marc:subfield[@code='v']]">
934 <xsl:call-template name="relatedTypeAttribute"/>
935 <xsl:call-template name="genre"/>
938 <xsl:template name="genre">
940 <xsl:if test="@tag=555">
941 <xsl:value-of select="marc:subfield[@code='a']"/>
943 <xsl:call-template name="setAuthority"/>
944 <xsl:call-template name="chopPunctuation">
945 <xsl:with-param name="chopString">
948 <xsl:when test="@tag='555'"/>
949 <xsl:when test="@tag=185 or @tag=485 or @tag=585">
950 <xsl:apply-templates select="marc:subfield[@code='v']"/>
953 <xsl:value-of select="marc:subfield[@code='a']"/>
959 <xsl:apply-templates/>
962 <!-- ========= geographic ========== -->
963 <xsl:template match="marc:subfield[@code='z']">
965 <xsl:call-template name="chopPunctuation">
966 <xsl:with-param name="chopString">
967 <xsl:value-of select="."/>
972 <xsl:template name="geographic">
974 <xsl:if test="@tag=551">
975 <xsl:value-of select="marc:subfield[@code='a']"/>
977 <xsl:call-template name="setAuthority"/>
978 <xsl:call-template name="chopPunctuation">
979 <xsl:with-param name="chopString">
981 <xsl:when test="@tag=181 or @tag=481 or @tag=581">
982 <xsl:apply-templates select="marc:subfield[@code='z']"/>
985 <xsl:value-of select="marc:subfield[@code='a']"/>
991 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
994 match="marc:datafield[@tag=151][marc:subfield[@code='a']]|marc:datafield[@tag=181][marc:subfield[@code='z']]">
995 <xsl:call-template name="geographic"/>
998 match="marc:datafield[@tag=451][marc:subfield[@code='a']]|marc:datafield[@tag=481][marc:subfield[@code='z']]">
1000 <xsl:call-template name="variantTypeAttribute"/>
1001 <xsl:call-template name="geographic"/>
1005 match="marc:datafield[@tag=551]|marc:datafield[@tag=581][marc:subfield[@code='z']]">
1007 <xsl:call-template name="relatedTypeAttribute"/>
1008 <!-- <xsl:call-template name="uri"/> -->
1009 <xsl:call-template name="geographic"/>
1012 <xsl:template match="marc:datafield[@tag=580]">
1014 <xsl:call-template name="relatedTypeAttribute"/>
1015 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
1019 match="marc:datafield[@tag=751][marc:subfield[@code='z']]|marc:datafield[@tag=781][marc:subfield[@code='z']]">
1021 <xsl:call-template name="relatedTypeAttribute"/>
1022 <xsl:call-template name="geographic"/>
1025 <xsl:template match="marc:datafield[@tag=755]">
1027 <xsl:call-template name="relatedTypeAttribute"/>
1028 <xsl:call-template name="genre"/>
1029 <xsl:call-template name="setAuthority"/>
1030 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
1033 <xsl:template match="marc:datafield[@tag=780]">
1035 <xsl:call-template name="relatedTypeAttribute"/>
1036 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
1039 <xsl:template match="marc:datafield[@tag=785]">
1041 <xsl:call-template name="relatedTypeAttribute"/>
1042 <xsl:apply-templates select="marc:subfield[@code!='i']"/>
1046 <!-- ========== notes ========== -->
1047 <xsl:template match="marc:datafield[667 <= @tag and @tag <= 688]">
1050 <xsl:when test="@tag=667">
1051 <xsl:attribute name="type">nonpublic</xsl:attribute>
1053 <xsl:when test="@tag=670">
1054 <xsl:attribute name="type">source</xsl:attribute>
1056 <xsl:when test="@tag=675">
1057 <xsl:attribute name="type">notFound</xsl:attribute>
1059 <xsl:when test="@tag=678">
1060 <xsl:attribute name="type">history</xsl:attribute>
1062 <xsl:when test="@tag=681">
1063 <xsl:attribute name="type">subject example</xsl:attribute>
1065 <xsl:when test="@tag=682">
1066 <xsl:attribute name="type">deleted heading information</xsl:attribute>
1068 <xsl:when test="@tag=688">
1069 <xsl:attribute name="type">application history</xsl:attribute>
1072 <xsl:call-template name="chopPunctuation">
1073 <xsl:with-param name="chopString">
1075 <xsl:when test="@tag=667 or @tag=675">
1076 <xsl:value-of select="marc:subfield[@code='a']"/>
1078 <xsl:when test="@tag=670 or @tag=678">
1079 <xsl:call-template name="subfieldSelect">
1080 <xsl:with-param name="codes">ab</xsl:with-param>
1081 </xsl:call-template>
1083 <xsl:when test="680 <= @tag and @tag <=688">
1084 <xsl:call-template name="subfieldSelect">
1085 <xsl:with-param name="codes">ai</xsl:with-param>
1086 </xsl:call-template>
1090 </xsl:call-template>
1094 <!-- ========== url ========== -->
1095 <xsl:template match="marc:datafield[@tag=856][marc:subfield[@code='u']]">
1097 <xsl:if test="marc:subfield[@code='z' or @code='3']">
1098 <xsl:attribute name="displayLabel">
1099 <xsl:call-template name="subfieldSelect">
1100 <xsl:with-param name="codes">z3</xsl:with-param>
1101 </xsl:call-template>
1104 <xsl:value-of select="marc:subfield[@code='u']"/>
1108 <xsl:template name="relatedTypeAttribute">
1111 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">
1112 <xsl:if test="substring(marc:subfield[@code='w'],1,1)='a'">
1113 <xsl:attribute name="type">earlier</xsl:attribute>
1115 <xsl:if test="substring(marc:subfield[@code='w'],1,1)='b'">
1116 <xsl:attribute name="type">later</xsl:attribute>
1118 <xsl:if test="substring(marc:subfield[@code='w'],1,1)='t'">
1119 <xsl:attribute name="type">parentOrg</xsl:attribute>
1121 <xsl:if test="substring(marc:subfield[@code='w'],1,1)='g'">
1122 <xsl:attribute name="type">broader</xsl:attribute>
1124 <xsl:if test="substring(marc:subfield[@code='w'],1,1)='h'">
1125 <xsl:attribute name="type">narrower</xsl:attribute>
1127 <xsl:if test="substring(marc:subfield[@code='w'],1,1)='r'">
1128 <xsl:attribute name="type">other</xsl:attribute>
1130 <xsl:if test="contains('fin|', substring(marc:subfield[@code='w'],1,1))">
1131 <xsl:attribute name="type">other</xsl:attribute>
1134 <xsl:when test="@tag=530 or @tag=730">
1135 <xsl:attribute name="type">other</xsl:attribute>
1139 <xsl:attribute name="type">equivalent</xsl:attribute>
1142 <xsl:apply-templates select="marc:subfield[@code='i']"/>
1145 <xsl:template name="variantTypeAttribute">
1148 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">
1149 <xsl:if test="substring(marc:subfield[@code='w'],1,1)='d'">
1150 <xsl:attribute name="type">acronym</xsl:attribute>
1152 <xsl:if test="substring(marc:subfield[@code='w'],1,1)='n'">
1153 <xsl:attribute name="type">other</xsl:attribute>
1155 <xsl:if test="contains('fit', substring(marc:subfield[@code='w'],1,1))">
1156 <xsl:attribute name="type">other</xsl:attribute>
1161 <xsl:attribute name="type">other</xsl:attribute>
1164 <xsl:apply-templates select="marc:subfield[@code='i']"/>
1167 <xsl:template name="setAuthority">
1169 <!-- can be called from the datafield or subfield level, so "..//@tag" means
1170 the tag can be at the subfield's parent level or at the datafields own level -->
1173 test="ancestor-or-self::marc:datafield/@tag=100 and (@ind1=0 or @ind1=1) and $controlField008-11='a' and $controlField008-14='a'">
1174 <xsl:attribute name="authority">
1175 <xsl:text>naf</xsl:text>
1179 test="ancestor-or-self::marc:datafield/@tag=100 and (@ind1=0 or @ind1=1) and $controlField008-11='a' and $controlField008-14='b'">
1180 <xsl:attribute name="authority">
1181 <xsl:text>lcsh</xsl:text>
1185 test="ancestor-or-self::marc:datafield/@tag=100 and (@ind1=0 or @ind1=1) and $controlField008-11='k'">
1186 <xsl:attribute name="authority">
1187 <xsl:text>lacnaf</xsl:text>
1191 test="ancestor-or-self::marc:datafield/@tag=100 and @ind1=3 and $controlField008-11='a' and $controlField008-14='b'">
1192 <xsl:attribute name="authority">
1193 <xsl:text>lcsh</xsl:text>
1197 test="ancestor-or-self::marc:datafield/@tag=100 and @ind1=3 and $controlField008-11='k' and $controlField008-14='b'">
1198 <xsl:attribute name="authority">cash</xsl:attribute>
1201 test="ancestor-or-self::marc:datafield/@tag=110 and $controlField008-11='a' and $controlField008-14='a'">
1202 <xsl:attribute name="authority">naf</xsl:attribute>
1205 test="ancestor-or-self::marc:datafield/@tag=110 and $controlField008-11='a' and $controlField008-14='b'">
1206 <xsl:attribute name="authority">lcsh</xsl:attribute>
1209 test="ancestor-or-self::marc:datafield/@tag=110 and $controlField008-11='k' and $controlField008-14='a'">
1210 <xsl:attribute name="authority">
1211 <xsl:text>lacnaf</xsl:text>
1215 test="ancestor-or-self::marc:datafield/@tag=110 and $controlField008-11='k' and $controlField008-14='b'">
1216 <xsl:attribute name="authority">
1217 <xsl:text>cash</xsl:text>
1221 test="100 <= ancestor-or-self::marc:datafield/@tag and ancestor-or-self::marc:datafield/@tag <= 155 and $controlField008-11='b'">
1222 <xsl:attribute name="authority">
1223 <xsl:text>lcshcl</xsl:text>
1227 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'">
1228 <xsl:attribute name="authority">
1229 <xsl:text>nlmnaf</xsl:text>
1233 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'">
1234 <xsl:attribute name="authority">
1235 <xsl:text>nalnaf</xsl:text>
1239 test="100 <= ancestor-or-self::marc:datafield/@tag and ancestor-or-self::marc:datafield/@tag <= 155 and $controlField008-11='r'">
1240 <xsl:attribute name="authority">
1241 <xsl:text>aat</xsl:text>
1245 test="100 <= ancestor-or-self::marc:datafield/@tag and ancestor-or-self::marc:datafield/@tag <= 155 and $controlField008-11='s'">
1246 <xsl:attribute name="authority">sears</xsl:attribute>
1249 test="100 <= ancestor-or-self::marc:datafield/@tag and ancestor-or-self::marc:datafield/@tag <= 155 and $controlField008-11='v'">
1250 <xsl:attribute name="authority">rvm</xsl:attribute>
1253 test="100 <= ancestor-or-self::marc:datafield/@tag and ancestor-or-self::marc:datafield/@tag <= 155 and $controlField008-11='z'">
1254 <xsl:attribute name="authority">
1256 select="../marc:datafield[ancestor-or-self::marc:datafield/@tag=040]/marc:subfield[@code='f']"
1261 test="(ancestor-or-self::marc:datafield/@tag=111 or ancestor-or-self::marc:datafield/@tag=130) and $controlField008-11='a' and $controlField008-14='a'">
1262 <xsl:attribute name="authority">
1263 <xsl:text>naf</xsl:text>
1267 test="(ancestor-or-self::marc:datafield/@tag=111 or ancestor-or-self::marc:datafield/@tag=130) and $controlField008-11='a' and $controlField008-14='b'">
1268 <xsl:attribute name="authority">
1269 <xsl:text>lcsh</xsl:text>
1273 test="(ancestor-or-self::marc:datafield/@tag=111 or ancestor-or-self::marc:datafield/@tag=130) and $controlField008-11='k' ">
1274 <xsl:attribute name="authority">
1275 <xsl:text>lacnaf</xsl:text>
1279 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' ">
1280 <xsl:attribute name="authority">
1281 <xsl:text>lcsh</xsl:text>
1285 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' ">
1286 <xsl:attribute name="authority">
1287 <xsl:text>lcsh</xsl:text>
1291 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' ">
1292 <xsl:attribute name="authority">
1293 <xsl:text>mesh</xsl:text>
1297 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' ">
1298 <xsl:attribute name="authority">
1299 <xsl:text>nal</xsl:text>
1303 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' ">
1304 <xsl:attribute name="authority">
1305 <xsl:text>cash</xsl:text>
1309 test="ancestor-or-self::marc:datafield/@tag=151 and $controlField008-11='a' and $controlField008-14='a'">
1310 <xsl:attribute name="authority">
1311 <xsl:text>naf</xsl:text>
1315 test="ancestor-or-self::marc:datafield/@tag=151 and $controlField008-11='a' and $controlField008-14='b'">
1316 <xsl:attribute name="authority">lcsh</xsl:attribute>
1319 test="ancestor-or-self::marc:datafield/@tag=151 and $controlField008-11='k' and $controlField008-14='a'">
1320 <xsl:attribute name="authority">lacnaf</xsl:attribute>
1323 test="ancestor-or-self::marc:datafield/@tag=151 and $controlField008-11='k' and $controlField008-14='b'">
1324 <xsl:attribute name="authority">cash</xsl:attribute>
1327 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'">
1328 <xsl:attribute name="authority">lcsh</xsl:attribute>
1331 test="ancestor-or-self::marc:datafield/@tag=700 and (@ind1='0' or @ind1='1') and @ind2='0'">
1332 <xsl:attribute name="authority">naf</xsl:attribute>
1335 test="ancestor-or-self::marc:datafield/@tag=700 and (@ind1='0' or @ind1='1') and @ind2='5'">
1336 <xsl:attribute name="authority">lacnaf</xsl:attribute>
1338 <xsl:when test="ancestor-or-self::marc:datafield/@tag=700 and @ind1='3' and @ind2='0'">
1339 <xsl:attribute name="authority">lcsh</xsl:attribute>
1341 <xsl:when test="ancestor-or-self::marc:datafield/@tag=700 and @ind1='3' and @ind2='5'">
1342 <xsl:attribute name="authority">cash</xsl:attribute>
1345 test="(700 <= ancestor-or-self::marc:datafield/@tag and ancestor-or-self::marc:datafield/@tag <= 755 ) and @ind2='1'">
1346 <xsl:attribute name="authority">lcshcl</xsl:attribute>
1349 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'">
1350 <xsl:attribute name="authority">nlmnaf</xsl:attribute>
1353 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'">
1354 <xsl:attribute name="authority">nalnaf</xsl:attribute>
1357 test="(700 <= ancestor-or-self::marc:datafield/@tag and ancestor-or-self::marc:datafield/@tag <= 755 ) and @ind2='6'">
1358 <xsl:attribute name="authority">rvm</xsl:attribute>
1361 test="(700 <= ancestor-or-self::marc:datafield/@tag and ancestor-or-self::marc:datafield/@tag <= 755 ) and @ind2='7'">
1362 <xsl:attribute name="authority">
1363 <xsl:value-of select="marc:subfield[@code='2']"/>
1367 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'">
1368 <xsl:attribute name="authority">lacnaf</xsl:attribute>
1371 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'">
1372 <xsl:attribute name="authority">naf</xsl:attribute>
1375 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'">
1376 <xsl:attribute name="authority">lcsh</xsl:attribute>
1379 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'">
1380 <xsl:attribute name="authority">mesh</xsl:attribute>
1383 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'">
1384 <xsl:attribute name="authority">nal</xsl:attribute>
1387 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'">
1388 <xsl:attribute name="authority">cash</xsl:attribute>
1392 <xsl:template match="*"/>