bibframe_ruby 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +24 -2
- data/docs/superpowers/plans/2026-09-09-marc-conversion.md +537 -0
- data/docs/superpowers/specs/2026-09-09-marc-conversion-design.md +110 -0
- data/lib/bibframe_ruby/marc_converter.rb +67 -0
- data/lib/bibframe_ruby/parser.rb +4 -2
- data/lib/bibframe_ruby/version.rb +1 -1
- data/lib/bibframe_ruby.rb +7 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-001-007.xsl +2276 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-006,008.xsl +1295 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-010-048.xsl +1712 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-050-088.xsl +713 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-1XX,7XX,8XX-names.xsl +1141 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-200-247not240-Titles.xsl +771 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-240andX30-UnifTitle.xsl +535 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-250-270.xsl +283 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-3XX.xsl +2245 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-460-468-SeriesTreat.xsl +135 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-490-510-Links.xsl +145 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-5XX.xsl +1448 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-600-662.xsl +1417 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-720+740to755.xsl +333 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-758.xsl +102 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-760-788-Links.xsl +771 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-841-887.xsl +328 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-880.xsl +119 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-ControlSubfields.xsl +495 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-LDR.xsl +183 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-Preprocess0-Splitting.xsl +765 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-Process6-Series.xsl +627 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-Process8-ProvAct.xsl +1021 -0
- data/vendor/marc2bibframe2/xsl/conf/abbreviations.xml +13 -0
- data/vendor/marc2bibframe2/xsl/conf/code-to-script.xml +399 -0
- data/vendor/marc2bibframe2/xsl/conf/codeMaps.xml +723 -0
- data/vendor/marc2bibframe2/xsl/conf/exclusions.xml +4 -0
- data/vendor/marc2bibframe2/xsl/conf/iso6392-to-1.xml +615 -0
- data/vendor/marc2bibframe2/xsl/conf/languageCrosswalk.xml +1503 -0
- data/vendor/marc2bibframe2/xsl/conf/map880.xml +175 -0
- data/vendor/marc2bibframe2/xsl/conf/scriptCrosswalk.xml +210 -0
- data/vendor/marc2bibframe2/xsl/conf/subjectThesaurus.xml +29 -0
- data/vendor/marc2bibframe2/xsl/marc2bibframe2.xsl +610 -0
- data/vendor/marc2bibframe2/xsl/naco-normalize.xsl +205 -0
- data/vendor/marc2bibframe2/xsl/utils.xsl +963 -0
- data/vendor/marc2bibframe2/xsl/variables.xsl +108 -0
- metadata +68 -1
|
@@ -0,0 +1,1448 @@
|
|
|
1
|
+
<?xml version='1.0'?>
|
|
2
|
+
<xsl:stylesheet version="1.0"
|
|
3
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
4
|
+
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
|
|
5
|
+
xmlns:marc="http://www.loc.gov/MARC21/slim"
|
|
6
|
+
xmlns:bf="http://id.loc.gov/ontologies/bibframe/"
|
|
7
|
+
xmlns:bflc="http://id.loc.gov/ontologies/bflc/"
|
|
8
|
+
xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"
|
|
9
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
10
|
+
exclude-result-prefixes="xsl marc">
|
|
11
|
+
|
|
12
|
+
<!-- Conversion specs for 5XX fields -->
|
|
13
|
+
|
|
14
|
+
<xsl:template match="marc:datafield[@tag='502' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='502')]" mode="work">
|
|
15
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
16
|
+
|
|
17
|
+
<xsl:variable name="vOccurrence">
|
|
18
|
+
<xsl:value-of select="substring(substring-after(marc:subfield[@code='6'],'-'),1,2)"/>
|
|
19
|
+
</xsl:variable>
|
|
20
|
+
<xsl:variable name="v880Ref" select="concat('502-', $vOccurrence)" />
|
|
21
|
+
<xsl:variable name="v880df" select="../marc:datafield[@tag='880' and starts-with(marc:subfield[@code='6'], $v880Ref) and not(contains(marc:subfield[@code='6'], '-00'))]"/>
|
|
22
|
+
<xsl:variable name="vXmlLang880"><xsl:apply-templates select="$v880df" mode="xmllang"/></xsl:variable>
|
|
23
|
+
|
|
24
|
+
<xsl:choose>
|
|
25
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
26
|
+
<bf:dissertation>
|
|
27
|
+
<bf:Dissertation>
|
|
28
|
+
<xsl:for-each select="marc:subfield[@code='a']">
|
|
29
|
+
<rdfs:label>
|
|
30
|
+
<xsl:if test="$vXmlLang != ''">
|
|
31
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
32
|
+
</xsl:if>
|
|
33
|
+
<xsl:value-of select="."/>
|
|
34
|
+
</rdfs:label>
|
|
35
|
+
<xsl:for-each select="$v880df/marc:subfield[@code='a'][position()]">
|
|
36
|
+
<rdfs:label>
|
|
37
|
+
<xsl:if test="$vXmlLang880 != ''">
|
|
38
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang880"/></xsl:attribute>
|
|
39
|
+
</xsl:if>
|
|
40
|
+
<xsl:value-of select="."/>
|
|
41
|
+
</rdfs:label>
|
|
42
|
+
</xsl:for-each>
|
|
43
|
+
</xsl:for-each>
|
|
44
|
+
<xsl:for-each select="marc:subfield[@code='b']">
|
|
45
|
+
<bf:degree>
|
|
46
|
+
<xsl:if test="$vXmlLang != ''">
|
|
47
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
48
|
+
</xsl:if>
|
|
49
|
+
<xsl:call-template name="tChopPunct">
|
|
50
|
+
<xsl:with-param name="pString" select="."/>
|
|
51
|
+
</xsl:call-template>
|
|
52
|
+
</bf:degree>
|
|
53
|
+
</xsl:for-each>
|
|
54
|
+
<xsl:for-each select="$v880df/marc:subfield[@code='b']">
|
|
55
|
+
<bf:degree>
|
|
56
|
+
<xsl:if test="$vXmlLang880 != ''">
|
|
57
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang880"/></xsl:attribute>
|
|
58
|
+
</xsl:if>
|
|
59
|
+
<xsl:call-template name="tChopPunct">
|
|
60
|
+
<xsl:with-param name="pString" select="."/>
|
|
61
|
+
</xsl:call-template>
|
|
62
|
+
</bf:degree>
|
|
63
|
+
</xsl:for-each>
|
|
64
|
+
<xsl:for-each select="marc:subfield[@code='c']">
|
|
65
|
+
<bf:grantingInstitution>
|
|
66
|
+
<bf:Agent>
|
|
67
|
+
<rdfs:label>
|
|
68
|
+
<xsl:if test="$vXmlLang != ''">
|
|
69
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
70
|
+
</xsl:if>
|
|
71
|
+
<xsl:call-template name="tChopPunct">
|
|
72
|
+
<xsl:with-param name="pString" select="."/>
|
|
73
|
+
</xsl:call-template>
|
|
74
|
+
</rdfs:label>
|
|
75
|
+
<xsl:for-each select="$v880df/marc:subfield[@code='c'][position()]">
|
|
76
|
+
<rdfs:label>
|
|
77
|
+
<xsl:if test="$vXmlLang880 != ''">
|
|
78
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang880"/></xsl:attribute>
|
|
79
|
+
</xsl:if>
|
|
80
|
+
<xsl:call-template name="tChopPunct">
|
|
81
|
+
<xsl:with-param name="pString" select="."/>
|
|
82
|
+
</xsl:call-template>
|
|
83
|
+
</rdfs:label>
|
|
84
|
+
</xsl:for-each>
|
|
85
|
+
</bf:Agent>
|
|
86
|
+
</bf:grantingInstitution>
|
|
87
|
+
</xsl:for-each>
|
|
88
|
+
<xsl:for-each select="marc:subfield[@code='d']">
|
|
89
|
+
<bf:date>
|
|
90
|
+
<xsl:if test="$vXmlLang != ''">
|
|
91
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
92
|
+
</xsl:if>
|
|
93
|
+
<xsl:call-template name="tChopPunct">
|
|
94
|
+
<xsl:with-param name="pString" select="."/>
|
|
95
|
+
</xsl:call-template>
|
|
96
|
+
</bf:date>
|
|
97
|
+
</xsl:for-each>
|
|
98
|
+
<xsl:for-each select="$v880df/marc:subfield[@code='d']">
|
|
99
|
+
<bf:date>
|
|
100
|
+
<xsl:if test="$vXmlLang880 != ''">
|
|
101
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang880"/></xsl:attribute>
|
|
102
|
+
</xsl:if>
|
|
103
|
+
<xsl:call-template name="tChopPunct">
|
|
104
|
+
<xsl:with-param name="pString" select="."/>
|
|
105
|
+
</xsl:call-template>
|
|
106
|
+
</bf:date>
|
|
107
|
+
</xsl:for-each>
|
|
108
|
+
<xsl:for-each select="marc:subfield[@code='g']">
|
|
109
|
+
<bf:note>
|
|
110
|
+
<bf:Note>
|
|
111
|
+
<rdfs:label>
|
|
112
|
+
<xsl:if test="$vXmlLang != ''">
|
|
113
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
114
|
+
</xsl:if>
|
|
115
|
+
<xsl:call-template name="tChopPunct">
|
|
116
|
+
<xsl:with-param name="pString" select="."/>
|
|
117
|
+
</xsl:call-template>
|
|
118
|
+
</rdfs:label>
|
|
119
|
+
<xsl:for-each select="$v880df/marc:subfield[@code='g'][position()]">
|
|
120
|
+
<rdfs:label>
|
|
121
|
+
<xsl:if test="$vXmlLang880 != ''">
|
|
122
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang880"/></xsl:attribute>
|
|
123
|
+
</xsl:if>
|
|
124
|
+
<xsl:call-template name="tChopPunct">
|
|
125
|
+
<xsl:with-param name="pString" select="."/>
|
|
126
|
+
</xsl:call-template>
|
|
127
|
+
</rdfs:label>
|
|
128
|
+
</xsl:for-each>
|
|
129
|
+
</bf:Note>
|
|
130
|
+
</bf:note>
|
|
131
|
+
</xsl:for-each>
|
|
132
|
+
<xsl:for-each select="marc:subfield[@code='o']">
|
|
133
|
+
<bf:identifiedBy>
|
|
134
|
+
<bf:DissertationIdentifier>
|
|
135
|
+
<rdf:value>
|
|
136
|
+
<xsl:call-template name="tChopPunct">
|
|
137
|
+
<xsl:with-param name="pString" select="."/>
|
|
138
|
+
</xsl:call-template>
|
|
139
|
+
</rdf:value>
|
|
140
|
+
<xsl:for-each select="$v880df/marc:subfield[@code='o'][position()]">
|
|
141
|
+
<rdf:value>
|
|
142
|
+
<xsl:if test="$vXmlLang880 != ''">
|
|
143
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang880"/></xsl:attribute>
|
|
144
|
+
</xsl:if>
|
|
145
|
+
<xsl:call-template name="tChopPunct">
|
|
146
|
+
<xsl:with-param name="pString" select="."/>
|
|
147
|
+
</xsl:call-template>
|
|
148
|
+
</rdf:value>
|
|
149
|
+
</xsl:for-each>
|
|
150
|
+
</bf:DissertationIdentifier>
|
|
151
|
+
</bf:identifiedBy>
|
|
152
|
+
</xsl:for-each>
|
|
153
|
+
</bf:Dissertation>
|
|
154
|
+
</bf:dissertation>
|
|
155
|
+
</xsl:when>
|
|
156
|
+
</xsl:choose>
|
|
157
|
+
</xsl:template>
|
|
158
|
+
|
|
159
|
+
<xsl:template match="marc:datafield[@tag='505' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='505')]" mode="work">
|
|
160
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
161
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
162
|
+
<xsl:variable name="vLabel">
|
|
163
|
+
<xsl:apply-templates mode="concat-nodes-space" select="marc:subfield[@code='a' or @code='g' or @code='r' or @code='t']"/>
|
|
164
|
+
</xsl:variable>
|
|
165
|
+
<xsl:choose>
|
|
166
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
167
|
+
<bf:tableOfContents>
|
|
168
|
+
<bf:TableOfContents>
|
|
169
|
+
<rdfs:label>
|
|
170
|
+
<xsl:if test="$vXmlLang != ''">
|
|
171
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
172
|
+
</xsl:if>
|
|
173
|
+
<xsl:value-of select="normalize-space($vLabel)"/>
|
|
174
|
+
</rdfs:label>
|
|
175
|
+
<xsl:if test="marc:subfield[@code='6'] and not(contains(marc:subfield[@code='6'], '-00'))">
|
|
176
|
+
<xsl:variable name="vOccurrence">
|
|
177
|
+
<xsl:value-of select="substring(substring-after(marc:subfield[@code='6'],'-'),1,2)"/>
|
|
178
|
+
</xsl:variable>
|
|
179
|
+
<xsl:variable name="v880Ref" select="concat('505-', $vOccurrence)" />
|
|
180
|
+
<xsl:variable name="v880df" select="../marc:datafield[@tag='880' and starts-with(marc:subfield[@code='6'], $v880Ref)]"/>
|
|
181
|
+
<xsl:variable name="vXmlLang880"><xsl:apply-templates select="$v880df" mode="xmllang"/></xsl:variable>
|
|
182
|
+
<xsl:variable name="v880Label">
|
|
183
|
+
<xsl:apply-templates mode="concat-nodes-space" select="$v880df/marc:subfield[@code='a' or @code='g' or @code='r' or @code='t']"/>
|
|
184
|
+
</xsl:variable>
|
|
185
|
+
<rdfs:label>
|
|
186
|
+
<xsl:if test="$vXmlLang880 != ''">
|
|
187
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang880"/></xsl:attribute>
|
|
188
|
+
</xsl:if>
|
|
189
|
+
<xsl:value-of select="normalize-space($v880Label)"/>
|
|
190
|
+
</rdfs:label>
|
|
191
|
+
</xsl:if>
|
|
192
|
+
<xsl:if test="marc:subfield[@code='u']">
|
|
193
|
+
<bf:electronicLocator>
|
|
194
|
+
<xsl:attribute name="rdf:resource"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
|
|
195
|
+
</bf:electronicLocator>
|
|
196
|
+
</xsl:if>
|
|
197
|
+
<xsl:if test="@ind1='1' or @ind1='2'">
|
|
198
|
+
<bf:status>
|
|
199
|
+
<bf:Status>
|
|
200
|
+
<xsl:attribute name="rdf:about">
|
|
201
|
+
<xsl:choose>
|
|
202
|
+
<xsl:when test="@ind1='1'">http://id.loc.gov/vocabulary/mstatus/incmp</xsl:when>
|
|
203
|
+
<xsl:when test="@ind1='2'">http://id.loc.gov/vocabulary/mstatus/part</xsl:when>
|
|
204
|
+
</xsl:choose>
|
|
205
|
+
</xsl:attribute>
|
|
206
|
+
<rdfs:label>
|
|
207
|
+
<xsl:choose>
|
|
208
|
+
<xsl:when test="@ind1='1'">Incomplete</xsl:when>
|
|
209
|
+
<xsl:when test="@ind1='2'">Partial</xsl:when>
|
|
210
|
+
</xsl:choose>
|
|
211
|
+
</rdfs:label>
|
|
212
|
+
</bf:Status>
|
|
213
|
+
</bf:status>
|
|
214
|
+
</xsl:if>
|
|
215
|
+
</bf:TableOfContents>
|
|
216
|
+
</bf:tableOfContents>
|
|
217
|
+
</xsl:when>
|
|
218
|
+
</xsl:choose>
|
|
219
|
+
</xsl:template>
|
|
220
|
+
|
|
221
|
+
<xsl:template match="marc:datafield[@tag='507' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='507')]" mode="work">
|
|
222
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
223
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
224
|
+
<xsl:variable name="vLabel">
|
|
225
|
+
<xsl:apply-templates mode="concat-nodes-space" select="marc:subfield[@code='a' or @code='b']"/>
|
|
226
|
+
</xsl:variable>
|
|
227
|
+
<xsl:choose>
|
|
228
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
229
|
+
<bf:scale>
|
|
230
|
+
<bf:Scale>
|
|
231
|
+
<rdfs:label>
|
|
232
|
+
<xsl:if test="$vXmlLang != ''">
|
|
233
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
234
|
+
</xsl:if>
|
|
235
|
+
<xsl:value-of select="normalize-space($vLabel)"/>
|
|
236
|
+
</rdfs:label>
|
|
237
|
+
</bf:Scale>
|
|
238
|
+
</bf:scale>
|
|
239
|
+
</xsl:when>
|
|
240
|
+
</xsl:choose>
|
|
241
|
+
</xsl:template>
|
|
242
|
+
|
|
243
|
+
<xsl:template match="marc:datafield[@tag='518' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='518')]" mode="work">
|
|
244
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
245
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
246
|
+
<xsl:choose>
|
|
247
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
248
|
+
<bf:capture>
|
|
249
|
+
<bf:Capture>
|
|
250
|
+
<xsl:for-each select="marc:subfield[@code='a']">
|
|
251
|
+
<rdfs:label>
|
|
252
|
+
<xsl:if test="$vXmlLang != ''">
|
|
253
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
254
|
+
</xsl:if>
|
|
255
|
+
<xsl:value-of select="."/>
|
|
256
|
+
</rdfs:label>
|
|
257
|
+
</xsl:for-each>
|
|
258
|
+
<xsl:for-each select="marc:subfield[@code='d']">
|
|
259
|
+
<bf:date>
|
|
260
|
+
<xsl:if test="$vXmlLang != ''">
|
|
261
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
262
|
+
</xsl:if>
|
|
263
|
+
<xsl:call-template name="tChopPunct">
|
|
264
|
+
<xsl:with-param name="pString" select="."/>
|
|
265
|
+
</xsl:call-template>
|
|
266
|
+
</bf:date>
|
|
267
|
+
</xsl:for-each>
|
|
268
|
+
<xsl:for-each select="marc:subfield[@code='o']">
|
|
269
|
+
<bf:note>
|
|
270
|
+
<bf:Note>
|
|
271
|
+
<rdfs:label>
|
|
272
|
+
<xsl:if test="$vXmlLang != ''">
|
|
273
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
274
|
+
</xsl:if>
|
|
275
|
+
<xsl:call-template name="tChopPunct">
|
|
276
|
+
<xsl:with-param name="pString" select="."/>
|
|
277
|
+
</xsl:call-template>
|
|
278
|
+
</rdfs:label>
|
|
279
|
+
</bf:Note>
|
|
280
|
+
</bf:note>
|
|
281
|
+
</xsl:for-each>
|
|
282
|
+
<xsl:for-each select="marc:subfield[@code='p']">
|
|
283
|
+
<bf:place>
|
|
284
|
+
<bf:Place>
|
|
285
|
+
<rdfs:label>
|
|
286
|
+
<xsl:if test="$vXmlLang != ''">
|
|
287
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
288
|
+
</xsl:if>
|
|
289
|
+
<xsl:call-template name="tChopPunct">
|
|
290
|
+
<xsl:with-param name="pString" select="."/>
|
|
291
|
+
</xsl:call-template>
|
|
292
|
+
</rdfs:label>
|
|
293
|
+
</bf:Place>
|
|
294
|
+
</bf:place>
|
|
295
|
+
</xsl:for-each>
|
|
296
|
+
<xsl:apply-templates select="marc:subfield[@code='3']" mode="subfield3">
|
|
297
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
298
|
+
</xsl:apply-templates>
|
|
299
|
+
</bf:Capture>
|
|
300
|
+
</bf:capture>
|
|
301
|
+
</xsl:when>
|
|
302
|
+
</xsl:choose>
|
|
303
|
+
</xsl:template>
|
|
304
|
+
|
|
305
|
+
<xsl:template match="marc:datafield[@tag='520' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='520')]" mode="work">
|
|
306
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
307
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
308
|
+
<xsl:variable name="vLabel">
|
|
309
|
+
<xsl:apply-templates mode="concat-nodes-space" select="marc:subfield[@code='a' or @code='b' or @code='c']"/>
|
|
310
|
+
</xsl:variable>
|
|
311
|
+
<xsl:choose>
|
|
312
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
313
|
+
<bf:summary>
|
|
314
|
+
<bf:Summary>
|
|
315
|
+
<xsl:if test="normalize-space($vLabel) != ''">
|
|
316
|
+
<rdfs:label>
|
|
317
|
+
<xsl:if test="$vXmlLang != ''">
|
|
318
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
319
|
+
</xsl:if>
|
|
320
|
+
<xsl:value-of select="normalize-space($vLabel)"/>
|
|
321
|
+
</rdfs:label>
|
|
322
|
+
</xsl:if>
|
|
323
|
+
<xsl:if test="marc:subfield[@code='6'] and not(contains(marc:subfield[@code='6'], '-00'))">
|
|
324
|
+
<xsl:variable name="vOccurrence">
|
|
325
|
+
<xsl:value-of select="substring(substring-after(marc:subfield[@code='6'],'-'),1,2)"/>
|
|
326
|
+
</xsl:variable>
|
|
327
|
+
<xsl:variable name="v880Ref" select="concat('520', '-', $vOccurrence)" />
|
|
328
|
+
<xsl:variable name="v880df" select="../marc:datafield[@tag='880' and starts-with(marc:subfield[@code='6'], $v880Ref)]"/>
|
|
329
|
+
<xsl:variable name="vXmlLang880"><xsl:apply-templates select="$v880df" mode="xmllang"/></xsl:variable>
|
|
330
|
+
<xsl:for-each select="$v880df/marc:subfield[@code='a']">
|
|
331
|
+
<rdfs:label>
|
|
332
|
+
<xsl:if test="$vXmlLang880 != ''">
|
|
333
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang880"/></xsl:attribute>
|
|
334
|
+
</xsl:if>
|
|
335
|
+
<xsl:value-of select="."/>
|
|
336
|
+
</rdfs:label>
|
|
337
|
+
</xsl:for-each>
|
|
338
|
+
</xsl:if>
|
|
339
|
+
<xsl:apply-templates select="marc:subfield[@code='u']" mode="subfieldu">
|
|
340
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
341
|
+
</xsl:apply-templates>
|
|
342
|
+
<xsl:apply-templates select="marc:subfield[@code='3']" mode="subfield3">
|
|
343
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
344
|
+
</xsl:apply-templates>
|
|
345
|
+
</bf:Summary>
|
|
346
|
+
</bf:summary>
|
|
347
|
+
</xsl:when>
|
|
348
|
+
</xsl:choose>
|
|
349
|
+
</xsl:template>
|
|
350
|
+
|
|
351
|
+
<xsl:template match="marc:datafield[@tag='521' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='521')]" mode="work">
|
|
352
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
353
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
354
|
+
<xsl:variable name="vNote">
|
|
355
|
+
<xsl:choose>
|
|
356
|
+
<xsl:when test="@ind1='0'">reading grade level</xsl:when>
|
|
357
|
+
<xsl:when test="@ind1='1'">interest age level</xsl:when>
|
|
358
|
+
<xsl:when test="@ind1='2'">interest grade level</xsl:when>
|
|
359
|
+
</xsl:choose>
|
|
360
|
+
</xsl:variable>
|
|
361
|
+
<xsl:variable name="vLabel">
|
|
362
|
+
<xsl:apply-templates mode="concat-nodes-delimited" select="marc:subfield[@code='a']"/>
|
|
363
|
+
</xsl:variable>
|
|
364
|
+
<xsl:choose>
|
|
365
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
366
|
+
<bf:intendedAudience>
|
|
367
|
+
<bf:IntendedAudience>
|
|
368
|
+
<xsl:if test="normalize-space($vLabel) != ''">
|
|
369
|
+
<rdfs:label>
|
|
370
|
+
<xsl:if test="$vXmlLang != ''">
|
|
371
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
372
|
+
</xsl:if>
|
|
373
|
+
<xsl:value-of select="normalize-space($vLabel)"/>
|
|
374
|
+
</rdfs:label>
|
|
375
|
+
</xsl:if>
|
|
376
|
+
<xsl:if test="$vNote != ''">
|
|
377
|
+
<bf:note>
|
|
378
|
+
<bf:Note>
|
|
379
|
+
<rdfs:label><xsl:value-of select="$vNote"/></rdfs:label>
|
|
380
|
+
</bf:Note>
|
|
381
|
+
</bf:note>
|
|
382
|
+
</xsl:if>
|
|
383
|
+
<xsl:if test="marc:subfield[@code='b']">
|
|
384
|
+
<bf:source>
|
|
385
|
+
<bf:Source>
|
|
386
|
+
<rdfs:label><xsl:value-of select="marc:subfield[@code='b'][1]"/></rdfs:label>
|
|
387
|
+
</bf:Source>
|
|
388
|
+
</bf:source>
|
|
389
|
+
</xsl:if>
|
|
390
|
+
<xsl:apply-templates select="marc:subfield[@code='3']" mode="subfield3">
|
|
391
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
392
|
+
</xsl:apply-templates>
|
|
393
|
+
</bf:IntendedAudience>
|
|
394
|
+
</bf:intendedAudience>
|
|
395
|
+
</xsl:when>
|
|
396
|
+
</xsl:choose>
|
|
397
|
+
</xsl:template>
|
|
398
|
+
|
|
399
|
+
<xsl:template match="marc:datafield[@tag='522' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='522')]" mode="work">
|
|
400
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
401
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
402
|
+
<xsl:choose>
|
|
403
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
404
|
+
<xsl:for-each select="marc:subfield[@code='a']">
|
|
405
|
+
<bf:geographicCoverage>
|
|
406
|
+
<bf:GeographicCoverage>
|
|
407
|
+
<rdfs:label>
|
|
408
|
+
<xsl:if test="$vXmlLang != ''">
|
|
409
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
410
|
+
</xsl:if>
|
|
411
|
+
<xsl:value-of select="."/>
|
|
412
|
+
</rdfs:label>
|
|
413
|
+
</bf:GeographicCoverage>
|
|
414
|
+
</bf:geographicCoverage>
|
|
415
|
+
</xsl:for-each>
|
|
416
|
+
</xsl:when>
|
|
417
|
+
</xsl:choose>
|
|
418
|
+
</xsl:template>
|
|
419
|
+
|
|
420
|
+
<xsl:template match="marc:datafield[@tag='525' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='525')]" mode="work">
|
|
421
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
422
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
423
|
+
<xsl:choose>
|
|
424
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
425
|
+
<xsl:for-each select="marc:subfield[@code='a']">
|
|
426
|
+
<bf:note>
|
|
427
|
+
<bf:Note>
|
|
428
|
+
<rdf:type rdf:resource="http://id.loc.gov/vocabulary/mnotetype/suppl" />
|
|
429
|
+
<rdfs:label>
|
|
430
|
+
<xsl:if test="$vXmlLang != ''">
|
|
431
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
432
|
+
</xsl:if>
|
|
433
|
+
<xsl:value-of select="."/>
|
|
434
|
+
</rdfs:label>
|
|
435
|
+
</bf:Note>
|
|
436
|
+
</bf:note>
|
|
437
|
+
</xsl:for-each>
|
|
438
|
+
</xsl:when>
|
|
439
|
+
</xsl:choose>
|
|
440
|
+
</xsl:template>
|
|
441
|
+
|
|
442
|
+
<xsl:template match="marc:datafield[@tag='546' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='546')]" mode="work">
|
|
443
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
444
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
445
|
+
|
|
446
|
+
<xsl:variable name="vOccurrence">
|
|
447
|
+
<xsl:value-of select="substring(substring-after(marc:subfield[@code='6'],'-'),1,2)"/>
|
|
448
|
+
</xsl:variable>
|
|
449
|
+
<xsl:variable name="v880Ref" select="concat('546', '-', $vOccurrence)" />
|
|
450
|
+
<xsl:variable name="v880df" select="../marc:datafield[@tag='880' and starts-with(marc:subfield[@code='6'], $v880Ref)]"/>
|
|
451
|
+
<xsl:variable name="vXmlLang880"><xsl:apply-templates select="$v880df" mode="xmllang"/></xsl:variable>
|
|
452
|
+
|
|
453
|
+
<xsl:choose>
|
|
454
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
455
|
+
<xsl:for-each select="marc:subfield[@code='a']">
|
|
456
|
+
<bf:note>
|
|
457
|
+
<bf:Note>
|
|
458
|
+
<rdf:type rdf:resource="http://id.loc.gov/vocabulary/mnotetype/lang" />
|
|
459
|
+
<rdfs:label>
|
|
460
|
+
<xsl:if test="$vXmlLang != ''">
|
|
461
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
462
|
+
</xsl:if>
|
|
463
|
+
<xsl:call-template name="tChopPunct">
|
|
464
|
+
<xsl:with-param name="pString" select="."/>
|
|
465
|
+
<xsl:with-param name="pEndPunct" select="':;,/='"/>
|
|
466
|
+
</xsl:call-template>
|
|
467
|
+
</rdfs:label>
|
|
468
|
+
<xsl:if test="$vOccurrence != ''">
|
|
469
|
+
<xsl:for-each select="$v880df/marc:subfield[@code='a'][position()]">
|
|
470
|
+
<rdfs:label>
|
|
471
|
+
<xsl:if test="$vXmlLang880 != ''">
|
|
472
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang880"/></xsl:attribute>
|
|
473
|
+
</xsl:if>
|
|
474
|
+
<xsl:call-template name="tChopPunct">
|
|
475
|
+
<xsl:with-param name="pString" select="."/>
|
|
476
|
+
<xsl:with-param name="pEndPunct" select="':;,/='"/>
|
|
477
|
+
</xsl:call-template>
|
|
478
|
+
</rdfs:label>
|
|
479
|
+
</xsl:for-each>
|
|
480
|
+
</xsl:if>
|
|
481
|
+
<xsl:apply-templates select="../marc:subfield[@code='3']" mode="subfield3">
|
|
482
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
483
|
+
</xsl:apply-templates>
|
|
484
|
+
</bf:Note>
|
|
485
|
+
</bf:note>
|
|
486
|
+
</xsl:for-each>
|
|
487
|
+
<xsl:for-each select="marc:subfield[@code='b']">
|
|
488
|
+
<bf:notation>
|
|
489
|
+
<bf:Notation>
|
|
490
|
+
<rdfs:label>
|
|
491
|
+
<xsl:if test="$vXmlLang != ''">
|
|
492
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
493
|
+
</xsl:if>
|
|
494
|
+
<xsl:call-template name="tChopPunct">
|
|
495
|
+
<xsl:with-param name="pString" select="."/>
|
|
496
|
+
</xsl:call-template>
|
|
497
|
+
</rdfs:label>
|
|
498
|
+
<xsl:if test="$vOccurrence != ''">
|
|
499
|
+
<xsl:for-each select="$v880df/marc:subfield[@code='b'][position()]">
|
|
500
|
+
<rdfs:label>
|
|
501
|
+
<xsl:if test="$vXmlLang880 != ''">
|
|
502
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang880"/></xsl:attribute>
|
|
503
|
+
</xsl:if>
|
|
504
|
+
<xsl:call-template name="tChopPunct">
|
|
505
|
+
<xsl:with-param name="pString" select="."/>
|
|
506
|
+
<xsl:with-param name="pEndPunct" select="':;,/='"/>
|
|
507
|
+
</xsl:call-template>
|
|
508
|
+
</rdfs:label>
|
|
509
|
+
</xsl:for-each>
|
|
510
|
+
</xsl:if>
|
|
511
|
+
<xsl:apply-templates select="../marc:subfield[@code='3']" mode="subfield3">
|
|
512
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
513
|
+
</xsl:apply-templates>
|
|
514
|
+
</bf:Notation>
|
|
515
|
+
</bf:notation>
|
|
516
|
+
</xsl:for-each>
|
|
517
|
+
</xsl:when>
|
|
518
|
+
</xsl:choose>
|
|
519
|
+
</xsl:template>
|
|
520
|
+
|
|
521
|
+
<xsl:template match="marc:datafield[@tag='580' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='580')]" mode="work">
|
|
522
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
523
|
+
|
|
524
|
+
<xsl:variable name="v8" select="marc:subfield[@code='8']"/>
|
|
525
|
+
|
|
526
|
+
<xsl:choose>
|
|
527
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
528
|
+
<xsl:choose>
|
|
529
|
+
<xsl:when test="../marc:datafield[starts-with(@tag, '7')]/marc:subfield[@code='8'] = $v8"></xsl:when>
|
|
530
|
+
<xsl:when test="contains(marc:subfield[@code='a'], 'upplement') and
|
|
531
|
+
../marc:datafield[@tag='770']"></xsl:when>
|
|
532
|
+
<xsl:when test="contains(marc:subfield[@code='a'], 'erged with') and
|
|
533
|
+
../marc:datafield[@tag='785' and @ind2='7']"></xsl:when>
|
|
534
|
+
<xsl:when test="contains(marc:subfield[@code='a'], 'erger of') and
|
|
535
|
+
../marc:datafield[@tag='780' and @ind2='4']"></xsl:when>
|
|
536
|
+
<xsl:when test="contains(marc:subfield[@code='a'], 'plit into') and
|
|
537
|
+
../marc:datafield[@tag='785' and @ind2='6']"></xsl:when>
|
|
538
|
+
<xsl:when test="contains(marc:subfield[@code='a'], 'bsorbed by') and
|
|
539
|
+
../marc:datafield[@tag='785' and (@ind2='4' or @ind2='5')]"></xsl:when>
|
|
540
|
+
<xsl:when test="contains(marc:subfield[@code='a'], 'ontinued by') and
|
|
541
|
+
../marc:datafield[@tag='785' and (@ind2='0' or @ind2='8')]"></xsl:when>
|
|
542
|
+
<xsl:otherwise>
|
|
543
|
+
<xsl:apply-templates select="." mode="relNote" />
|
|
544
|
+
</xsl:otherwise>
|
|
545
|
+
</xsl:choose>
|
|
546
|
+
</xsl:when>
|
|
547
|
+
</xsl:choose>
|
|
548
|
+
</xsl:template>
|
|
549
|
+
|
|
550
|
+
<xsl:template match="marc:datafield[@tag='580' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='580')]" mode="relNote">
|
|
551
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
552
|
+
<bf:note>
|
|
553
|
+
<bf:Note>
|
|
554
|
+
<rdf:type rdf:resource="http://id.loc.gov/vocabulary/mnotetype/relnote" />
|
|
555
|
+
<xsl:for-each select="marc:subfield[@code='a']">
|
|
556
|
+
<rdfs:label>
|
|
557
|
+
<xsl:if test="$vXmlLang != ''">
|
|
558
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
559
|
+
</xsl:if>
|
|
560
|
+
<xsl:value-of select="."/>
|
|
561
|
+
</rdfs:label>
|
|
562
|
+
</xsl:for-each>
|
|
563
|
+
<xsl:if test="marc:subfield[@code='6'] and not(contains(marc:subfield[@code='6'], '-00'))">
|
|
564
|
+
<xsl:variable name="vOccurrence">
|
|
565
|
+
<xsl:value-of select="substring(substring-after(marc:subfield[@code='6'],'-'),1,2)"/>
|
|
566
|
+
</xsl:variable>
|
|
567
|
+
<xsl:variable name="v880Ref" select="concat('580', '-', $vOccurrence)" />
|
|
568
|
+
<xsl:variable name="v880df" select="../marc:datafield[@tag='880' and starts-with(marc:subfield[@code='6'], $v880Ref)]"/>
|
|
569
|
+
<xsl:variable name="vXmlLang880"><xsl:apply-templates select="$v880df" mode="xmllang"/></xsl:variable>
|
|
570
|
+
<xsl:for-each select="$v880df/marc:subfield[@code='a']">
|
|
571
|
+
<rdfs:label>
|
|
572
|
+
<xsl:if test="$vXmlLang880 != ''">
|
|
573
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang880"/></xsl:attribute>
|
|
574
|
+
</xsl:if>
|
|
575
|
+
<xsl:value-of select="."/>
|
|
576
|
+
</rdfs:label>
|
|
577
|
+
</xsl:for-each>
|
|
578
|
+
</xsl:if>
|
|
579
|
+
</bf:Note>
|
|
580
|
+
</bf:note>
|
|
581
|
+
</xsl:template>
|
|
582
|
+
|
|
583
|
+
<xsl:template match="marc:datafield[@tag='586' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='586')]" mode="work">
|
|
584
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
585
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
586
|
+
<xsl:choose>
|
|
587
|
+
<xsl:when test="$serialization='rdfxml'">
|
|
588
|
+
<xsl:for-each select="marc:subfield[@code='a']">
|
|
589
|
+
<bf:note>
|
|
590
|
+
<bf:Note>
|
|
591
|
+
<rdf:type rdf:resource="http://id.loc.gov/vocabulary/mnotetype/award" />
|
|
592
|
+
<rdfs:label>
|
|
593
|
+
<xsl:if test="$vXmlLang != ''">
|
|
594
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
595
|
+
</xsl:if>
|
|
596
|
+
<xsl:value-of select="."/>
|
|
597
|
+
</rdfs:label>
|
|
598
|
+
<xsl:apply-templates select="../marc:subfield[@code='3']" mode="subfield3">
|
|
599
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
600
|
+
</xsl:apply-templates>
|
|
601
|
+
</bf:Note>
|
|
602
|
+
</bf:note>
|
|
603
|
+
</xsl:for-each>
|
|
604
|
+
</xsl:when>
|
|
605
|
+
</xsl:choose>
|
|
606
|
+
</xsl:template>
|
|
607
|
+
|
|
608
|
+
<xsl:template match="marc:datafield[@tag='587' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='587')]" mode="work">
|
|
609
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
610
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
611
|
+
<xsl:variable name="vNoteType">
|
|
612
|
+
<xsl:choose>
|
|
613
|
+
<xsl:when test="@ind1=' '">http://id.loc.gov/vocabulary/mnotetype/datasource</xsl:when>
|
|
614
|
+
<xsl:when test="@ind1='0'">http://id.loc.gov/vocabulary/mnotetype/datanf</xsl:when>
|
|
615
|
+
</xsl:choose>
|
|
616
|
+
</xsl:variable>
|
|
617
|
+
<xsl:choose>
|
|
618
|
+
<xsl:when test="$serialization='rdfxml'">
|
|
619
|
+
<bf:note>
|
|
620
|
+
<bf:Note>
|
|
621
|
+
<xsl:if test="$vNoteType != ''">
|
|
622
|
+
<rdf:type>
|
|
623
|
+
<xsl:attribute name="rdf:resource"><xsl:value-of select="$vNoteType"/></xsl:attribute>
|
|
624
|
+
</rdf:type>
|
|
625
|
+
</xsl:if>
|
|
626
|
+
<xsl:for-each select="marc:subfield[@code='a']">
|
|
627
|
+
<bf:preferredCitation>
|
|
628
|
+
<xsl:call-template name="tChopPunct">
|
|
629
|
+
<xsl:with-param name="pString" select="."/>
|
|
630
|
+
</xsl:call-template>
|
|
631
|
+
</bf:preferredCitation>
|
|
632
|
+
</xsl:for-each>
|
|
633
|
+
<xsl:for-each select="marc:subfield[@code='b']">
|
|
634
|
+
<rdfs:label><xsl:value-of select="."/></rdfs:label>
|
|
635
|
+
</xsl:for-each>
|
|
636
|
+
<xsl:apply-templates select="marc:subfield[@code='u']" mode="subfieldu">
|
|
637
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
638
|
+
</xsl:apply-templates>
|
|
639
|
+
</bf:Note>
|
|
640
|
+
</bf:note>
|
|
641
|
+
</xsl:when>
|
|
642
|
+
</xsl:choose>
|
|
643
|
+
</xsl:template>
|
|
644
|
+
|
|
645
|
+
<xsl:template match="marc:datafield[@tag='500' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='500')] |
|
|
646
|
+
marc:datafield[@tag='501' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='501')] |
|
|
647
|
+
marc:datafield[@tag='513' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='513')] |
|
|
648
|
+
marc:datafield[@tag='515' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='515')] |
|
|
649
|
+
marc:datafield[@tag='516' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='516')] |
|
|
650
|
+
marc:datafield[@tag='530' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='530')] |
|
|
651
|
+
marc:datafield[@tag='533' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='533')] |
|
|
652
|
+
marc:datafield[@tag='534' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='534')] |
|
|
653
|
+
marc:datafield[@tag='536' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='536')] |
|
|
654
|
+
marc:datafield[@tag='544' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='544')] |
|
|
655
|
+
marc:datafield[@tag='545' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='545')] |
|
|
656
|
+
marc:datafield[
|
|
657
|
+
(@tag='547' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='547'))
|
|
658
|
+
and
|
|
659
|
+
not(../marc:datafield[@tag='247'])] |
|
|
660
|
+
marc:datafield[@tag='550' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='550')] |
|
|
661
|
+
marc:datafield[@tag='555' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='555')] |
|
|
662
|
+
marc:datafield[@tag='556' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='556')] |
|
|
663
|
+
marc:datafield[@tag='581' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='581')] |
|
|
664
|
+
marc:datafield[@tag='585' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='585')] |
|
|
665
|
+
marc:datafield[@tag='588' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='588')]"
|
|
666
|
+
mode="instance">
|
|
667
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
668
|
+
<xsl:param name="pHasItem" select="false()"/>
|
|
669
|
+
<!-- note special $5 processing for LoC below -->
|
|
670
|
+
<xsl:if test="$pHasItem or not($localfields and marc:subfield[@code='5'])">
|
|
671
|
+
<xsl:apply-templates select="." mode="instanceNote5XX">
|
|
672
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
673
|
+
</xsl:apply-templates>
|
|
674
|
+
</xsl:if>
|
|
675
|
+
</xsl:template>
|
|
676
|
+
|
|
677
|
+
<xsl:template match="marc:datafield[@tag='504' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='504')]" mode="instance">
|
|
678
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
679
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
680
|
+
|
|
681
|
+
<xsl:variable name="vOccurrence">
|
|
682
|
+
<xsl:value-of select="substring(substring-after(marc:subfield[@code='6'],'-'),1,2)"/>
|
|
683
|
+
</xsl:variable>
|
|
684
|
+
<xsl:variable name="v880Ref" select="concat('504', '-', $vOccurrence)" />
|
|
685
|
+
<xsl:variable name="v880df" select="../marc:datafield[@tag='880' and starts-with(marc:subfield[@code='6'], $v880Ref)]"/>
|
|
686
|
+
<xsl:variable name="vXmlLang880"><xsl:apply-templates select="$v880df" mode="xmllang"/></xsl:variable>
|
|
687
|
+
|
|
688
|
+
<xsl:choose>
|
|
689
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
690
|
+
<bf:note>
|
|
691
|
+
<bf:Note>
|
|
692
|
+
<rdf:type rdf:resource="http://id.loc.gov/vocabulary/mnotetype/biblio" />
|
|
693
|
+
<xsl:for-each select="marc:subfield[@code='a']">
|
|
694
|
+
<rdfs:label>
|
|
695
|
+
<xsl:if test="$vXmlLang != ''">
|
|
696
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
697
|
+
</xsl:if>
|
|
698
|
+
<xsl:value-of select="."/>
|
|
699
|
+
</rdfs:label>
|
|
700
|
+
<xsl:for-each select="$v880df/marc:subfield[@code='a'][position()]">
|
|
701
|
+
<rdfs:label>
|
|
702
|
+
<xsl:if test="$vXmlLang880 != ''">
|
|
703
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang880"/></xsl:attribute>
|
|
704
|
+
</xsl:if>
|
|
705
|
+
<xsl:value-of select="."/>
|
|
706
|
+
</rdfs:label>
|
|
707
|
+
</xsl:for-each>
|
|
708
|
+
</xsl:for-each>
|
|
709
|
+
<xsl:for-each select="marc:subfield[@code='b']">
|
|
710
|
+
<bf:count>
|
|
711
|
+
<xsl:call-template name="tChopPunct">
|
|
712
|
+
<xsl:with-param name="pString" select="."/>
|
|
713
|
+
</xsl:call-template>
|
|
714
|
+
</bf:count>
|
|
715
|
+
</xsl:for-each>
|
|
716
|
+
</bf:Note>
|
|
717
|
+
</bf:note>
|
|
718
|
+
</xsl:when>
|
|
719
|
+
</xsl:choose>
|
|
720
|
+
</xsl:template>
|
|
721
|
+
|
|
722
|
+
<xsl:template match="marc:datafield[@tag='506' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='506')]" mode="instance">
|
|
723
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
724
|
+
<xsl:param name="pHasItem" select="false()"/>
|
|
725
|
+
<!-- note special $5 processing for LoC below -->
|
|
726
|
+
<xsl:if test="$pHasItem or not($localfields and marc:subfield[@code='5'])">
|
|
727
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
728
|
+
<xsl:variable name="vLabel">
|
|
729
|
+
<xsl:apply-templates mode="concat-nodes-space" select="marc:subfield[@code='a' or @code='b' or @code='c' or @code='d' or @code='e' or @code='q']"/>
|
|
730
|
+
</xsl:variable>
|
|
731
|
+
<xsl:choose>
|
|
732
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
733
|
+
<xsl:if test="marc:subfield[@code='a']">
|
|
734
|
+
<bf:usageAndAccessPolicy>
|
|
735
|
+
<bf:AccessPolicy>
|
|
736
|
+
<rdfs:label>
|
|
737
|
+
<xsl:if test="$vXmlLang != ''">
|
|
738
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
739
|
+
</xsl:if>
|
|
740
|
+
<xsl:value-of select="normalize-space($vLabel)"/>
|
|
741
|
+
</rdfs:label>
|
|
742
|
+
<xsl:for-each select="marc:subfield[@code='g']">
|
|
743
|
+
<bf:validDate rdf:datatype="http://id.loc.gov/datatypes/edtf">
|
|
744
|
+
<xsl:choose>
|
|
745
|
+
<xsl:when test="contains(. ,'-')"><xsl:value-of select="."/></xsl:when>
|
|
746
|
+
<xsl:otherwise>
|
|
747
|
+
<xsl:call-template name="tMarcToEdtf">
|
|
748
|
+
<xsl:with-param name="pDateString" select="normalize-space(.)"/>
|
|
749
|
+
</xsl:call-template>
|
|
750
|
+
</xsl:otherwise>
|
|
751
|
+
</xsl:choose>
|
|
752
|
+
</bf:validDate>
|
|
753
|
+
</xsl:for-each>
|
|
754
|
+
<xsl:for-each select="marc:subfield[@code='f']">
|
|
755
|
+
<bf:qualifier>
|
|
756
|
+
<xsl:if test="$vXmlLang != ''">
|
|
757
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
758
|
+
</xsl:if>
|
|
759
|
+
<xsl:value-of select="normalize-space(.)"/>
|
|
760
|
+
</bf:qualifier>
|
|
761
|
+
</xsl:for-each>
|
|
762
|
+
<xsl:apply-templates select="marc:subfield[@code='u']" mode="subfieldu">
|
|
763
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
764
|
+
</xsl:apply-templates>
|
|
765
|
+
<xsl:apply-templates select="marc:subfield[@code='3']" mode="subfield3">
|
|
766
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
767
|
+
</xsl:apply-templates>
|
|
768
|
+
<xsl:apply-templates select="marc:subfield[@code='5']" mode="subfield5">
|
|
769
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
770
|
+
</xsl:apply-templates>
|
|
771
|
+
</bf:AccessPolicy>
|
|
772
|
+
</bf:usageAndAccessPolicy>
|
|
773
|
+
</xsl:if>
|
|
774
|
+
|
|
775
|
+
<xsl:if test="not(marc:subfield[@code='a']) and marc:subfield[@code='f']">
|
|
776
|
+
<bf:usageAndAccessPolicy>
|
|
777
|
+
<bf:AccessPolicy>
|
|
778
|
+
<xsl:choose>
|
|
779
|
+
<xsl:when test="marc:subfield[@code='0'][starts-with(text(),'(uri)') or starts-with(text(),'http')]">
|
|
780
|
+
<xsl:attribute name="rdf:about">
|
|
781
|
+
<xsl:apply-templates mode="generateUri" select="marc:subfield[@code='0'][starts-with(text(),'(uri)') or starts-with(text(),'http')]">
|
|
782
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
783
|
+
</xsl:apply-templates>
|
|
784
|
+
</xsl:attribute>
|
|
785
|
+
</xsl:when>
|
|
786
|
+
<xsl:otherwise>
|
|
787
|
+
<xsl:apply-templates select="marc:subfield[@code='0']" mode="subfield0orw">
|
|
788
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
789
|
+
</xsl:apply-templates>
|
|
790
|
+
</xsl:otherwise>
|
|
791
|
+
</xsl:choose>
|
|
792
|
+
<bf:qualifier>
|
|
793
|
+
<xsl:if test="$vXmlLang != ''">
|
|
794
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
795
|
+
</xsl:if>
|
|
796
|
+
<xsl:value-of select="normalize-space(marc:subfield[@code='f'])"/>
|
|
797
|
+
</bf:qualifier>
|
|
798
|
+
<xsl:apply-templates select="marc:subfield[@code='2']" mode="subfield2">
|
|
799
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
800
|
+
</xsl:apply-templates>
|
|
801
|
+
</bf:AccessPolicy>
|
|
802
|
+
</bf:usageAndAccessPolicy>
|
|
803
|
+
</xsl:if>
|
|
804
|
+
</xsl:when>
|
|
805
|
+
</xsl:choose>
|
|
806
|
+
</xsl:if>
|
|
807
|
+
</xsl:template>
|
|
808
|
+
|
|
809
|
+
<xsl:template match="marc:datafield[@tag='508' or @tag='511' or (@tag='880' and (substring(marc:subfield[@code='6'],1,3)='508' or substring(marc:subfield[@code='6'],1,3)='511'))]" mode="work">
|
|
810
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
811
|
+
<xsl:variable name="vTag">
|
|
812
|
+
<xsl:choose>
|
|
813
|
+
<xsl:when test="@tag='880'"><xsl:value-of select="substring(marc:subfield[@code='6'],1,3)"/></xsl:when>
|
|
814
|
+
<xsl:otherwise><xsl:value-of select="@tag"/></xsl:otherwise>
|
|
815
|
+
</xsl:choose>
|
|
816
|
+
</xsl:variable>
|
|
817
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
818
|
+
<xsl:variable name="vDisplayConst">
|
|
819
|
+
<xsl:choose>
|
|
820
|
+
<xsl:when test="$vTag='511' and @ind1='1'">Cast: </xsl:when>
|
|
821
|
+
</xsl:choose>
|
|
822
|
+
</xsl:variable>
|
|
823
|
+
|
|
824
|
+
<xsl:variable name="vOccurrence">
|
|
825
|
+
<xsl:value-of select="substring(substring-after(marc:subfield[@code='6'],'-'),1,2)"/>
|
|
826
|
+
</xsl:variable>
|
|
827
|
+
<xsl:variable name="v880Ref" select="concat($vTag, '-', $vOccurrence)" />
|
|
828
|
+
<xsl:variable name="v880df" select="../marc:datafield[@tag='880' and starts-with(marc:subfield[@code='6'], $v880Ref) and not(contains(marc:subfield[@code='6'], '-00'))]"/>
|
|
829
|
+
<xsl:variable name="vXmlLang880"><xsl:apply-templates select="$v880df" mode="xmllang"/></xsl:variable>
|
|
830
|
+
|
|
831
|
+
<xsl:choose>
|
|
832
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
833
|
+
<xsl:for-each select="marc:subfield[@code='a']">
|
|
834
|
+
<bf:note>
|
|
835
|
+
<bf:Note>
|
|
836
|
+
<rdf:type>
|
|
837
|
+
<xsl:attribute name="rdf:resource">
|
|
838
|
+
<xsl:choose>
|
|
839
|
+
<xsl:when test="$vTag='508'">http://id.loc.gov/vocabulary/mnotetype/credits</xsl:when>
|
|
840
|
+
<xsl:otherwise>http://id.loc.gov/vocabulary/mnotetype/participants</xsl:otherwise>
|
|
841
|
+
</xsl:choose>
|
|
842
|
+
</xsl:attribute>
|
|
843
|
+
</rdf:type>
|
|
844
|
+
<rdfs:label>
|
|
845
|
+
<xsl:if test="$vXmlLang != ''">
|
|
846
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
847
|
+
</xsl:if>
|
|
848
|
+
<xsl:value-of select="$vDisplayConst"/><xsl:value-of select="."/>
|
|
849
|
+
</rdfs:label>
|
|
850
|
+
<xsl:for-each select="$v880df/marc:subfield[@code='a'][position()]">
|
|
851
|
+
<rdfs:label>
|
|
852
|
+
<xsl:if test="$vXmlLang880 != ''">
|
|
853
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang880"/></xsl:attribute>
|
|
854
|
+
</xsl:if>
|
|
855
|
+
<xsl:value-of select="$vDisplayConst"/><xsl:value-of select="."/>
|
|
856
|
+
</rdfs:label>
|
|
857
|
+
</xsl:for-each>
|
|
858
|
+
<xsl:apply-templates select="../marc:subfield[@code='3']" mode="subfield3">
|
|
859
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
860
|
+
</xsl:apply-templates>
|
|
861
|
+
</bf:Note>
|
|
862
|
+
</bf:note>
|
|
863
|
+
</xsl:for-each>
|
|
864
|
+
</xsl:when>
|
|
865
|
+
</xsl:choose>
|
|
866
|
+
</xsl:template>
|
|
867
|
+
|
|
868
|
+
<xsl:template match="marc:datafield[@tag='524' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='524')]" mode="instance">
|
|
869
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
870
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
871
|
+
<xsl:variable name="vLabel">
|
|
872
|
+
<xsl:apply-templates mode="concat-nodes-delimited" select="marc:subfield[@code='a']"/>
|
|
873
|
+
</xsl:variable>
|
|
874
|
+
<xsl:choose>
|
|
875
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
876
|
+
<bf:note>
|
|
877
|
+
<bf:Note>
|
|
878
|
+
<rdf:type>
|
|
879
|
+
<xsl:attribute name="rdf:resource">http://id.loc.gov/vocabulary/mnotetype/citeas</xsl:attribute>
|
|
880
|
+
</rdf:type>
|
|
881
|
+
<rdfs:label>
|
|
882
|
+
<xsl:if test="$vXmlLang != ''">
|
|
883
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
884
|
+
</xsl:if>
|
|
885
|
+
<xsl:value-of select="$vLabel"/>
|
|
886
|
+
</rdfs:label>
|
|
887
|
+
<xsl:apply-templates select="marc:subfield[@code='2']" mode="subfield2">
|
|
888
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
889
|
+
<xsl:with-param name="pVocabStem">http://id.loc.gov/vocabulary/citationschemes/</xsl:with-param>
|
|
890
|
+
</xsl:apply-templates>
|
|
891
|
+
<xsl:apply-templates select="marc:subfield[@code='3']" mode="subfield3">
|
|
892
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
893
|
+
</xsl:apply-templates>
|
|
894
|
+
</bf:Note>
|
|
895
|
+
</bf:note>
|
|
896
|
+
</xsl:when>
|
|
897
|
+
</xsl:choose>
|
|
898
|
+
</xsl:template>
|
|
899
|
+
|
|
900
|
+
<xsl:template match="marc:datafield[@tag='532' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='532')]" mode="instance">
|
|
901
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
902
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
903
|
+
<xsl:for-each select="marc:subfield[@code='a']">
|
|
904
|
+
<xsl:choose>
|
|
905
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
906
|
+
<bf:contentAccessibility>
|
|
907
|
+
<bf:ContentAccessibility>
|
|
908
|
+
<rdfs:label>
|
|
909
|
+
<xsl:if test="$vXmlLang != ''">
|
|
910
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
911
|
+
</xsl:if>
|
|
912
|
+
<xsl:value-of select="."/>
|
|
913
|
+
</rdfs:label>
|
|
914
|
+
<xsl:apply-templates select="../marc:subfield[@code='3']" mode="subfield3">
|
|
915
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
916
|
+
</xsl:apply-templates>
|
|
917
|
+
</bf:ContentAccessibility>
|
|
918
|
+
</bf:contentAccessibility>
|
|
919
|
+
</xsl:when>
|
|
920
|
+
</xsl:choose>
|
|
921
|
+
</xsl:for-each>
|
|
922
|
+
</xsl:template>
|
|
923
|
+
|
|
924
|
+
<xsl:template match="marc:datafield[@tag='538' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='538')]" mode="instance">
|
|
925
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
926
|
+
<xsl:param name="pHasItem" select="false()"/>
|
|
927
|
+
<!-- note special $5 processing for LoC below -->
|
|
928
|
+
<xsl:if test="$pHasItem or not($localfields and marc:subfield[@code='5'])">
|
|
929
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
930
|
+
<xsl:choose>
|
|
931
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
932
|
+
<bf:systemRequirement>
|
|
933
|
+
<bf:SystemRequirement>
|
|
934
|
+
<xsl:for-each select="marc:subfield[@code='a']">
|
|
935
|
+
<rdfs:label>
|
|
936
|
+
<xsl:if test="$vXmlLang != ''">
|
|
937
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
938
|
+
</xsl:if>
|
|
939
|
+
<xsl:value-of select="."/>
|
|
940
|
+
</rdfs:label>
|
|
941
|
+
</xsl:for-each>
|
|
942
|
+
<xsl:apply-templates select="marc:subfield[@code='u']" mode="subfieldu">
|
|
943
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
944
|
+
</xsl:apply-templates>
|
|
945
|
+
<xsl:apply-templates select="marc:subfield[@code='3']" mode="subfield3">
|
|
946
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
947
|
+
</xsl:apply-templates>
|
|
948
|
+
<xsl:apply-templates select="marc:subfield[@code='5']" mode="subfield5">
|
|
949
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
950
|
+
</xsl:apply-templates>
|
|
951
|
+
</bf:SystemRequirement>
|
|
952
|
+
</bf:systemRequirement>
|
|
953
|
+
</xsl:when>
|
|
954
|
+
</xsl:choose>
|
|
955
|
+
</xsl:if>
|
|
956
|
+
</xsl:template>
|
|
957
|
+
|
|
958
|
+
<xsl:template match="marc:datafield[@tag='540' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='540')]" mode="instance">
|
|
959
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
960
|
+
<xsl:param name="pHasItem" select="false()"/>
|
|
961
|
+
<!-- note special $5 processing for LoC below -->
|
|
962
|
+
<xsl:if test="$pHasItem or not($localfields and marc:subfield[@code='5'])">
|
|
963
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
964
|
+
<xsl:variable name="vLabel">
|
|
965
|
+
<xsl:apply-templates mode="concat-nodes-space" select="marc:subfield[@code='a' or @code='c' or @code='d' or @code='q']"/>
|
|
966
|
+
</xsl:variable>
|
|
967
|
+
<xsl:choose>
|
|
968
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
969
|
+
<xsl:if test="marc:subfield[@code='a']">
|
|
970
|
+
<bf:usageAndAccessPolicy>
|
|
971
|
+
<bf:UsePolicy>
|
|
972
|
+
<rdfs:label>
|
|
973
|
+
<xsl:if test="$vXmlLang != ''">
|
|
974
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
975
|
+
</xsl:if>
|
|
976
|
+
<xsl:value-of select="normalize-space($vLabel)"/>
|
|
977
|
+
</rdfs:label>
|
|
978
|
+
<xsl:for-each select="marc:subfield[@code='g']">
|
|
979
|
+
<bf:validDate rdf:datatype="http://id.loc.gov/datatypes/edtf">
|
|
980
|
+
<xsl:choose>
|
|
981
|
+
<xsl:when test="contains(. ,'-')"><xsl:value-of select="."/></xsl:when>
|
|
982
|
+
<xsl:otherwise>
|
|
983
|
+
<xsl:call-template name="tMarcToEdtf">
|
|
984
|
+
<xsl:with-param name="pDateString" select="normalize-space(.)"/>
|
|
985
|
+
</xsl:call-template>
|
|
986
|
+
</xsl:otherwise>
|
|
987
|
+
</xsl:choose>
|
|
988
|
+
</bf:validDate>
|
|
989
|
+
</xsl:for-each>
|
|
990
|
+
<xsl:for-each select="marc:subfield[@code='f']">
|
|
991
|
+
<bf:qualifier>
|
|
992
|
+
<xsl:if test="$vXmlLang != ''">
|
|
993
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
994
|
+
</xsl:if>
|
|
995
|
+
<xsl:value-of select="normalize-space(.)"/>
|
|
996
|
+
</bf:qualifier>
|
|
997
|
+
</xsl:for-each>
|
|
998
|
+
<!--
|
|
999
|
+
<xsl:for-each select="marc:subfield[@code='d']">
|
|
1000
|
+
<xsl:variable name="vNoteLabel">
|
|
1001
|
+
<xsl:call-template name="tChopPunct">
|
|
1002
|
+
<xsl:with-param name="pString" select="."/>
|
|
1003
|
+
</xsl:call-template>
|
|
1004
|
+
</xsl:variable>
|
|
1005
|
+
<bf:note>
|
|
1006
|
+
<bf:Note>
|
|
1007
|
+
<rdfs:label>
|
|
1008
|
+
<xsl:if test="$vXmlLang != ''">
|
|
1009
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
1010
|
+
</xsl:if>
|
|
1011
|
+
<xsl:text>Authorized users: </xsl:text><xsl:value-of select="$vNoteLabel"/>
|
|
1012
|
+
</rdfs:label>
|
|
1013
|
+
</bf:Note>
|
|
1014
|
+
</bf:note>
|
|
1015
|
+
</xsl:for-each>
|
|
1016
|
+
-->
|
|
1017
|
+
<xsl:apply-templates select="marc:subfield[@code='u']" mode="subfieldu">
|
|
1018
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1019
|
+
</xsl:apply-templates>
|
|
1020
|
+
<xsl:apply-templates select="marc:subfield[@code='3']" mode="subfield3">
|
|
1021
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1022
|
+
</xsl:apply-templates>
|
|
1023
|
+
<xsl:apply-templates select="marc:subfield[@code='5']" mode="subfield5">
|
|
1024
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1025
|
+
</xsl:apply-templates>
|
|
1026
|
+
</bf:UsePolicy>
|
|
1027
|
+
</bf:usageAndAccessPolicy>
|
|
1028
|
+
</xsl:if>
|
|
1029
|
+
|
|
1030
|
+
<xsl:if test="not(marc:subfield[@code='a']) and marc:subfield[@code='f']">
|
|
1031
|
+
<bf:usageAndAccessPolicy>
|
|
1032
|
+
<bf:UsePolicy>
|
|
1033
|
+
<xsl:choose>
|
|
1034
|
+
<xsl:when test="marc:subfield[@code='0'][starts-with(text(),'(uri)') or starts-with(text(),'http')]">
|
|
1035
|
+
<xsl:attribute name="rdf:about">
|
|
1036
|
+
<xsl:apply-templates mode="generateUri" select="marc:subfield[@code='0'][starts-with(text(),'(uri)') or starts-with(text(),'http')]">
|
|
1037
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1038
|
+
</xsl:apply-templates>
|
|
1039
|
+
</xsl:attribute>
|
|
1040
|
+
</xsl:when>
|
|
1041
|
+
<xsl:otherwise>
|
|
1042
|
+
<xsl:apply-templates select="marc:subfield[@code='0']" mode="subfield0orw">
|
|
1043
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1044
|
+
</xsl:apply-templates>
|
|
1045
|
+
</xsl:otherwise>
|
|
1046
|
+
</xsl:choose>
|
|
1047
|
+
<bf:qualifier>
|
|
1048
|
+
<xsl:if test="$vXmlLang != ''">
|
|
1049
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
1050
|
+
</xsl:if>
|
|
1051
|
+
<xsl:value-of select="normalize-space(marc:subfield[@code='f'])"/>
|
|
1052
|
+
</bf:qualifier>
|
|
1053
|
+
<xsl:apply-templates select="marc:subfield[@code='2']" mode="subfield2">
|
|
1054
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1055
|
+
</xsl:apply-templates>
|
|
1056
|
+
</bf:UsePolicy>
|
|
1057
|
+
</bf:usageAndAccessPolicy>
|
|
1058
|
+
</xsl:if>
|
|
1059
|
+
</xsl:when>
|
|
1060
|
+
</xsl:choose>
|
|
1061
|
+
</xsl:if>
|
|
1062
|
+
</xsl:template>
|
|
1063
|
+
|
|
1064
|
+
<xsl:template match="marc:datafield" mode="instanceNote5XX">
|
|
1065
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
1066
|
+
<xsl:param name="pNoteType"/>
|
|
1067
|
+
<xsl:variable name="vTag">
|
|
1068
|
+
<xsl:choose>
|
|
1069
|
+
<xsl:when test="@tag='880'"><xsl:value-of select="substring(marc:subfield[@code='6'],1,3)"/></xsl:when>
|
|
1070
|
+
<xsl:otherwise><xsl:value-of select="@tag"/></xsl:otherwise>
|
|
1071
|
+
</xsl:choose>
|
|
1072
|
+
</xsl:variable>
|
|
1073
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
1074
|
+
<xsl:variable name="vNoteType">
|
|
1075
|
+
<xsl:choose>
|
|
1076
|
+
<xsl:when test="$vTag='501'">with</xsl:when>
|
|
1077
|
+
<xsl:when test="$vTag='513'">report</xsl:when>
|
|
1078
|
+
<xsl:when test="$vTag='515'">issuance</xsl:when>
|
|
1079
|
+
<xsl:when test="$vTag='516'">computer</xsl:when>
|
|
1080
|
+
<xsl:when test="$vTag='530'">addphys</xsl:when>
|
|
1081
|
+
<xsl:when test="$vTag='533'">repro</xsl:when>
|
|
1082
|
+
<xsl:when test="$vTag='534'">orig</xsl:when>
|
|
1083
|
+
<xsl:when test="$vTag='536'">fundinfo</xsl:when>
|
|
1084
|
+
<xsl:when test="$vTag='544' or $vTag='581'">related</xsl:when>
|
|
1085
|
+
<xsl:when test="$vTag='545'">
|
|
1086
|
+
<xsl:choose>
|
|
1087
|
+
<xsl:when test="@ind1='0'">biogdata</xsl:when>
|
|
1088
|
+
<xsl:when test="@ind1='1'">adminhist</xsl:when>
|
|
1089
|
+
</xsl:choose>
|
|
1090
|
+
</xsl:when>
|
|
1091
|
+
<xsl:when test="$vTag='550'">issuing</xsl:when>
|
|
1092
|
+
<xsl:when test="$vTag='555'">
|
|
1093
|
+
<xsl:choose>
|
|
1094
|
+
<xsl:when test="@ind1=' '">index</xsl:when>
|
|
1095
|
+
<xsl:when test="@ind1='0'">finding</xsl:when>
|
|
1096
|
+
</xsl:choose>
|
|
1097
|
+
</xsl:when>
|
|
1098
|
+
<xsl:when test="$vTag='556'">doc</xsl:when>
|
|
1099
|
+
<xsl:when test="$vTag='585'">exhibit</xsl:when>
|
|
1100
|
+
<xsl:when test="$vTag='588'">descsource</xsl:when>
|
|
1101
|
+
</xsl:choose>
|
|
1102
|
+
</xsl:variable>
|
|
1103
|
+
<xsl:choose>
|
|
1104
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
1105
|
+
<bf:note>
|
|
1106
|
+
<bf:Note>
|
|
1107
|
+
<xsl:apply-templates select="." mode="instanceNote5XXLabel" />
|
|
1108
|
+
<xsl:if test="marc:subfield[@code='6'] and not(contains(marc:subfield[@code='6'], '-00'))">
|
|
1109
|
+
<xsl:variable name="vOccurrence">
|
|
1110
|
+
<xsl:value-of select="substring(substring-after(marc:subfield[@code='6'],'-'),1,2)"/>
|
|
1111
|
+
</xsl:variable>
|
|
1112
|
+
<xsl:variable name="v880Ref" select="concat($vTag, '-', $vOccurrence)" />
|
|
1113
|
+
<xsl:variable name="v880df" select="../marc:datafield[@tag='880' and starts-with(marc:subfield[@code='6'], $v880Ref)]"/>
|
|
1114
|
+
<xsl:apply-templates select="$v880df" mode="instanceNote5XXLabel" />
|
|
1115
|
+
</xsl:if>
|
|
1116
|
+
<xsl:if test="$vNoteType != ''">
|
|
1117
|
+
<rdf:type>
|
|
1118
|
+
<xsl:attribute name="rdf:resource">
|
|
1119
|
+
<xsl:value-of select="concat('http://id.loc.gov/vocabulary/mnotetype/', $vNoteType)"/>
|
|
1120
|
+
</xsl:attribute>
|
|
1121
|
+
</rdf:type>
|
|
1122
|
+
</xsl:if>
|
|
1123
|
+
<!-- special handling for other subfields -->
|
|
1124
|
+
<xsl:choose>
|
|
1125
|
+
<xsl:when test="$vTag='530'">
|
|
1126
|
+
<xsl:for-each select="marc:subfield[@code='d']">
|
|
1127
|
+
<bf:identifiedBy>
|
|
1128
|
+
<bf:StockNumber>
|
|
1129
|
+
<rdf:value>
|
|
1130
|
+
<xsl:call-template name="tChopPunct">
|
|
1131
|
+
<xsl:with-param name="pString" select="."/>
|
|
1132
|
+
</xsl:call-template>
|
|
1133
|
+
</rdf:value>
|
|
1134
|
+
</bf:StockNumber>
|
|
1135
|
+
</bf:identifiedBy>
|
|
1136
|
+
</xsl:for-each>
|
|
1137
|
+
</xsl:when>
|
|
1138
|
+
<xsl:when test="$vTag='533'">
|
|
1139
|
+
<xsl:apply-templates select="marc:subfield[@code='m']" mode="subfield3">
|
|
1140
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1141
|
+
</xsl:apply-templates>
|
|
1142
|
+
</xsl:when>
|
|
1143
|
+
<xsl:when test="$vTag='534'">
|
|
1144
|
+
<xsl:apply-templates select="marc:subfield[@code='p']" mode="subfield3">
|
|
1145
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1146
|
+
</xsl:apply-templates>
|
|
1147
|
+
<xsl:for-each select="marc:subfield[@code='x' or @code='z']">
|
|
1148
|
+
<xsl:variable name="vIdClass">
|
|
1149
|
+
<xsl:choose>
|
|
1150
|
+
<xsl:when test="@code='x'">bf:Issn</xsl:when>
|
|
1151
|
+
<xsl:when test="@code='z'">bf:Isbn</xsl:when>
|
|
1152
|
+
</xsl:choose>
|
|
1153
|
+
</xsl:variable>
|
|
1154
|
+
<bf:identifiedBy>
|
|
1155
|
+
<xsl:element name="{$vIdClass}">
|
|
1156
|
+
<rdf:value>
|
|
1157
|
+
<xsl:call-template name="tChopPunct">
|
|
1158
|
+
<xsl:with-param name="pString" select="."/>
|
|
1159
|
+
</xsl:call-template>
|
|
1160
|
+
</rdf:value>
|
|
1161
|
+
</xsl:element>
|
|
1162
|
+
</bf:identifiedBy>
|
|
1163
|
+
</xsl:for-each>
|
|
1164
|
+
</xsl:when>
|
|
1165
|
+
<xsl:when test="$vTag='536'">
|
|
1166
|
+
<xsl:for-each select="marc:subfield[@code='b' or @code='c' or @code='d' or @code='e' or @code='f' or @code='g' or @code='h']">
|
|
1167
|
+
<xsl:variable name="vDisplayConst">
|
|
1168
|
+
<xsl:choose>
|
|
1169
|
+
<xsl:when test="@code='b'">Contract: </xsl:when>
|
|
1170
|
+
<xsl:when test="@code='c'">Grant: </xsl:when>
|
|
1171
|
+
<xsl:when test="@code='e'">Program element: </xsl:when>
|
|
1172
|
+
<xsl:when test="@code='f'">Project: </xsl:when>
|
|
1173
|
+
<xsl:when test="@code='g'">Task: </xsl:when>
|
|
1174
|
+
<xsl:when test="@code='h'">Work unit: </xsl:when>
|
|
1175
|
+
</xsl:choose>
|
|
1176
|
+
</xsl:variable>
|
|
1177
|
+
<rdfs:label>
|
|
1178
|
+
<xsl:if test="$vXmlLang != ''">
|
|
1179
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
1180
|
+
</xsl:if>
|
|
1181
|
+
<xsl:call-template name="tChopPunct">
|
|
1182
|
+
<xsl:with-param name="pString" select="concat($vDisplayConst,.)"/>
|
|
1183
|
+
</xsl:call-template>
|
|
1184
|
+
</rdfs:label>
|
|
1185
|
+
</xsl:for-each>
|
|
1186
|
+
</xsl:when>
|
|
1187
|
+
<xsl:when test="$vTag='581'">
|
|
1188
|
+
<xsl:for-each select="marc:subfield[@code='z']">
|
|
1189
|
+
<bf:identifiedBy>
|
|
1190
|
+
<bf:Isbn>
|
|
1191
|
+
<rdf:value>
|
|
1192
|
+
<xsl:call-template name="tChopPunct">
|
|
1193
|
+
<xsl:with-param name="pString" select="."/>
|
|
1194
|
+
</xsl:call-template>
|
|
1195
|
+
</rdf:value>
|
|
1196
|
+
</bf:Isbn>
|
|
1197
|
+
</bf:identifiedBy>
|
|
1198
|
+
</xsl:for-each>
|
|
1199
|
+
</xsl:when>
|
|
1200
|
+
</xsl:choose>
|
|
1201
|
+
<xsl:apply-templates select="marc:subfield[@code='u']" mode="subfieldu">
|
|
1202
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1203
|
+
</xsl:apply-templates>
|
|
1204
|
+
<xsl:apply-templates select="marc:subfield[@code='3']" mode="subfield3">
|
|
1205
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1206
|
+
</xsl:apply-templates>
|
|
1207
|
+
<xsl:apply-templates select="marc:subfield[@code='5']" mode="subfield5">
|
|
1208
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1209
|
+
</xsl:apply-templates>
|
|
1210
|
+
</bf:Note>
|
|
1211
|
+
</bf:note>
|
|
1212
|
+
</xsl:when>
|
|
1213
|
+
</xsl:choose>
|
|
1214
|
+
</xsl:template>
|
|
1215
|
+
|
|
1216
|
+
<xsl:template match="marc:datafield" mode="instanceNote5XXLabel">
|
|
1217
|
+
<xsl:variable name="vTag">
|
|
1218
|
+
<xsl:choose>
|
|
1219
|
+
<xsl:when test="@tag='880'"><xsl:value-of select="substring(marc:subfield[@code='6'],1,3)"/></xsl:when>
|
|
1220
|
+
<xsl:otherwise><xsl:value-of select="@tag"/></xsl:otherwise>
|
|
1221
|
+
</xsl:choose>
|
|
1222
|
+
</xsl:variable>
|
|
1223
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
1224
|
+
<xsl:variable name="vLabel">
|
|
1225
|
+
<xsl:choose>
|
|
1226
|
+
<xsl:when test="$vTag='513' or $vTag='545'">
|
|
1227
|
+
<xsl:apply-templates mode="concat-nodes-space" select="marc:subfield[@code='a' or @code='b']"/>
|
|
1228
|
+
</xsl:when>
|
|
1229
|
+
<xsl:when test="$vTag='530'">
|
|
1230
|
+
<xsl:apply-templates mode="concat-nodes-space" select="marc:subfield[contains('abc',@code)]"/>
|
|
1231
|
+
</xsl:when>
|
|
1232
|
+
<xsl:when test="$vTag='533'">
|
|
1233
|
+
<xsl:apply-templates mode="concat-nodes-space" select="marc:subfield[contains('abcdefn',@code)]"/>
|
|
1234
|
+
</xsl:when>
|
|
1235
|
+
<xsl:when test="$vTag='534'">
|
|
1236
|
+
<xsl:apply-templates mode="concat-nodes-space" select="marc:subfield[contains('abcefkmnt',@code)]"/>
|
|
1237
|
+
</xsl:when>
|
|
1238
|
+
<xsl:when test="$vTag='544'">
|
|
1239
|
+
<xsl:apply-templates mode="concat-nodes-space" select="marc:subfield[@code='a' or @code='b' or @code='c' or @code='d' or @code='e' or @code='n']"/>
|
|
1240
|
+
</xsl:when>
|
|
1241
|
+
<xsl:when test="$vTag='555'">
|
|
1242
|
+
<xsl:apply-templates mode="concat-nodes-space" select="marc:subfield[@code='a' or @code='b' or @code='c' or @code='d']"/>
|
|
1243
|
+
</xsl:when>
|
|
1244
|
+
<xsl:when test="$vTag='588'">
|
|
1245
|
+
<xsl:variable name="vDisplayConstant">
|
|
1246
|
+
<xsl:choose>
|
|
1247
|
+
<xsl:when test="@ind1='0'">Description based on:</xsl:when>
|
|
1248
|
+
<xsl:when test="@ind1='1'">Latest issue consulted:</xsl:when>
|
|
1249
|
+
</xsl:choose>
|
|
1250
|
+
</xsl:variable>
|
|
1251
|
+
<xsl:value-of select="concat($vDisplayConstant,' ',marc:subfield[@code='a'])"/>
|
|
1252
|
+
</xsl:when>
|
|
1253
|
+
<xsl:otherwise>
|
|
1254
|
+
<xsl:apply-templates mode="concat-nodes-space" select="marc:subfield[@code='a']"/>
|
|
1255
|
+
</xsl:otherwise>
|
|
1256
|
+
</xsl:choose>
|
|
1257
|
+
</xsl:variable>
|
|
1258
|
+
<xsl:if test="$vLabel != ''">
|
|
1259
|
+
<rdfs:label>
|
|
1260
|
+
<xsl:if test="$vXmlLang != ''">
|
|
1261
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
1262
|
+
</xsl:if>
|
|
1263
|
+
<xsl:value-of select="normalize-space($vLabel)"/>
|
|
1264
|
+
</rdfs:label>
|
|
1265
|
+
</xsl:if>
|
|
1266
|
+
</xsl:template>
|
|
1267
|
+
|
|
1268
|
+
<xsl:template match="marc:datafield[@tag='541' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='541')]" mode="item">
|
|
1269
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
1270
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
1271
|
+
<xsl:variable name="vLabel">
|
|
1272
|
+
<xsl:apply-templates select="marc:subfield[@code='a' or @code='b' or @code='c' or @code='d' or @code='e' or @code='f' or @code='h' or @code='n' or @code='o']" mode="concat-nodes-space"/>
|
|
1273
|
+
</xsl:variable>
|
|
1274
|
+
<xsl:choose>
|
|
1275
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
1276
|
+
<bf:immediateAcquisition>
|
|
1277
|
+
<bf:ImmediateAcquisition>
|
|
1278
|
+
<rdfs:label>
|
|
1279
|
+
<xsl:if test="$vXmlLang != ''">
|
|
1280
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
1281
|
+
</xsl:if>
|
|
1282
|
+
<xsl:value-of select="normalize-space($vLabel)"/>
|
|
1283
|
+
</rdfs:label>
|
|
1284
|
+
<xsl:apply-templates select="marc:subfield[@code='3']" mode="subfield3">
|
|
1285
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1286
|
+
</xsl:apply-templates>
|
|
1287
|
+
<xsl:apply-templates select="marc:subfield[@code='5']" mode="subfield5">
|
|
1288
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1289
|
+
</xsl:apply-templates>
|
|
1290
|
+
</bf:ImmediateAcquisition>
|
|
1291
|
+
</bf:immediateAcquisition>
|
|
1292
|
+
</xsl:when>
|
|
1293
|
+
</xsl:choose>
|
|
1294
|
+
</xsl:template>
|
|
1295
|
+
|
|
1296
|
+
<xsl:template match="marc:datafield[@tag='561' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='561')]" mode="instance">
|
|
1297
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
1298
|
+
<xsl:param name="pHasItem" select="false()"/>
|
|
1299
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
1300
|
+
|
|
1301
|
+
<!-- If related to Item, process; If localfields processing is false AND there is no $5, process -->
|
|
1302
|
+
<xsl:if test="$pHasItem or not($localfields and marc:subfield[@code='5'])">
|
|
1303
|
+
<xsl:choose>
|
|
1304
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
1305
|
+
<xsl:for-each select="marc:subfield[@code='a']">
|
|
1306
|
+
<bf:custodialHistory>
|
|
1307
|
+
<xsl:if test="$vXmlLang != ''">
|
|
1308
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
1309
|
+
</xsl:if>
|
|
1310
|
+
<xsl:value-of select="."/>
|
|
1311
|
+
</bf:custodialHistory>
|
|
1312
|
+
</xsl:for-each>
|
|
1313
|
+
<xsl:apply-templates select="marc:subfield[@code='3']" mode="subfield3">
|
|
1314
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1315
|
+
</xsl:apply-templates>
|
|
1316
|
+
</xsl:when>
|
|
1317
|
+
</xsl:choose>
|
|
1318
|
+
</xsl:if>
|
|
1319
|
+
</xsl:template>
|
|
1320
|
+
|
|
1321
|
+
<xsl:template match="marc:datafield[@tag='563' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='563')]" mode="instance">
|
|
1322
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
1323
|
+
<xsl:param name="pHasItem" select="false()"/>
|
|
1324
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
1325
|
+
|
|
1326
|
+
<!-- If related to Item, process; If localfields processing is false AND there is no $5, process -->
|
|
1327
|
+
<xsl:if test="$pHasItem or not($localfields and marc:subfield[@code='5'])">
|
|
1328
|
+
<xsl:choose>
|
|
1329
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
1330
|
+
<xsl:for-each select="marc:subfield[@code='a']">
|
|
1331
|
+
<bf:note>
|
|
1332
|
+
<bf:Note>
|
|
1333
|
+
<rdf:type>
|
|
1334
|
+
<xsl:attribute name="rdf:resource">http://id.loc.gov/vocabulary/mnotetype/binding</xsl:attribute>
|
|
1335
|
+
</rdf:type>
|
|
1336
|
+
<rdfs:label>
|
|
1337
|
+
<xsl:if test="$vXmlLang != ''">
|
|
1338
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
1339
|
+
</xsl:if>
|
|
1340
|
+
<xsl:value-of select="."/>
|
|
1341
|
+
</rdfs:label>
|
|
1342
|
+
<xsl:apply-templates select="marc:subfield[@code='3']" mode="subfield3">
|
|
1343
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1344
|
+
</xsl:apply-templates>
|
|
1345
|
+
</bf:Note>
|
|
1346
|
+
</bf:note>
|
|
1347
|
+
</xsl:for-each>
|
|
1348
|
+
</xsl:when>
|
|
1349
|
+
</xsl:choose>
|
|
1350
|
+
</xsl:if>
|
|
1351
|
+
</xsl:template>
|
|
1352
|
+
|
|
1353
|
+
<xsl:template match="marc:datafield[@tag='583' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='583')]" mode="instance">
|
|
1354
|
+
<xsl:param name="serialization" select="'rdfxml'"/>
|
|
1355
|
+
<xsl:param name="pHasItem" select="false()"/>
|
|
1356
|
+
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
|
|
1357
|
+
|
|
1358
|
+
<!-- If related to Item, process; If localfields processing is false AND there is no $5, process -->
|
|
1359
|
+
<xsl:if test="$pHasItem or not($localfields and marc:subfield[@code='5'])">
|
|
1360
|
+
<xsl:choose>
|
|
1361
|
+
<xsl:when test="$serialization = 'rdfxml'">
|
|
1362
|
+
<bf:note>
|
|
1363
|
+
<bf:Note>
|
|
1364
|
+
<rdf:type>
|
|
1365
|
+
<xsl:attribute name="rdf:resource">http://id.loc.gov/vocabulary/mnotetype/action</xsl:attribute>
|
|
1366
|
+
</rdf:type>
|
|
1367
|
+
<xsl:for-each select="marc:subfield[@code='a']">
|
|
1368
|
+
<rdfs:label>
|
|
1369
|
+
<xsl:if test="$vXmlLang != ''">
|
|
1370
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
1371
|
+
</xsl:if>
|
|
1372
|
+
<xsl:value-of select="."/>
|
|
1373
|
+
</rdfs:label>
|
|
1374
|
+
</xsl:for-each>
|
|
1375
|
+
<xsl:for-each select="marc:subfield[@code='c']">
|
|
1376
|
+
<bf:date>
|
|
1377
|
+
<xsl:call-template name="tChopPunct">
|
|
1378
|
+
<xsl:with-param name="pString" select="."/>
|
|
1379
|
+
</xsl:call-template>
|
|
1380
|
+
</bf:date>
|
|
1381
|
+
</xsl:for-each>
|
|
1382
|
+
<xsl:for-each select="marc:subfield[@code='h']">
|
|
1383
|
+
<rdfs:label>
|
|
1384
|
+
<xsl:if test="$vXmlLang != ''">
|
|
1385
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
1386
|
+
</xsl:if>
|
|
1387
|
+
<xsl:value-of select="."/>
|
|
1388
|
+
</rdfs:label>
|
|
1389
|
+
</xsl:for-each>
|
|
1390
|
+
<xsl:for-each select="marc:subfield[@code='k']">
|
|
1391
|
+
<bf:agent>
|
|
1392
|
+
<bf:Agent>
|
|
1393
|
+
<rdfs:label>
|
|
1394
|
+
<xsl:if test="$vXmlLang != ''">
|
|
1395
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
1396
|
+
</xsl:if>
|
|
1397
|
+
<xsl:call-template name="tChopPunct">
|
|
1398
|
+
<xsl:with-param name="pString" select="."/>
|
|
1399
|
+
</xsl:call-template>
|
|
1400
|
+
</rdfs:label>
|
|
1401
|
+
</bf:Agent>
|
|
1402
|
+
</bf:agent>
|
|
1403
|
+
</xsl:for-each>
|
|
1404
|
+
<xsl:for-each select="marc:subfield[@code='l']">
|
|
1405
|
+
<bf:status>
|
|
1406
|
+
<bf:Status>
|
|
1407
|
+
<rdfs:label>
|
|
1408
|
+
<xsl:if test="$vXmlLang != ''">
|
|
1409
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
1410
|
+
</xsl:if>
|
|
1411
|
+
<xsl:call-template name="tChopPunct">
|
|
1412
|
+
<xsl:with-param name="pString" select="."/>
|
|
1413
|
+
</xsl:call-template>
|
|
1414
|
+
</rdfs:label>
|
|
1415
|
+
</bf:Status>
|
|
1416
|
+
</bf:status>
|
|
1417
|
+
</xsl:for-each>
|
|
1418
|
+
<xsl:for-each select="marc:subfield[@code='z']">
|
|
1419
|
+
<bf:note>
|
|
1420
|
+
<bf:Note>
|
|
1421
|
+
<rdfs:label>
|
|
1422
|
+
<xsl:if test="$vXmlLang != ''">
|
|
1423
|
+
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
|
|
1424
|
+
</xsl:if>
|
|
1425
|
+
<xsl:call-template name="tChopPunct">
|
|
1426
|
+
<xsl:with-param name="pString" select="."/>
|
|
1427
|
+
</xsl:call-template>
|
|
1428
|
+
</rdfs:label>
|
|
1429
|
+
</bf:Note>
|
|
1430
|
+
</bf:note>
|
|
1431
|
+
</xsl:for-each>
|
|
1432
|
+
<xsl:apply-templates select="marc:subfield[@code='u']" mode="subfieldu">
|
|
1433
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1434
|
+
</xsl:apply-templates>
|
|
1435
|
+
<xsl:apply-templates select="marc:subfield[@code='2']" mode="subfield2">
|
|
1436
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1437
|
+
</xsl:apply-templates>
|
|
1438
|
+
<xsl:apply-templates select="marc:subfield[@code='3']" mode="subfield3">
|
|
1439
|
+
<xsl:with-param name="serialization" select="$serialization"/>
|
|
1440
|
+
</xsl:apply-templates>
|
|
1441
|
+
</bf:Note>
|
|
1442
|
+
</bf:note>
|
|
1443
|
+
</xsl:when>
|
|
1444
|
+
</xsl:choose>
|
|
1445
|
+
</xsl:if>
|
|
1446
|
+
</xsl:template>
|
|
1447
|
+
|
|
1448
|
+
</xsl:stylesheet>
|