forked from lcnetdev/marc2bibframe2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConvSpec-200-247not240-Titles.xspec
177 lines (166 loc) · 12.7 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
<?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/"
xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"
stylesheet="../xsl/marc2bibframe2.xsl" xslt-version="1.0">
<x:scenario label="210 - ABBREVIATED TITLE">
<x:context href="data/ConvSpec-200-247not240-Titles/marc210.xml"/>
<x:expect label="ind2 = # creates AbbreviatedTitle in Work, not Instance" test="count(//bf:Work[2]/bf:title/bf:AbbreviatedTitle) = 1 and count(//bf:Instance[2]/bf:title/bf:AbbreviatedTitle) = 0"/>
<x:expect label="ind2 = 0 creates AbbreviatedTitle in Instance, not Work" test="count(//bf:Instance[1]/bf:title/bf:AbbreviatedTitle) = 2 and count(//bf:Work[1]/bf:title/bf:AbbreviatedTitle) = 0"/>
<x:expect label="$a generates mainTitle" test="//bf:Work[2]/bf:title/bf:AbbreviatedTitle/bf:mainTitle = 'Idler'"/>
<x:expect label="$b generates qualifier" test="//bf:Work[2]/bf:title/bf:AbbreviatedTitle/bf:qualifier = '(Lond.)'"/>
<x:expect label="if ind2 = 0, $2 becomes the assigner" test="//bf:Instance[1]/bf:title[1]/bf:AbbreviatedTitle/bf:assigner/bf:Agent/bf:code = 'DNLM'"/>
<x:expect label="if ind2 = #, assigner is 'issnkey'" test="//bf:Work[2]/bf:title/bf:AbbreviatedTitle/bf:assigner/bf:Agent/bf:code='issnkey'"/>
</x:scenario>
<x:scenario label="222 - KEY TITLE">
<x:context href="data/ConvSpec-200-247not240-Titles/marc222.xml"/>
<x:expect label="MARC 222 should create title/KeyTitle properties in Work" test="count(//bf:Work[1]/bf:title/bf:KeyTitle) = 2"/>
<x:expect label="@ind2 should create the appropriate nonSortNum" test="//bf:Work/bf:title[2]/bf:KeyTitle/bflc:nonSortNum = '4'"/>
<x:expect label= "$a generates mainTitle" test="//bf:Work/bf:title[1]/bf:KeyTitle/bf:mainTitle = 'Idler'"/>
<x:expect label= "$b generates qualifier" test="//bf:Work/bf:title[1]/bf:KeyTitle/bf:qualifier = '(London)'"/>
</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/VariantTitle properties in Instance" test="count(//bf:Instance[1]/bf:title/bf:VariantTitle) = 2"/>
</x:scenario>
<x:scenario label="@ind2">
<x:context href="data/ConvSpec-200-247not240-Titles/marc242.xml"/>
<x:expect label="should create the appropriate nonSortNum" test="//bf:Instance[1]/bf:title/bf:VariantTitle/bflc:nonSortNum = '3'"/>
</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:VariantTitle/bf:mainTitle = 'Le Bureau'"/>
<x:expect label="has an xmllang attribute" test="//bf:Instance[1]/bf:title[1]/bf:VariantTitle/bf:mainTitle/@xml:lang = 'fre'"/>
<x:expect label="but English one does not" test="count(//bf:Instance[1]/bf:title[2]/bf:VariantTitle/bf:mainTitle/@xml:lang) = 0"/>
</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:VariantTitle/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:VariantTitle/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:VariantTitle/bf:partName[2] = 'Syndicats ouvriers'"/>
</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 nonSortNum" test="//bf:Work[1]/bf:title/bf:CollectiveTitle/bflc:nonSortNum = '4'"/>
</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:CollectiveTitle/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 nonSortNum" test="//bf:Instance[1]/bf:title/bf:Title/bflc:nonSortNum = '3'"/>
</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 for the Instance title" 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:expect label="...but not for the Work" test="count(//bf:Work[2]/bf:title/bf:Title/bf:subtitle) = 0"/>
</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:expect label="...but prefer the 046 $k" test="count(//bf:Work[7]/bf:originDate) = 1 and //bf:Work[7]/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="$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:expect label="trim trailing '='" test="//bf:Instance[2]/bf:title/bf:Title/bf:partName[1] = 'Labour unions'"/>
</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:context href="data/ConvSpec-200-247not240-Titles/marc246.xml"/>
<x:expect label="Sometimes MARC 246 should create title properties in Instance" test="count(//bf:Instance[3]/bf:title) = 2"/>
<x:expect label="...and sometimes in the Work" test="count(//bf:Work[1]/bf:title) = 3"/>
<x:expect label="@ind2 = 1 should create a ParallelTitle" test="count(//bf:Work[1]/bf:title[2]/bf:ParallelTitle) = 1"/>
<x:expect label="@ind2 = ' ' creates no variantType property" test="count(//bf:Work[2]/bf:title/bf:VariantTitle/bf:variantType) = 0"/>
<x:expect label="other @ind2 value should become the variantType...sometimes for the Work" test="//bf:Work[4]/bf:title[1]/bf:VariantTitle/bf:variantType = 'distinctive'"/>
<x:expect label="...and sometimes for the Instance" test="//bf:Instance[3]/bf:title[2]/bf:VariantTitle/bf:variantType = 'cover'"/>
<x:expect label="$a becomes the mainTitle" test="//bf:Work[1]/bf:title[2]/bf:ParallelTitle/bf:mainTitle = 'Moderne Probleme der Pharmakopsychiatrie'"/>
<x:expect label="$b becomes the subtitle" test="//bf:Work[2]/bf:title[2]/bf:VariantTitle/bf:subtitle = 'an engrossing read'"/>
<x:expect label="$f becomes the date" test="//bf:Instance[3]/bf:title[2]/bf:VariantTitle/bf:date = 'Juli 1976-'"/>
<x:expect label="$i generates a note property" test="//bf:Work[4]/bf:title/bf:VariantTitle/bf:note/bf:Note/rdfs:label = 'Issues for Apr. and Oct. each year have title'"/>
<x:expect label="$n becomes a partNumber" test="//bf:Work[4]/bf:title/bf:VariantTitle/bf:partNumber = 'Serie A'"/>
<x:expect label="$p becomes a partName" test="//bf:Work[4]/bf:title/bf:VariantTitle/bf:partName = 'Meteorology and geophysics'"/>
<x:expect label="$5 becomes the applicableInstitution" test="//bf:Work[4]/bf:title/bf:VariantTitle/bflc:applicableInstitution/bf:Agent/bf:code = 'DLC'"/>
<x:expect label="Variant title without langtag" test="//bf:Work[5]/bf:title[1]/bf:VariantTitle/bf:variantType = 'portion'"/>
<x:expect label="Variant title without langtag" test="//bf:Work[5]/bf:title[1]/bf:VariantTitle/bf:mainTitle[not(@xml:lang)] = 'Hua wen chuang zuo san di yu'"/>
<x:expect label="Variant title with langtag" test="//bf:Work[5]/bf:title[1]/bf:VariantTitle/bf:mainTitle[@xml:lang='zh-hani'] = '华文创作三地域'"/>
</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/VariantTitle properties in Work" test="count(//bf:Work[1]/bf:title/bf:VariantTitle) = 3"/>
</x:scenario>
<x:scenario label="$a">
<x:context href="data/ConvSpec-200-247not240-Titles/marc247.xml"/>
<x:expect label="becomes the mainTitle" test="//bf:Work[1]/bf:title[2]/bf:VariantTitle/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:Work[1]/bf:title[3]/bf:VariantTitle/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:Work[1]/bf:title[2]/bf:VariantTitle/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:Work[1]/bf:title[4]/bf:VariantTitle/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:Work[1]/bf:title[4]/bf:VariantTitle/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:Work[1]/bf:title[4]/bf:VariantTitle/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:Work[1]/bf:title[4]/bf:VariantTitle/bf:identifiedBy/bf:Issn/rdf:value = '1234-5678'"/>
</x:scenario>
<x:scenario label="247/Variant 880 pairing">
<x:context href="data/ConvSpec-200-247not240-Titles/marc247.xml"/>
<x:expect label="Variant title without langtag" test="//bf:Work[2]/bf:title[1]/bf:VariantTitle/bf:variantType = 'former'"/>
<x:expect label="Variant title without langtag" test="//bf:Work[2]/bf:title[1]/bf:VariantTitle/bf:mainTitle[not(@xml:lang)] = 'Taiwan Sheng ren kou tong ji'"/>
<x:expect label="Variant title with langtag" test="//bf:Work[2]/bf:title[1]/bf:VariantTitle/bf:mainTitle[@xml:lang='zh-hani'] = '臺灣省人口統計'"/>
<x:expect label="Variant title without langtag" test="//bf:Work[2]/bf:title[1]/bf:VariantTitle/bf:date[not(@xml:lang)] = '1961-'"/>
<x:expect label="Variant title with langtag" test="//bf:Work[2]/bf:title[1]/bf:VariantTitle/bf:date[@xml:lang='zh-hani'] = '1961-'"/>
</x:scenario>
</x:scenario>
</x:description>