forked from lcnetdev/marc2bibframe2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConvSpec-200-247not240-Titles.xspec
242 lines (233 loc) · 15.5 KB
/
ConvSpec-200-247not240-Titles.xspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<?xml version="1.0" encoding="UTF-8"?>
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:marc="http://www.loc.gov/MARC21/slim"
xmlns:bf="http://id.loc.gov/ontologies/bibframe/"
xmlns:bflc="http://id.loc.gov/ontologies/bflc/"
stylesheet="../xsl/marc2bibframe2.xsl" xslt-version="1.0">
<x:scenario label="210 - ABBREVIATED TITLE">
<x:scenario label="multiple 210s">
<x:context href="data/ConvSpec-200-247not240-Titles/marc210.xml"/>
<x:expect label="should create title properties in Instance" test="count(//bf:Instance[1]/bf:title) = 2"/>
</x:scenario>
<x:scenario label="@ind2 = ' '">
<x:context href="data/ConvSpec-200-247not240-Titles/marc210.xml"/>
<x:expect label="creates an issnkey source" test="//bf:Instance[2]/bf:title/bf:Title/bf:source/bf:Source/rdf:value = 'issnkey'"/>
</x:scenario>
<x:scenario label="rdfs:label for Title">
<x:context href="data/ConvSpec-200-247not240-Titles/marc210.xml"/>
<x:expect label="$a $b in record order" test="//bf:Instance[2]/bf:title/bf:Title/rdfs:label = 'Idler (Lond.)'"/>
</x:scenario>
<x:scenario label="$a">
<x:context href="data/ConvSpec-200-247not240-Titles/marc210.xml"/>
<x:expect label="becomes the mainTitle" test="//bf:Instance[2]/bf:title/bf:Title/bf:mainTitle = 'Idler'"/>
</x:scenario>
<x:scenario label="$b">
<x:context href="data/ConvSpec-200-247not240-Titles/marc210.xml"/>
<x:expect label="becomes the qualifier" test="//bf:Instance[2]/bf:title/bf:Title/bf:qualifier = 'Lond.'"/>
</x:scenario>
<x:scenario label="$2">
<x:context href="data/ConvSpec-200-247not240-Titles/marc210.xml"/>
<x:expect label="becomes the source" test="//bf:Instance[1]/bf:title[1]/bf:Title/bf:source/bf:Source/rdfs:label = 'DNLM'"/>
</x:scenario>
</x:scenario>
<x:scenario label="222 - KEY TITLE">
<x:scenario label="multiple 222s">
<x:context href="data/ConvSpec-200-247not240-Titles/marc222.xml"/>
<x:expect label="should create title properties in Instance" test="count(//bf:Instance[1]/bf:title) = 2"/>
</x:scenario>
<x:scenario label="@ind2">
<x:context href="data/ConvSpec-200-247not240-Titles/marc222.xml"/>
<x:expect label="should create the appropriate titleSortKey" test="//bf:Instance/bf:title[2]/bf:Title/bflc:titleSortKey = 'Vagrant (London)'"/>
</x:scenario>
<x:scenario label="rdfs:label for Title">
<x:context href="data/ConvSpec-200-247not240-Titles/marc222.xml"/>
<x:expect label="$a $b in record order" test="//bf:Instance/bf:title[1]/bf:Title/rdfs:label = 'Idler (London)'"/>
</x:scenario>
<x:scenario label="$a">
<x:context href="data/ConvSpec-200-247not240-Titles/marc222.xml"/>
<x:expect label="becomes the mainTitle" test="//bf:Instance/bf:title[1]/bf:Title/bf:mainTitle = 'Idler'"/>
</x:scenario>
<x:scenario label="$b">
<x:context href="data/ConvSpec-200-247not240-Titles/marc222.xml"/>
<x:expect label="becomes the qualifier" test="//bf:Instance/bf:title[1]/bf:Title/bf:qualifier = 'London'"/>
</x:scenario>
</x:scenario>
<x:scenario label="242 - TRANSLATION OF TITLE BY CATALOGING AGENCY">
<x:scenario label="multiple 242s">
<x:context href="data/ConvSpec-200-247not240-Titles/marc242.xml"/>
<x:expect label="should create title properties in Instance" test="count(//bf:Instance[1]/bf:title) = 2"/>
</x:scenario>
<x:scenario label="@ind2">
<x:context href="data/ConvSpec-200-247not240-Titles/marc242.xml"/>
<x:expect label="should create the appropriate titleSortKey" test="//bf:Instance[1]/bf:title/bf:Title/bflc:titleSortKey = 'Bureau'"/>
</x:scenario>
<x:scenario label="rdfs:label for Title">
<x:context href="data/ConvSpec-200-247not240-Titles/marc242.xml"/>
<x:expect label="$abchnp in record order" test="//bf:Instance[2]/bf:title/bf:Title/rdfs:label = 'Annual report of the Minister of Supply and Service Canada under the Corporations and Labour Unions Returns Act. Part II, Labour unions = Rapport annuel du ministre des Approvisionnements et services Canada présenté sous l''empire et des syndicates ouvriers. Partie II, Syndicats ouvriers.'"/>
</x:scenario>
<x:scenario label="$a">
<x:context href="data/ConvSpec-200-247not240-Titles/marc242.xml"/>
<x:expect label="becomes the mainTitle" test="//bf:Instance[1]/bf:title/bf:Title/bf:mainTitle = 'Le Bureau'"/>
</x:scenario>
<x:scenario label="$b">
<x:context href="data/ConvSpec-200-247not240-Titles/marc242.xml"/>
<x:expect label="becomes the subtitle" test="//bf:Instance[2]/bf:title/bf:Title/bf:subtitle = 'Rapport annuel du ministre des Approvisionnements et services Canada présenté sous l''empire et des syndicates ouvriers'"/>
</x:scenario>
<x:scenario label="$n">
<x:context href="data/ConvSpec-200-247not240-Titles/marc242.xml"/>
<x:expect label="becomes a partNumber" test="//bf:Instance[2]/bf:title/bf:Title/bf:partNumber[2] = 'Partie II'"/>
</x:scenario>
<x:scenario label="$p">
<x:context href="data/ConvSpec-200-247not240-Titles/marc242.xml"/>
<x:expect label="becomes a partName" test="//bf:Instance[2]/bf:title/bf:Title/bf:partName[2] = 'Syndicats ouvriers'"/>
</x:scenario>
<x:scenario label="$y">
<x:context href="data/ConvSpec-200-247not240-Titles/marc242.xml"/>
<x:expect label="becomes the language" test="//bf:Instance[1]/bf:title[1]/bf:Title/bf:language/bf:Language/@rdf:resource = 'http://id.loc.gov/vocabulary/languages/fre'"/>
</x:scenario>
</x:scenario>
<x:scenario label="243 - COLLECTIVE UNIFORM TITLE">
<x:scenario label="@ind2">
<x:context href="data/ConvSpec-200-247not240-Titles/marc243.xml"/>
<x:expect label="should create the appropriate titleSortKey" test="//bf:Work[1]/bf:title/bf:Title/bflc:titleSortKey = 'Compleat works of William Shakespeare, Abridged. Selections'"/>
</x:scenario>
<x:scenario label="rdfs:label for Title">
<x:context href="data/ConvSpec-200-247not240-Titles/marc243.xml"/>
<x:expect label="$adfgklmnoprs in record order" test="//bf:Work[1]/bf:title/bf:Title/rdfs:label = 'The Compleat works of William Shakespeare, Abridged. Selections'"/>
</x:scenario>
<x:scenario label="$a">
<x:context href="data/ConvSpec-200-247not240-Titles/marc243.xml"/>
<x:expect label="becomes the mainTitle" test="//bf:Work[1]/bf:title/bf:Title/bf:mainTitle = 'The Compleat works of William Shakespeare'"/>
</x:scenario>
</x:scenario>
<x:scenario label="245 - TITLE STATEMENT">
<x:scenario label="@ind2">
<x:context href="data/ConvSpec-200-247not240-Titles/marc245.xml"/>
<x:expect label="should create the appropriate titleSortKey" test="//bf:Instance[1]/bf:title/bf:Title/bflc:titleSortKey = 'Bureau La Oficina = Das Büro.'"/>
</x:scenario>
<x:scenario label="rdfs:label">
<x:context href="data/ConvSpec-200-247not240-Titles/marc245.xml"/>
<x:expect label="$abfgknps in record order" test="//bf:Instance[2]/bf:title/bf:Title/rdfs:label = 'Annual report of the Minister of Supply and Service Canada under the Corporations and Labour Unions Returns Act. Part II, Labour unions = Rapport annuel du ministre des Approvisionnements et services Canada présenté sous l''empire et des syndicates ouvriers. Partie II, Syndicats ouvriers.'"/>
<x:expect label="rdfs:label for Work" test="//bf:Work[2]/rdfs:label = 'Annual report of the Minister of Supply and Service Canada under the Corporations and Labour Unions Returns Act. Part II, Labour unions = Rapport annuel du ministre des Approvisionnements et services Canada présenté sous l''empire et des syndicates ouvriers. Partie II, Syndicats ouvriers.'"/>
<x:expect label="rdfs:label for Instance" test="//bf:Instance[2]/rdfs:label = 'Annual report of the Minister of Supply and Service Canada under the Corporations and Labour Unions Returns Act. Part II, Labour unions = Rapport annuel du ministre des Approvisionnements et services Canada présenté sous l''empire et des syndicates ouvriers. Partie II, Syndicats ouvriers.'"/>
</x:scenario>
<x:scenario label="$a">
<x:context href="data/ConvSpec-200-247not240-Titles/marc245.xml"/>
<x:expect label="becomes the mainTitle" test="//bf:Instance[1]/bf:title/bf:Title/bf:mainTitle = 'Le Bureau'"/>
</x:scenario>
<x:scenario label="$b">
<x:context href="data/ConvSpec-200-247not240-Titles/marc245.xml"/>
<x:expect label="becomes the subtitle" test="//bf:Instance[2]/bf:title/bf:Title/bf:subtitle = 'Rapport annuel du ministre des Approvisionnements et services Canada présenté sous l''empire et des syndicates ouvriers'"/>
</x:scenario>
<x:scenario label="$c">
<x:context href="data/ConvSpec-200-247not240-Titles/marc245.xml"/>
<x:expect label="becomes the Instance responsibility statement" test="//bf:Instance[3]/bf:responsibilityStatement = 'Alan Bird'"/>
</x:scenario>
<x:scenario label="$f">
<x:context href="data/ConvSpec-200-247not240-Titles/marc245.xml"/>
<x:expect label="becomes a Work originDate" test="//bf:Work[4]/bf:originDate = '1760-1878'"/>
</x:scenario>
<x:scenario label="$g">
<x:context href="data/ConvSpec-200-247not240-Titles/marc245.xml"/>
<x:expect label="becomes a Work originDate" test="//bf:Work[5]/bf:originDate = 'Jan.-Dec. 1985'"/>
</x:scenario>
<x:scenario label="$h">
<x:context href="data/ConvSpec-200-247not240-Titles/marc245.xml"/>
<x:expect label="creates a GenreForm entity in a genreForm property" test="//bf:Work[6]/bf:genreForm/bf:GenreForm/rdfs:label = 'sound recording'"/>
</x:scenario>
<x:scenario label="$n">
<x:context href="data/ConvSpec-200-247not240-Titles/marc245.xml"/>
<x:expect label="becomes a partNumber" test="//bf:Instance[2]/bf:title/bf:Title/bf:partNumber[2] = 'Partie II'"/>
</x:scenario>
<x:scenario label="$p">
<x:context href="data/ConvSpec-200-247not240-Titles/marc245.xml"/>
<x:expect label="becomes a partName" test="//bf:Instance[2]/bf:title/bf:Title/bf:partName[2] = 'Syndicats ouvriers'"/>
</x:scenario>
<x:scenario label="$s">
<x:context href="data/ConvSpec-200-247not240-Titles/marc245.xml"/>
<x:expect label="becomes a Work version" test="//bf:Work[4]/bf:version = 'Member release'"/>
</x:scenario>
</x:scenario>
<x:scenario label="246 - VARYING FORM OF TITLE">
<x:scenario label="multiple 246s">
<x:context href="data/ConvSpec-200-247not240-Titles/marc246.xml"/>
<x:expect label="should create title properties in Instance" test="count(//bf:Instance[1]/bf:title) = 3"/>
</x:scenario>
<x:scenario label="@ind2 = 1">
<x:context href="data/ConvSpec-200-247not240-Titles/marc246.xml"/>
<x:expect label="should create a ParallelTitle" test="//bf:Instance[1]/bf:title[2]/bf:Title/rdf:type/@rdf:resource ='http://id.loc.gov/ontologies/bibframe/ParallelTitle'"/>
</x:scenario>
<x:scenario label="other @ind2 value">
<x:context href="data/ConvSpec-200-247not240-Titles/marc246.xml"/>
<x:expect label="should become the variantType" test="//bf:Instance[3]/bf:title[2]/bf:Title/bf:variantType = 'portion'"/>
</x:scenario>
<x:scenario label="rdfs:label for Title">
<x:context href="data/ConvSpec-200-247not240-Titles/marc246.xml"/>
<x:expect label="$abgnp in record order" test="//bf:Instance[4]/bf:title/bf:Title/rdfs:label = 'Archives for meteorology, geophysics, and bioclimatology : an engrossing read. Serie A, Meteorology and geophysics'"/>
</x:scenario>
<x:scenario label="$a">
<x:context href="data/ConvSpec-200-247not240-Titles/marc246.xml"/>
<x:expect label="becomes the mainTitle" test="//bf:Instance[1]/bf:title[2]/bf:Title/bf:mainTitle = 'Moderne Probleme der Pharmakopsychiatrie'"/>
</x:scenario>
<x:scenario label="$b">
<x:context href="data/ConvSpec-200-247not240-Titles/marc246.xml"/>
<x:expect label="becomes the subtitle" test="//bf:Instance[2]/bf:title[2]/bf:Title/bf:subtitle = 'an engrossing read'"/>
</x:scenario>
<x:scenario label="$f">
<x:context href="data/ConvSpec-200-247not240-Titles/marc246.xml"/>
<x:expect label="becomes the date" test="//bf:Instance[3]/bf:title[2]/bf:Title/bf:date = 'Juli 1976-'"/>
</x:scenario>
<x:scenario label="$n">
<x:context href="data/ConvSpec-200-247not240-Titles/marc246.xml"/>
<x:expect label="becomes a partNumber" test="//bf:Instance[4]/bf:title/bf:Title/bf:partNumber = 'Serie A'"/>
</x:scenario>
<x:scenario label="$p">
<x:context href="data/ConvSpec-200-247not240-Titles/marc246.xml"/>
<x:expect label="becomes a partName" test="//bf:Instance[4]/bf:title/bf:Title/bf:partName = 'Meteorology and geophysics'"/>
</x:scenario>
<x:scenario label="$5">
<x:context href="data/ConvSpec-200-247not240-Titles/marc246.xml"/>
<x:expect label="becomes the applicableInstitution" test="//bf:Instance[4]/bf:title/bf:Title/bflc:applicableInstitution/bf:Agent/bf:code = 'DLC'"/>
</x:scenario>
</x:scenario>
<x:scenario label="247 - FORMER TITLE">
<x:scenario label="multiple 247s">
<x:context href="data/ConvSpec-200-247not240-Titles/marc247.xml"/>
<x:expect label="should create title properties in Instance" test="count(//bf:Instance[1]/bf:title) = 4"/>
</x:scenario>
<x:scenario label="rdfs:label for Title">
<x:context href="data/ConvSpec-200-247not240-Titles/marc247.xml"/>
<x:expect label="$abgnp in record order" test="//bf:Instance/bf:title[4]/bf:Title/rdfs:label = 'Archives for meteorology, geophysics, and bioclimatology. Serie A, Meteorology and geophysics (varies slightly)'"/>
</x:scenario>
<x:scenario label="$a">
<x:context href="data/ConvSpec-200-247not240-Titles/marc247.xml"/>
<x:expect label="becomes the mainTitle" test="//bf:Instance/bf:title[2]/bf:Title/bf:mainTitle = 'Everywoman''s magazine'"/>
</x:scenario>
<x:scenario label="$b">
<x:context href="data/ConvSpec-200-247not240-Titles/marc247.xml"/>
<x:expect label="becomes the subtitle" test="//bf:Instance[1]/bf:title[3]/bf:Title/bf:subtitle = 'orders, suborders, and great groups : National Soil Survey Classification of 1967'"/>
</x:scenario>
<x:scenario label="$f">
<x:context href="data/ConvSpec-200-247not240-Titles/marc247.xml"/>
<x:expect label="becomes the date" test="//bf:Instance/bf:title[2]/bf:Title/bf:date = 'v. 1-24, Jan. 1948-57'"/>
</x:scenario>
<x:scenario label="$g">
<x:context href="data/ConvSpec-200-247not240-Titles/marc247.xml"/>
<x:expect label="becomes a qualifier" test="//bf:Instance[1]/bf:title[4]/bf:Title/bf:qualifier = 'varies slightly'"/>
</x:scenario>
<x:scenario label="$n">
<x:context href="data/ConvSpec-200-247not240-Titles/marc247.xml"/>
<x:expect label="becomes a partNumber" test="//bf:Instance[1]/bf:title[4]/bf:Title/bf:partNumber = 'Serie A'"/>
</x:scenario>
<x:scenario label="$p">
<x:context href="data/ConvSpec-200-247not240-Titles/marc247.xml"/>
<x:expect label="becomes a partName" test="//bf:Instance[1]/bf:title[4]/bf:Title/bf:partName = 'Meteorology and geophysics'"/>
</x:scenario>
<x:scenario label="$x">
<x:context href="data/ConvSpec-200-247not240-Titles/marc247.xml"/>
<x:expect label="becomes the identifiedBy Issn" test="//bf:Instance[1]/bf:title[4]/bf:Title/bf:identifiedBy/bf:Issn/rdf:value = '1234-5678'"/>
</x:scenario>
</x:scenario>
</x:description>