1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2006-10-04 11:21:48 marc Exp $ -->
3 <xsl:stylesheet version="1.0"
4 xmlns:marc="http://www.loc.gov/MARC21/slim"
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
7 exclude-result-prefixes="marc">
8 <xsl:import href="MARC21slimUtils.xsl"/>
9 <xsl:output method="xml" indent="yes"/>
11 <xsl:template match="/">
12 <xsl:apply-templates/>
15 <xsl:template match="marc:record">
16 <xsl:variable name="leader" select="marc:leader"/>
17 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
18 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
19 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
22 <xsl:for-each select="marc:datafield[@tag=245]">
24 <xsl:call-template name="subfieldSelect">
25 <xsl:with-param name="codes">abfghk</xsl:with-param>
31 <xsl:for-each select="marc:datafield[@tag=100]|marc:datafield[@tag=110]|marc:datafield[@tag=111]|marc:datafield[@tag=700]|marc:datafield[@tag=710]|marc:datafield[@tag=711]|marc:datafield[@tag=720]">
33 <xsl:value-of select="."/>
38 <xsl:if test="$leader7='c'">
39 <xsl:attribute name="collection">yes</xsl:attribute>
42 <xsl:if test="$leader6='d' or $leader6='f' or $leader6='p' or $leader6='t'">
43 <xsl:attribute name="manuscript">yes</xsl:attribute>
47 <xsl:when test="$leader6='a' or $leader6='t'">text</xsl:when>
48 <xsl:when test="$leader6='e' or $leader6='f'">cartographic</xsl:when>
49 <xsl:when test="$leader6='c' or $leader6='d'">notated music</xsl:when>
50 <xsl:when test="$leader6='i' or $leader6='j'">sound recording</xsl:when>
51 <xsl:when test="$leader6='k'">still image</xsl:when>
52 <xsl:when test="$leader6='g'">moving image</xsl:when>
53 <xsl:when test="$leader6='r'">three dimensional object</xsl:when>
54 <xsl:when test="$leader6='m'">software, multimedia</xsl:when>
55 <xsl:when test="$leader6='p'">mixed material</xsl:when>
59 <xsl:for-each select="marc:datafield[@tag=655]">
61 <xsl:value-of select="."/>
65 <xsl:for-each select="marc:datafield[@tag=260]">
67 <xsl:call-template name="subfieldSelect">
68 <xsl:with-param name="codes">ab</xsl:with-param>
73 <xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='c']">
75 <xsl:value-of select="."/>
80 <xsl:value-of select="substring($controlField008,36,3)"/>
83 <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q']">
85 <xsl:value-of select="."/>
89 <xsl:for-each select="marc:datafield[@tag=520]">
91 <xsl:value-of select="marc:subfield[@code='a']"/>
95 <xsl:for-each select="marc:datafield[@tag=521]">
97 <xsl:value-of select="marc:subfield[@code='a']"/>
101 <xsl:for-each select="marc:datafield[500<@tag][@tag<=599][not(@tag=506 or @tag=530 or @tag=540 or @tag=546)]">
103 <xsl:value-of select="marc:subfield[@code='a']"/>
107 <xsl:for-each select="marc:datafield[@tag=600]">
109 <xsl:call-template name="subfieldSelect">
110 <xsl:with-param name="codes">abcdq</xsl:with-param>
115 <xsl:for-each select="marc:datafield[@tag=610]">
117 <xsl:call-template name="subfieldSelect">
118 <xsl:with-param name="codes">abcdq</xsl:with-param>
123 <xsl:for-each select="marc:datafield[@tag=611]">
125 <xsl:call-template name="subfieldSelect">
126 <xsl:with-param name="codes">abcdq</xsl:with-param>
131 <xsl:for-each select="marc:datafield[@tag=630]">
133 <xsl:call-template name="subfieldSelect">
134 <xsl:with-param name="codes">abcdq</xsl:with-param>
139 <xsl:for-each select="marc:datafield[@tag=650]">
141 <xsl:call-template name="subfieldSelect">
142 <xsl:with-param name="codes">abcdq</xsl:with-param>
147 <xsl:for-each select="marc:datafield[@tag=653]">
149 <xsl:call-template name="subfieldSelect">
150 <xsl:with-param name="codes">abcdq</xsl:with-param>
155 <xsl:for-each select="marc:datafield[@tag=752]">
157 <xsl:call-template name="subfieldSelect">
158 <xsl:with-param name="codes">abcd</xsl:with-param>
163 <xsl:for-each select="marc:datafield[@tag=530]">
164 <dc:relation type="original">
165 <xsl:call-template name="subfieldSelect">
166 <xsl:with-param name="codes">abcdu</xsl:with-param>
171 <xsl:for-each select="marc:datafield[@tag=760]|marc:datafield[@tag=762]|marc:datafield[@tag=765]|marc:datafield[@tag=767]|marc:datafield[@tag=770]|marc:datafield[@tag=772]|marc:datafield[@tag=773]|marc:datafield[@tag=774]|marc:datafield[@tag=775]|marc:datafield[@tag=776]|marc:datafield[@tag=777]|marc:datafield[@tag=780]|marc:datafield[@tag=785]|marc:datafield[@tag=786]|marc:datafield[@tag=787]">
173 <xsl:call-template name="subfieldSelect">
174 <xsl:with-param name="codes">ot</xsl:with-param>
179 <xsl:for-each select="marc:datafield[@tag=856]">
181 <xsl:value-of select="marc:subfield[@code='u']"/>
185 <xsl:for-each select="marc:datafield[@tag=506]">
187 <xsl:value-of select="marc:subfield[@code='a']"/>
191 <xsl:for-each select="marc:datafield[@tag=540]">
193 <xsl:value-of select="marc:subfield[@code='a']"/>