1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:srw_dc="info:srw/schema/1/dc-schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
\r
3 <xsl:import href="MARC21slimUtils.xsl"/>
\r
4 <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
\r
5 <!-- modification log
\r
6 NT 01/04: added collection level element
\r
7 and removed attributes
\r
9 JR 06/04: Added ISBN identifier
\r
11 JR 09/05: Added additional <subject> subfields and 651 for <coverage>
\r
12 RG 10/07/05: Corrected subject subfields; 10/12/05: added if statement for <language>
\r
13 JR 05/05/06: Updated the schemaLocation
\r
15 <xsl:template match="/">
\r
16 <xsl:if test="marc:collection">
\r
17 <srw_dc:dcCollection xmlns:srw_dc="info:srw/schema/1/dc-schema" xsi:schemaLocation="info:srw/schema/1/dc-schema http://www.loc.gov/standards/sru/dc-schema.xsd">
\r
18 <xsl:for-each select="marc:collection">
\r
19 <xsl:for-each select="marc:record">
\r
21 <xsl:apply-templates select="."/>
\r
25 </srw_dc:dcCollection>
\r
27 <xsl:if test="marc:record">
\r
28 <srw_dc:dc xmlns:srw_dc="info:srw/schema/1/dc-schema" xsi:schemaLocation="info:srw/schema/1/dc-schema http://www.loc.gov/standards/sru/dc-schema.xsd">
\r
29 <xsl:apply-templates select="marc:record"/>
\r
33 <xsl:template match="marc:record">
\r
34 <xsl:variable name="leader" select="marc:leader"/>
\r
35 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
\r
36 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
\r
37 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
\r
38 <xsl:for-each select="marc:datafield[@tag=245]">
\r
40 <xsl:call-template name="subfieldSelect">
\r
41 <xsl:with-param name="codes">abfghk</xsl:with-param>
\r
42 </xsl:call-template>
\r
45 <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]">
\r
47 <xsl:value-of select="normalize-space(.)"/>
\r
51 <xsl:if test="$leader7='c'">
\r
52 <!-- nt fix 1/04 -->
\r
53 <!--<xsl:attribute name="collection">yes</xsl:attribute>-->
\r
54 <xsl:text>collection</xsl:text>
\r
56 <xsl:if test="$leader6='d' or $leader6='f' or $leader6='p' or $leader6='t'">
\r
57 <!-- nt fix 1/04 -->
\r
58 <!--<xsl:attribute name="manuscript">yes</xsl:attribute> -->
\r
59 <xsl:text>manuscript</xsl:text>
\r
62 <xsl:when test="$leader6='a' or $leader6='t'">text</xsl:when>
\r
63 <xsl:when test="$leader6='e' or $leader6='f'">cartographic</xsl:when>
\r
64 <xsl:when test="$leader6='c' or $leader6='d'">notated music</xsl:when>
\r
65 <xsl:when test="$leader6='i' or $leader6='j'">sound recording</xsl:when>
\r
66 <xsl:when test="$leader6='k'">still image</xsl:when>
\r
67 <xsl:when test="$leader6='g'">moving image</xsl:when>
\r
68 <xsl:when test="$leader6='r'">three dimensional object</xsl:when>
\r
69 <xsl:when test="$leader6='m'">software, multimedia</xsl:when>
\r
70 <xsl:when test="$leader6='p'">mixed material</xsl:when>
\r
73 <xsl:for-each select="marc:datafield[@tag=655]">
\r
75 <xsl:value-of select="normalize-space(.)"/>
\r
78 <xsl:for-each select="marc:datafield[@tag=260]">
\r
80 <xsl:call-template name="subfieldSelect">
\r
81 <xsl:with-param name="codes">ab</xsl:with-param>
\r
82 </xsl:call-template>
\r
85 <xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='c']">
\r
87 <xsl:value-of select="."/>
\r
90 <xsl:if test="substring($controlField008,36,3)">
\r
92 <xsl:value-of select="substring($controlField008,36,3)"/>
\r
95 <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q']">
\r
97 <xsl:value-of select="."/>
\r
100 <xsl:for-each select="marc:datafield[@tag=520]">
\r
102 <!-- nt fix 01/04 -->
\r
103 <xsl:value-of select="normalize-space(marc:subfield[@code='a'])"/>
\r
106 <xsl:for-each select="marc:datafield[@tag=521]">
\r
108 <xsl:value-of select="marc:subfield[@code='a']"/>
\r
111 <xsl:for-each select="marc:datafield[500<@tag][@tag<=599][not(@tag=506 or @tag=530 or @tag=540 or @tag=546)]">
\r
113 <xsl:value-of select="marc:subfield[@code='a']"/>
\r
116 <xsl:for-each select="marc:datafield[@tag=600]">
\r
118 <xsl:call-template name="subfieldSelect">
\r
119 <xsl:with-param name="codes">abcdefghjklmnopqrstu4</xsl:with-param>
\r
120 </xsl:call-template>
\r
121 <xsl:if test="marc:subfield[@code='v' or @code='x' or @code='y' or @code='z']">
\r
122 <xsl:text>--</xsl:text>
\r
123 <xsl:call-template name="subfieldSelect">
\r
124 <xsl:with-param name="codes">vxyz</xsl:with-param>
\r
125 <xsl:with-param name="delimeter">--</xsl:with-param>
\r
126 </xsl:call-template>
\r
130 <xsl:for-each select="marc:datafield[@tag=610]">
\r
132 <xsl:call-template name="subfieldSelect">
\r
133 <xsl:with-param name="codes">abcdefghklmnoprstu4</xsl:with-param>
\r
134 </xsl:call-template>
\r
135 <xsl:if test="marc:subfield[@code='v' or @code='x' or @code='y' or
\r
137 <xsl:text>--</xsl:text>
\r
138 <xsl:call-template name="subfieldSelect">
\r
139 <xsl:with-param name="codes">vxyz</xsl:with-param>
\r
140 <xsl:with-param name="delimeter">--</xsl:with-param>
\r
141 </xsl:call-template>
\r
145 <xsl:for-each select="marc:datafield[@tag=611]">
\r
147 <xsl:call-template name="subfieldSelect">
\r
148 <xsl:with-param name="codes">acdefghklnpqstu4</xsl:with-param>
\r
149 </xsl:call-template>
\r
150 <xsl:if test="marc:subfield[@code='v' or @code='x' or @code='y' or
\r
152 <xsl:text>--</xsl:text>
\r
153 <xsl:call-template name="subfieldSelect">
\r
154 <xsl:with-param name="codes">vxyz</xsl:with-param>
\r
155 <xsl:with-param name="delimeter">--</xsl:with-param>
\r
156 </xsl:call-template>
\r
160 <xsl:for-each select="marc:datafield[@tag=630]">
\r
162 <xsl:call-template name="subfieldSelect">
\r
163 <xsl:with-param name="codes">adfghklmnoprst</xsl:with-param>
\r
164 </xsl:call-template>
\r
165 <xsl:if test="marc:subfield[@code='v' or @code='x' or @code='y' or
\r
167 <xsl:text>--</xsl:text>
\r
168 <xsl:call-template name="subfieldSelect">
\r
169 <xsl:with-param name="codes">vxyz</xsl:with-param>
\r
170 <xsl:with-param name="delimeter">--</xsl:with-param>
\r
171 </xsl:call-template>
\r
175 <xsl:for-each select="marc:datafield[@tag=650]">
\r
177 <xsl:call-template name="subfieldSelect">
\r
178 <xsl:with-param name="codes">ae</xsl:with-param></xsl:call-template>
\r
179 <xsl:if test="marc:subfield[@code='v' or @code='x' or @code='y' or
\r
181 <xsl:text>--</xsl:text>
\r
182 <xsl:call-template name="subfieldSelect">
\r
183 <xsl:with-param name="codes">vxyz</xsl:with-param>
\r
184 <xsl:with-param name="delimeter">--</xsl:with-param>
\r
185 </xsl:call-template>
\r
189 <xsl:for-each select="marc:datafield[@tag=653]">
\r
191 <xsl:call-template name="subfieldSelect">
\r
192 <xsl:with-param name="codes">a</xsl:with-param>
\r
193 </xsl:call-template>
\r
196 <xsl:for-each select="marc:datafield[@tag=651]">
\r
198 <xsl:call-template name="subfieldSelect">
\r
199 <xsl:with-param name="codes">a</xsl:with-param>
\r
200 </xsl:call-template>
\r
201 <xsl:if test="marc:subfield[@code='v' or @code='x' or @code='y' or
\r
203 <xsl:text>--</xsl:text>
\r
204 <xsl:call-template name="subfieldSelect">
\r
205 <xsl:with-param name="codes">vxyz</xsl:with-param>
\r
206 <xsl:with-param name="delimeter">--</xsl:with-param>
\r
207 </xsl:call-template>
\r
211 <xsl:for-each select="marc:datafield[@tag=752]">
\r
213 <xsl:call-template name="subfieldSelect">
\r
214 <xsl:with-param name="codes">abcd</xsl:with-param>
\r
215 </xsl:call-template>
\r
218 <xsl:for-each select="marc:datafield[@tag=530]">
\r
219 <!-- nt 01/04 attribute fix -->
\r
221 <!--<xsl:attribute name="type">original</xsl:attribute>-->
\r
222 <xsl:call-template name="subfieldSelect">
\r
223 <xsl:with-param name="codes">abcdu</xsl:with-param>
\r
224 </xsl:call-template>
\r
227 <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]">
\r
229 <xsl:call-template name="subfieldSelect">
\r
230 <xsl:with-param name="codes">ot</xsl:with-param>
\r
231 </xsl:call-template>
\r
234 <xsl:for-each select="marc:datafield[@tag=856]">
\r
236 <xsl:value-of select="marc:subfield[@code='u']"/>
\r
239 <xsl:for-each select="marc:datafield[@tag=020]">
\r
241 <xsl:text>URN:ISBN:</xsl:text>
\r
242 <xsl:value-of select="marc:subfield[@code='a']"/>
\r
245 <xsl:for-each select="marc:datafield[@tag=506]">
\r
247 <xsl:value-of select="marc:subfield[@code='a']"/>
\r
250 <xsl:for-each select="marc:datafield[@tag=540]">
\r
252 <xsl:value-of select="marc:subfield[@code='a']"/>
\r
257 <!-- Stylus Studio meta-information - (c)1998-2003 Copyright Sonic Software Corporation. All rights reserved.
\r
259 <scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
\r