-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathConvSpec-250-270.xspec
158 lines (136 loc) · 18.2 KB
/
ConvSpec-250-270.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
<?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="250 - EDITION STATEMENT">
<x:context href="data/ConvSpec-250-270/marc.xml"/>
<x:expect label="250 creates an editionStatement property of the Instance" test="//bf:Instance[1]/bf:editionStatement = '3rd draft / edited by Paul Watson'"/>
</x:scenario>
<x:scenario label="254 - MUSICAL EDITION STATEMENT">
<x:context href="data/ConvSpec-250-270/marc.xml"/>
<x:expect label="254 creates a editionStatement property of the Instance" test="//bf:Instance[1]/bf:editionStatement = 'Full score'"/>
</x:scenario>
<x:scenario label="255 - CARTOGRAPHIC MATHEMATICAL DATA">
<x:context href="data/ConvSpec-250-270/marc.xml"/>
<x:expect label="255 with $b/$c/$d/$e/$f/$g creates a cartographicAttributes/Cartographic property of the Work" test="count(//bf:Work[1]/bf:cartographicAttributes/bf:Cartographic) = 1"/>
<x:expect label="$a creates a scale/Scale property of the Work" test="//bf:Work[1]/bf:scale[1]/bf:Scale/rdfs:label = 'Scale [ca. 1:500,000]'"/>
<x:expect label="...even if no other subfields" test="//bf:Work[1]/bf:scale[2]/bf:Scale/rdfs:label = 'Scales differ'"/>
<x:expect label="$b creates a projection/Projection property of the Cartographic" test="//bf:Work[1]/bf:cartographicAttributes[1]/bf:Cartographic/bf:projection/bf:Projection/rdfs:label = 'Conic proj'"/>
<x:expect label="$c creates a coordinates property of the Cartographic" test="//bf:Work[1]/bf:cartographicAttributes[1]/bf:Cartographic/bf:coordinates = 'E 72°--E 148°/N 13°--N 18°'"/>
<x:expect label="$d creates an ascensionAndDeclination property of the Cartographic" test="//bf:Work[1]/bf:cartographicAttributes[1]/bf:Cartographic/bf:ascensionAndDeclination = 'RA 0 hr. to 24 hr./Decl. +90° to -90°'"/>
<x:expect label="$e creates an equinox property of the Cartographic" test="//bf:Work[1]/bf:cartographicAttributes[1]/bf:Cartographic/bf:equinox = 'eq. 1980'"/>
<x:expect label="$f creates an outerGRing property of the Cartographic" test="//bf:Work[1]/bf:cartographicAttributes[1]/bf:Cartographic/bf:outerGRing = '-113.628304 -113.498001 47.009300 46.087225'"/>
<x:expect label="$g creates an exclusionGRing property of the Cartographic" test="//bf:Work[1]/bf:cartographicAttributes[1]/bf:Cartographic/bf:exclusionGRing = '-113.628304 -113.498001 47.009300 46.087225'"/>
</x:scenario>
<x:scenario label="256 - COMPUTER FILE CHARACTERISTICS">
<x:context href="data/ConvSpec-250-270/marc.xml"/>
<x:expect label="256 creates a note property of the Instance" test="//bf:Instance[1]/bf:note[1]/bf:Note/rdfs:label = 'Computer data (2 files : 876,000, 775,000 records)'"/>
<x:expect label="...with rdf:type 'http://id.loc.gov/vocabulary/mnotetype/computer'" test="//bf:Instance[1]/bf:note[1]/bf:Note/rdf:type/@rdf:resource = 'http://id.loc.gov/vocabulary/mnotetype/computer'"/>
</x:scenario>
<x:scenario label="257 - COUNTRY OF PRODUCING ENTITY">
<x:context href="data/ConvSpec-250-270/marc.xml"/>
<x:expect label="257 creates an originPlace/Place property of the Instance" test="//bf:Instance[1]/bf:originPlace/bf:Place/rdfs:label = 'France'"/>
<x:expect label="$2 creates a source property of the Place" test="//bf:Instance[1]/bf:originPlace/bf:Place/bf:source/bf:Source/bf:code = 'naf'"/>
</x:scenario>
<x:scenario label="260 - PUBLICATION, DISTRIBUTION, ETC. (IMPRINT)">
<x:context href="data/ConvSpec-250-270/marc.xml"/>
<x:expect label="260 creates a provisionActivity/Publication property of the Instance" test="//bf:Instance[1]/bf:provisionActivity[2]/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Publication'"/>
<x:expect label="...if $e, $f, $g, it also creates a provisionActivity/Manufacture property of the Instance" test="//bf:Instance[1]/bf:provisionActivity[3]/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Manufacture'"/>
<x:expect label="$a creates a place property of the Publication" test="//bf:Instance[1]/bf:provisionActivity[2]/bf:ProvisionActivity/bflc:simplePlace[2] = 'Upton Snodsbury'"/>
<x:expect label="$b creates an agent property of the Publication" test="//bf:Instance[1]/bf:provisionActivity[1]/bf:ProvisionActivity/bflc:simpleAgent = 'Arts Council of Great Britain'"/>
<x:expect label="Agent label from $b should have brackets if $a or $c have unmatched brackets" test="//bf:Instance[3]/bf:provisionActivity/bf:ProvisionActivity/bflc:simpleAgent = '[s.n.]'"/>
<x:expect label="$c creates a date property of the publication" test="//bf:Instance[1]/bf:provisionActivity[2]/bf:ProvisionActivity/bflc:simpleDate = '<1981- >'"/>
<x:expect label="$d creates an identifiedBy/PublisherNumber property of the Instance" test="//bf:Instance[1]/bf:identifiedBy[1]/bf:PublisherNumber/rdf:value = '12345'"/>
<x:expect label="$e creates a place property of the Manufacture" test="//bf:Instance[1]/bf:provisionActivity[3]/bf:ProvisionActivity/bflc:simplePlace = 'Twickenham'"/>
<x:expect label="$f creates an agent property of the Manufacture" test="//bf:Instance[1]/bf:provisionActivity[3]/bf:ProvisionActivity/bflc:simpleAgent = 'CTD Printers'"/>
<x:expect label="$g creates a date property of the Manufacture" test="//bf:Instance[1]/bf:provisionActivity[3]/bf:ProvisionActivity/bflc:simpleDate = '1974'"/>
<x:expect label="$3 creates a bflc:appliesTo property of the ProvisionActivity" test="//bf:Instance[1]/bf:provisionActivity[2]/bf:ProvisionActivity/bflc:appliesTo/bflc:AppliesTo/rdfs:label = '1998-'"/>
</x:scenario>
<x:scenario label="261 - IMPRINT STATEMENT FOR FILMS (Pre-AACR 1 Revised)">
<x:context href="data/ConvSpec-250-270/marc.xml"/>
<x:expect label="261 creates a provisionActivity/Production property of the Instance" test="//bf:Instance[1]/bf:provisionActivity[5]/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Production'"/>
<x:expect label="...if $e, it also creates a provisionActivity/Manufacture property of the Instance" test="//bf:Instance[1]/bf:provisionActivity[7]/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Manufacture'"/>
<x:expect label="$a creates an agent property of the Production" test="//bf:Instance[1]/bf:provisionActivity[4]/bf:ProvisionActivity/bflc:simpleAgent = 'Produzioni europee associate'"/>
<x:expect label="$b creates an agent property of the Production" test="//bf:Instance[1]/bf:provisionActivity[7]/bf:ProvisionActivity/bflc:simpleAgent = 'Released in the U.S. by United Artists Corp'"/>
<x:expect label="$d creates a date property of the Production" test="//bf:Instance[1]/bf:provisionActivity[7]/bf:ProvisionActivity/bflc:simpleDate = '1957'"/>
<x:expect label="$e creates an agent property of the Manufacture" test="//bf:Instance[1]/bf:provisionActivity[7]/bf:ProvisionActivity/bflc:simpleAgent = 'Made by D.C. Chipperfield'"/>
<x:expect label="$f creates a place property of the Production" test="//bf:Instance[1]/bf:provisionActivity[4]/bf:ProvisionActivity/bflc:simplePlace = 'Rome'"/>
</x:scenario>
<x:scenario label="262 - IMPRINT STATEMENT FOR SOUND RECORDINGS (Pre-AACR 2)">
<x:context href="data/ConvSpec-250-270/marc.xml"/>
<x:expect label="$a creates a place property of the Publication" test="//bf:Instance[1]/bf:provisionActivity[9]/bf:ProvisionActivity/bflc:simplePlace = 'Louisville, KY'"/>
<x:expect label="$b creates an agent property of the Publication" test="//bf:Instance[1]/bf:provisionActivity[8]/bf:ProvisionActivity/bflc:simpleAgent = 'Louisville Orchestra'"/>
<x:expect label="$c creates a date property of the Publication" test="//bf:Instance[1]/bf:provisionActivity[9]/bf:ProvisionActivity/bflc:simpleDate = '[1967]'"/>
</x:scenario>
<x:scenario label="263 - PROJECTED PUBLICATION DATE">
<x:context href="data/ConvSpec-250-270/marc.xml"/>
<x:expect label="$a creates a bflc:projectedProvisionDate property of the Instance" test="//bf:Instance[1]/bflc:projectedProvisionDate = '1999--'"/>
</x:scenario>
<x:scenario label="264 - PRODUCTION, PUBLICATION, DISTRIBUTION, MANUFACTURE, AND COPYRIGHT NOTICE">
<x:context href="data/ConvSpec-250-270/marc.xml"/>
<x:expect label="264 creates a provisionActivity or copyrightDate property of the Instance" test="count(//bf:Instance[1]/bf:provisionActivity) = 12"/>
<x:expect label="...with resource class determined by ind2" test="//bf:Instance[1]/bf:provisionActivity[10]/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Publication'"/>
<x:expect label="...do not create additional class for ProvisionActivity if it can't be determined"
test="count(//bf:Instance[1]/bf:provisionActivity[12]/bf:ProvisionActivity/rdf:type) = 0"/>
<x:expect label="$3 creates a bflc:appliesTo property of the ProvisionActivity" test="//bf:Instance[1]/bf:provisionActivity[11]/bf:ProvisionActivity/bflc:appliesTo/bflc:AppliesTo/rdfs:label = '1981-'"/>
<x:expect label="$a creates a place property of the ProvisionActivity" test="//bf:Instance[1]/bf:provisionActivity[11]/bf:ProvisionActivity/bflc:simplePlace = 'Washington'"/>
<x:expect label="$b creates an agent property of the ProvisionActivity" test="//bf:Instance[1]/bf:provisionActivity[10]/bf:ProvisionActivity/bflc:simpleAgent = 'U.S. G.P.O.'"/>
<x:expect label="$c creates a date property of the ProvisionActivity" test="//bf:Instance[1]/bf:provisionActivity[11]/bf:ProvisionActivity/bflc:simpleDate = '1981-'"/>
<x:expect label="...unless ind2=4, then do not create ProvisionActivity, but create copyrightDate property of the Instance" test="//bf:Instance[1]/bf:copyrightDate='©2002'"/>
<x:expect label="...unless 008/06=t, then ignore (copyrightDate from 008/11-14)" test="count(//bf:Instance[2]/bf:copyrightDate)=1 and //bf:Instance[2]/bf:copyrightDate='1969'"/>
</x:scenario>
<x:scenario label="26X - Extra tests after Process8 introduced">
<x:context href="data/ConvSpec-250-270/marc-process8.xml"/>
<x:expect label="260 creates two provisionActivity resources" test="count(//bf:Instance[1]/bf:provisionActivity) = 2"/>
<x:expect label="...one is Publication: number 1" test="//bf:Instance[1]/bf:provisionActivity[1]/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Publication'"/>
<x:expect label="...and the other is Publication: number 2" test="//bf:Instance[1]/bf:provisionActivity[2]/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Publication'"/>
<x:expect label="...008 date is coded in second PA resource" test="//bf:Instance[1]/bf:provisionActivity[2]/bf:ProvisionActivity/bf:date[@rdf:datatype='http://id.loc.gov/datatypes/edtf'] = '1927'"/>
<x:expect label="...simplePlace of 2nd PA resource is London" test="//bf:Instance[1]/bf:provisionActivity[2]/bf:ProvisionActivity/bflc:simplePlace = 'London'"/>
<x:expect label="260 creates one provisionActivity resources" test="count(//bf:Instance[2]/bf:provisionActivity) = 1"/>
<x:expect label="...it is Publication." test="//bf:Instance[2]/bf:provisionActivity/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Publication'"/>
<x:expect label="...008 place is coded in PA resource" test="//bf:Instance[2]/bf:provisionActivity/bf:ProvisionActivity/bf:place/@rdf:resource = 'http://id.loc.gov/vocabulary/countries/ja'"/>
<x:expect label="...simpleDate with language tag, from matching 880" test="//bf:Instance[2]/bf:provisionActivity/bf:ProvisionActivity/bflc:simpleDate[@xml:lang='ja-jpan'] = '[昭和 62 i.e. 1987]'"/>
<x:expect label="Two 264s create one provisionActivity resource" test="count(//bf:Instance[3]/bf:provisionActivity) = 1"/>
<x:expect label="...and one copyright date" test="count(//bf:Instance[3]/bf:copyrightDate) = 1"/>
<x:expect label="260 creates two provisionActivity resources" test="count(//bf:Instance[4]/bf:provisionActivity) = 2"/>
<x:expect label="...one is Publication: number 1" test="//bf:Instance[4]/bf:provisionActivity[1]/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Publication'"/>
<x:expect label="...and the other is Manufacture: number 2" test="//bf:Instance[4]/bf:provisionActivity[2]/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Manufacture'"/>
<x:expect label="...008 date is coded in first PA resource" test="//bf:Instance[4]/bf:provisionActivity[1]/bf:ProvisionActivity/bf:date[@rdf:datatype='http://id.loc.gov/datatypes/edtf'] = '1983'"/>
<x:expect label="...simpleAgent of 1st PA resource has brackets" test="//bf:Instance[4]/bf:provisionActivity[1]/bf:ProvisionActivity/bflc:simpleAgent = '[Milnor Centennial Corp]'"/>
<x:expect label="Three 264s create three provisionActivity resources" test="count(//bf:Instance[5]/bf:provisionActivity) = 3"/>
<x:expect label="...one is Publication: number 1" test="//bf:Instance[5]/bf:provisionActivity[1]/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Publication'"/>
<x:expect label="...and the third is Publication: number 3" test="//bf:Instance[5]/bf:provisionActivity[3]/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Publication'"/>
<x:expect label="...status is 'current' in third, and last, PA resource" test="//bf:Instance[5]/bf:provisionActivity[3]/bf:ProvisionActivity/bf:status/bf:Status/@rdf:about = 'http://id.loc.gov/vocabulary/mstatus/current'"/>
<x:expect label="...and the third PA resource" test="//bf:Instance[5]/bf:provisionActivity[3]/bf:ProvisionActivity/bf:status/bf:Status/@rdf:about = 'http://id.loc.gov/vocabulary/mstatus/current'"/>
<x:expect label="...and 3rd has the stupid appliesTo" test="//bf:Instance[5]/bf:provisionActivity[3]/bf:ProvisionActivity/bflc:appliesTo/bflc:AppliesTo/rdfs:label = '<November 2019->'"/>
<x:expect label="260 creates one provisionActivity resources and 008 two" test="count(//bf:Instance[6]/bf:provisionActivity) = 3"/>
<x:expect label="...one is Publication: number 1" test="//bf:Instance[6]/bf:provisionActivity[1]/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Publication'"/>
<x:expect label="...one is Distribution: number 1" test="//bf:Instance[6]/bf:provisionActivity[2]/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Distribution'"/>
<x:expect label="...one is Production: number 1" test="//bf:Instance[6]/bf:provisionActivity[3]/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Production'"/>
<x:expect label="...008 date is coded in second PA resource" test="//bf:Instance[6]/bf:provisionActivity[2]/bf:ProvisionActivity/bf:date[@rdf:datatype='http://id.loc.gov/datatypes/edtf'] = '1998'"/>
<x:expect label="...008 date is coded in the third PA resource too" test="//bf:Instance[6]/bf:provisionActivity[3]/bf:ProvisionActivity/bf:date[@rdf:datatype='http://id.loc.gov/datatypes/edtf'] = '1996'"/>
<x:expect label="...and has two simpleAgent resources in 1st PA" test="count(//bf:Instance[6]/bf:provisionActivity[1]/bf:ProvisionActivity/bflc:simpleAgent) = 2"/>
<x:expect label="264 for a Serials creates one provisionActivity resource with a status of current from the 008" test="count(//bf:Instance[7]/bf:provisionActivity) = 1"/>
<x:expect label="...one is Publication: number 1" test="//bf:Instance[7]/bf:provisionActivity[1]/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Publication'"/>
<x:expect label="...008 status is coded in PA resource" test="//bf:Instance[7]/bf:provisionActivity[1]/bf:ProvisionActivity/bf:status/bf:Status/@rdf:about='http://id.loc.gov/vocabulary/mstatus/current'"/>
<x:expect label="264s for a Serials creates three provisionActivity resources each with a different status" test="count(//bf:Instance[8]/bf:provisionActivity) = 3"/>
<x:expect label="...one is Publication: number 1" test="//bf:Instance[8]/bf:provisionActivity[1]/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Publication'"/>
<x:expect label="...one status is earliest" test="//bf:Instance[8]/bf:provisionActivity[1]/bf:ProvisionActivity/bf:status/bf:Status/@rdf:about='http://id.loc.gov/vocabulary/mstatus/earliest'"/>
<x:expect label="...one doesn't have a defined status" test="count(//bf:Instance[8]/bf:provisionActivity[2]/bf:ProvisionActivity/bf:status) = 0"/>
<x:expect label="...and one has current status" test="//bf:Instance[8]/bf:provisionActivity[3]/bf:ProvisionActivity/bf:status/bf:Status/@rdf:about='http://id.loc.gov/vocabulary/mstatus/current'"/>
<x:expect label="...008 date is coded in third PA resource" test="//bf:Instance[8]/bf:provisionActivity[3]/bf:ProvisionActivity/bf:date[@rdf:datatype='http://id.loc.gov/datatypes/edtf'] = '1982/..'"/>
<x:expect label="264 for a Serials creates one provisionActivity resource but with a status of ceased from the 008" test="count(//bf:Instance[9]/bf:provisionActivity) = 1"/>
<x:expect label="...one is Publication: number 1" test="//bf:Instance[9]/bf:provisionActivity[1]/bf:ProvisionActivity/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bibframe/Publication'"/>
<x:expect label="...one status is earliest" test="//bf:Instance[9]/bf:provisionActivity[1]/bf:ProvisionActivity/bf:status/bf:Status/@rdf:about='http://id.loc.gov/vocabulary/mstatus/ceased'"/>
</x:scenario>
<x:scenario label="265 - SOURCE FOR ACQUISITION/SUBSCRIPTION ADDRESS [OBSOLETE]">
<x:context href="data/ConvSpec-250-270/marc.xml"/>
<x:expect label="265 creates an acquisitionSource of the Instance" test="//bf:Instance[1]/bf:acquisitionSource[1]/bf:AcquisitionSource/rdfs:label = 'U.S. Geological Survey, Reston, Va. 22091'"/>
</x:scenario>
</x:description>