forked from lcnetdev/marc2bibframe2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConvSpec-600-662.xspec
158 lines (139 loc) · 16 KB
/
ConvSpec-600-662.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="600,610,611 NAMES/TITLES">
<!-- other tests for name/title fields in ConvSpec-1XX,7XX,8XX-names.xspec -->
<x:context href="data/ConvSpec-1XX,6XX,7XX,8XX-names/marc.xml"/>
<x:expect label="600,610,611 without $t creates a subject/Agent property of the Work" test="//bf:Work[1]/bf:subject[3]/bf:Agent/rdfs:label='Beethoven, Ludwig van, 1770-1827 (Spirit)'"/>
<x:expect label="Complex subjects in 600/610/611 put the Agent in the madsrdf:componentList" test="count(//bf:Work[1]/bf:subject/bf:Topic/madsrdf:componentList/bf:Agent) = 1"/>
<x:expect label="...with rdfs:label composed according to Name processing rules" test="//bf:Work[1]/bf:subject/bf:Topic/madsrdf:componentList/bf:Agent/rdfs:label = 'Nixon, Richard M. (Richard Milhouse), 1913-'"/>
<x:expect label="...Topic also has a Class from MADSRDF" test="//bf:Work[1]/bf:subject[1]/bf:Topic/rdf:type/@rdf:resource = 'http://www.loc.gov/mads/rdf/v1#ComplexSubject'"/>
<x:expect label="...and a madsrdf:authoritativeLabel property" test="//bf:Work[1]/bf:subject[1]/bf:Topic/madsrdf:authoritativeLabel = 'Nixon, Richard M. (Richard Milhouse), 1913---Psychology.'"/>
<x:expect label="...and a madsrdf:isMemberOfMADSScheme property" test="//bf:Work[1]/bf:subject[1]/bf:Topic/madsrdf:isMemberOfMADSScheme/@rdf:resource = 'http://id.loc.gov/authorities/subjects'"/>
<x:expect label="...ind2 creates a source property of the Topic" test="//bf:Work[1]/bf:subject[1]/bf:Topic/bf:source/@rdf:resource = 'http://id.loc.gov/authorities/subjects'"/>
<x:expect label="600,610,611 with $t creates a subject/Hub property of the Work" test="count(//bf:Work[1]/bf:subject/bf:Hub) = 1"/>
<x:expect label="...with contribution from Name portion of field" test="//bf:Work[1]/bf:subject[2]/bf:Hub/bf:contribution/bf:Contribution/bf:agent/bf:Agent/rdfs:label = 'Bellamy, Edward, 1850-1898'"/>
<x:expect label="...and title from the Title portion" test="//bf:Work[1]/bf:subject[2]/bf:Hub/bf:title/bf:Title/bf:mainTitle = 'Looking backward, 2000-1887'"/>
<x:expect label="...and a Class from MADSRDF" test="//bf:Work[1]/bf:subject[2]/bf:Hub/rdf:type/@rdf:resource = 'http://www.loc.gov/mads/rdf/v1#NameTitle'"/>
<x:expect label="...and a madsrdf:authoritativeLabel property" test="//bf:Work[1]/bf:subject[2]/bf:Hub/madsrdf:authoritativeLabel = 'Bellamy, Edward, 1850-1898. Looking backward, 2000-1887.'"/>
</x:scenario>
<x:scenario label="630 - SUBJECT ADDED ENTRY--UNIFORM TITLE - 1">
<!-- other tests for uniform title fields in ConvSpec-240andX30-UnifTitle.xspec -->
<x:context href="data/ConvSpec-240andX30-UnifTitle/marc.xml"/>
<x:expect label="630 becomes a subject of the main Work" test="//bf:Work[@rdf:about='http://example.org/1#Work']/bf:subject[1]/bf:Topic/madsrdf:componentList/bf:Hub/bf:title/bf:Title/bf:mainTitle = 'Ukrainian weekly depicted'"/>
<x:expect label="...with NO bflc:relationship carried over from $e/$4" test="count(//bf:Work[@rdf:about='http://example.org/1#Work']/bf:subject[1]/bf:Topic/madsrdf:componentList/bf:Hub/bflc:relationship) = 0"/>
</x:scenario>
<x:scenario label="630 - SUBJECT ADDED ENTRY--UNIFORM TITLE - 2">
<!-- other tests for uniform title fields in ConvSpec-240andX30-UnifTitle.xspec -->
<x:context href="data/ConvSpec-1XX,6XX,7XX,8XX-names/marc.xml"/>
<x:expect label="630 becomes a subject Hub of the main Work" test="//bf:Work[@rdf:about='http://example.org/2#Work']/bf:subject[2]/bf:Hub/bf:title/bf:Title/bf:mainTitle = 'Bible'"/>
<x:expect label=" ... with NO bf:role carried over from $4" test="count(//bf:Work[@rdf:about='http://example.org/2#Work']/bf:subject[2]/bf:Hub/bf:role) = 0"/>
</x:scenario>
<x:scenario label="647 - SUBJECT -- NAMED EVENT">
<x:context href="data/ConvSpec-648-662/marc.xml"/>
<x:expect label="647 creates a subject/Event property of the Work" test="count(//bf:Work[1]/bf:subject/bf:Event) = 1"/>
<x:expect label="ind2 creates a source property of the Event" test="//bf:Work[1]/bf:subject[3]/bf:Event/bf:source/@rdf:resource = 'http://id.loc.gov/vocabulary/subjectSchemes/fast'"/>
<x:expect label="Event has no additional Class from MADSRDF" test="count(//bf:Work[1]/bf:subject[3]/bf:Event/rdf:type) = 0"/>
<x:expect label="$acd create the rdfs:label property of the Topic" test="//bf:Work[1]/bf:subject[3]/bf:Event/rdfs:label = 'Allied Occupation of Germany (Germany : 1918-1930)'"/>
<x:expect label="...and the madsrdf:authoritativeLabel property" test="//bf:Work[1]/bf:subject[3]/bf:Event/madsrdf:authoritativeLabel = 'Allied Occupation of Germany (Germany : 1918-1930)'"/>
<x:expect label="647 creates a subject/Event property of the Work" test="count(//bf:Work[1]/bf:subject/bf:Topic) = 12"/>
<x:expect label="ind2 creates a source property of the Event" test="//bf:Work[1]/bf:subject[4]/bf:Topic/bf:source/@rdf:resource = 'http://id.loc.gov/vocabulary/subjectSchemes/fast'"/>
<x:expect label="Event has no additional Class from MADSRDF" test="count(//bf:Work[1]/bf:subject[4]/bf:Topic/rdf:type) = 1"/>
<x:expect label="$acd create the rdfs:label property of the Topic" test="//bf:Work[1]/bf:subject[4]/bf:Topic/rdfs:label = 'Allied Occupation 1918-1930--Europe--Tanks'"/>
<x:expect label="...and the madsrdf:authoritativeLabel within a Event componentList item" test="//bf:Work[1]/bf:subject[4]/bf:Topic/madsrdf:componentList/bf:Event/madsrdf:authoritativeLabel = 'Allied Occupation 1918-1930'"/>
</x:scenario>
<x:scenario label="648 - SUBJECT ADDED ENTRY--CHRONOLOGICAL TERM">
<x:context href="data/ConvSpec-648-662/marc.xml"/>
<x:expect label="648 creates a subject/Temporal property of the Work" test="count(//bf:Work[1]/bf:subject/bf:Temporal) = 1"/>
<x:expect label="ind2 creates a source property of the Temporal" test="//bf:Work[1]/bf:subject[5]/bf:Temporal/bf:source/@rdf:resource = 'http://id.loc.gov/vocabulary/subjectSchemes/fast'"/>
<x:expect label="Temporal also has Class from MADSRDF" test="//bf:Work[1]/bf:subject[5]/bf:Temporal/rdf:type/@rdf:resource = 'http://www.loc.gov/mads/rdf/v1#Temporal'"/>
<x:expect label="$avxyz create the rdfs:label property of the Topic" test="//bf:Work[1]/bf:subject[5]/bf:Temporal/rdfs:label = '1900-1999'"/>
<x:expect label="...and the madsrdf:authoritativeLabel property" test="//bf:Work[1]/bf:subject[5]/bf:Temporal/madsrdf:authoritativeLabel = '1900-1999'"/>
</x:scenario>
<x:scenario label="650 - SUBJECT ADDED ENTRY--TOPICAL TERM">
<x:context href="data/ConvSpec-648-662/marc.xml"/>
<x:expect label="650 creates a subject/Topic property of the Work" test="count(//bf:Work[1]/bf:subject/bf:Topic)=12"/>
<x:expect label="$abcdvxyz create the rdfs:label property of the Topic" test="//bf:Work[1]/bf:subject[6]/bf:Topic/rdfs:label = 'Caracas Bolivar Statue Far away Long ago--History'"/>
<x:expect label="$g creates a note property of the Topic" test="//bf:Work[1]/bf:subject[6]/bf:Topic/bf:note/bf:Note/rdfs:label = 'Miscellania'"/>
<x:expect label="$abcdvxyz create a madsrdf:componentList property of the Topic" test="count(//bf:Work[1]/bf:subject[6]/bf:Topic/madsrdf:componentList) = 1"/>
<x:expect label="...with components from the subfields" test="//bf:Work[1]/bf:subject[6]/bf:Topic/madsrdf:componentList/madsrdf:Topic[1]/madsrdf:authoritativeLabel = 'Caracas Bolivar Statue Far away Long ago'"/>
<x:expect label="Period stripped from last subfield" test="//bf:Work[1]/bf:subject[7]/bf:Topic/rdfs:label = 'Baseball cards'"/>
</x:scenario>
<x:scenario label="651 - SUBJECT ADDED ENTRY--GEOGRAPHIC NAME">
<x:context href="data/ConvSpec-648-662/marc.xml"/>
<x:expect label="651 creates a subject/Place property of the Work" test="count(//bf:Work[1]/bf:subject/bf:Place) = 2"/>
<x:expect label="...with a Class from MADSRDF" test="//bf:Work[1]/bf:subject[8]/bf:Place/rdf:type/@rdf:resource = 'http://www.loc.gov/mads/rdf/v1#Geographic'"/>
<x:expect label="Names $0 used as isIdentifiedByAuthority URI" test="//bf:Work[1]/bf:subject[8]/bf:Place/madsrdf:isIdentifiedByAuthority/@rdf:resource = 'http://id.loc.gov/authorities/names/n97057532'"/>
<x:expect label="...and Names $0 converted to Agent $1 used as rdf:about" test="//bf:Work[1]/bf:subject[8]/bf:Place/@rdf:about = 'http://id.loc.gov/rwo/agents/n97057532'"/>
</x:scenario>
<x:scenario label="653 - INDEX TERM--UNCONTROLLED">
<x:context href="data/ConvSpec-648-662/marc.xml"/>
<x:expect label="ind2 determine the class of the created object" test="local-name(//bf:Work[1]/bf:subject[9]/*) = 'Topic'"/>
<x:expect label="$a creates a subject/Topic (or other) property of the Work" test="//bf:Work[1]/bf:subject[9]/bf:Topic/rdfs:label = 'Man'"/>
<x:expect label="is identified as an Uncontrolled resource" test="//bf:Work[1]/bf:subject[9]/bf:Topic/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bflc/Uncontrolled'"/>
</x:scenario>
<x:scenario label="653 - INDEX TERM--UNCONTROLLED">
<x:context href="data/ConvSpec-648-662/marc.xml"/>
<x:expect label="ind2 determine the class of the created object" test="local-name(//bf:Work[1]/bf:subject[18]/*) = 'Topic'"/>
<x:expect label="$0 creates an rdf:about property of the Work" test="//bf:Work[1]/bf:subject[18]/bf:Topic/@rdf:about = 'https://www.wikidata.org/wiki/Q40614'"/>
<x:expect label="$a creates a subject/Topic (or other) property of the Work" test="//bf:Work[1]/bf:subject[18]/bf:Topic/rdfs:label = 'fossil'"/>
<x:expect label="is identified as an Uncontrolled resource" test="//bf:Work[1]/bf:subject[18]/bf:Topic/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bflc/Uncontrolled'"/>
<x:expect label="ind2 determine the class of the created object" test="local-name(//bf:Work[1]/bf:subject[19]/*) = 'Topic'"/>
<x:expect label="$a creates a subject/Topic (or other) property of the Work" test="//bf:Work[1]/bf:subject[19]/bf:Topic/rdfs:label = 'fossil'"/>
<x:expect label="$5 creates an applicationInstitution property of the Work" test="//bf:Work[1]/bf:subject[19]/bf:Topic/bflc:applicableInstitution/bf:Agent/bf:code = 'DLC'"/>
<x:expect label="is identified as an Uncontrolled resource" test="//bf:Work[1]/bf:subject[19]/bf:Topic/rdf:type/@rdf:resource = 'http://id.loc.gov/ontologies/bflc/Uncontrolled'"/>
</x:scenario>
<x:scenario label="655 - INDEX TERM--GENRE/FORM">
<x:context href="data/ConvSpec-648-662/marc.xml"/>
<x:expect label="655 creates a genreForm/GenreForm property of the Work" test="count(//bf:Work[1]/bf:genreForm/bf:GenreForm) = 2"/>
<x:expect label="655 with subfields creates a subject/Topic property of the Work" test="count(//bf:Work[1]/bf:subject/bf:Topic[contains(@rdf:about, 'GenreForm655')]) = 2"/>
<x:expect label="...with a Class from MADSRDF" test="//bf:Work[1]/bf:genreForm[1]/bf:GenreForm/rdf:type/@rdf:resource = 'http://www.loc.gov/mads/rdf/v1#GenreForm'"/>
</x:scenario>
<x:scenario label="656 - INDEX TERM--OCCUPATION">
<x:context href="data/ConvSpec-648-662/marc.xml"/>
<x:expect label="656 creates a subject/Topic property of the work" test="count(//bf:Work[1]/bf:subject/bf:Topic) = 12"/>
<x:expect label="...with a URI (not a blank node)" test="//bf:Work[1]/bf:subject[14]/bf:Topic/@rdf:about = 'http://example.org/1#Topic656-15'"/>
<x:expect label="...with rdf:type of madsrdf:ComplexSubject" test="//bf:Work[1]/bf:subject[14]/bf:Topic/rdf:type/@rdf:resource = 'http://www.loc.gov/mads/rdf/v1#ComplexSubject'"/>
<x:expect label="$akvxyz creates an rdfs:label property of the Topic" test="//bf:Work[1]/bf:subject[14]/bf:Topic/rdfs:label = 'Chauffeurs--France.'"/>
<x:expect label="...and become components in the madsrdf:componentList of the Topic" test="//bf:Work[1]/bf:subject[14]/bf:Topic/madsrdf:componentList/madsrdf:Occupation/rdfs:label = 'Chauffeurs'"/>
<x:expect label="$2 creates a source property of the Topic" test="//bf:Work[1]/bf:subject[14]/bf:Topic/bf:source/bf:Source/bf:code = 'someCode'"/>
</x:scenario>
<x:scenario label="662 - SUBJECT ADDED ENTRY--HIERARCHICAL PLACE NAME">
<x:context href="data/ConvSpec-648-662/marc.xml"/>
<x:expect label="662 creates a subject/Place property of the work" test="count(//bf:Work[1]/bf:subject/bf:Place) = 2"/>
<x:expect label="...with a URI (not a blank node)" test="//bf:Work[1]/bf:subject[15]/bf:Place/@rdf:about = 'http://example.org/1#Place662-16'"/>
<x:expect label="...with rdf:type of madsrdf:HierarchicalGeographic" test="//bf:Work[1]/bf:subject[15]/bf:Place/rdf:type/@rdf:resource = 'http://www.loc.gov/mads/rdf/v1#HierarchicalGeographic'"/>
<x:expect label="$abcdfgh creates an rdfs:label property of the Topic" test="//bf:Work[1]/bf:subject[15]/bf:Place/rdfs:label = 'Japan--Hokkaido--Asahi-dake.'"/>
<x:expect label="...and become components in the madsrdf:componentList of the Topic" test="//bf:Work[1]/bf:subject[15]/bf:Place/madsrdf:componentList/*[3]/rdfs:label = 'Asahi-dake'"/>
<x:expect label="...with the appropriate madsrdf Class" test="//bf:Work[1]/bf:subject[15]/bf:Place/madsrdf:componentList/madsrdf:County/rdfs:label = 'Hokkaido'"/>
<x:expect label="$2 creates source property of the Place" test="//bf:Work[1]/bf:subject[15]/bf:Place/bf:source/bf:Source/@rdf:about='http://id.loc.gov/vocabulary/subjectSchemes/pemracs'"/>
</x:scenario>
<x:scenario label="647 - SUBJECT ADDED ENTRY--EVENT--URIS">
<x:context href="data/ConvSpec-648-662/marc_uris.xml"/>
<x:expect label="647 creates a subject/Event property of the Work" test="count(//bf:Work[1]/bf:subject/bf:Event)=1"/>
<x:expect label="FAST identifier in $0 converted to URI and used for rdf:about" test="//bf:Work[1]/bf:subject[1]/bf:Event/@rdf:about = 'http://id.worldcat.org/fast/01351651'"/>
<x:expect label="...and $1 used as identifiesRWO" test="//bf:Work[1]/bf:subject[1]/bf:Event/madsrdf:identifiesRWO/@rdf:resource = 'https://id.oclc.org/worldcat/entity/E39Qhp4vB9x3k8H8xR7TqHFkBX'"/>
</x:scenario>
<x:scenario label="650 - SUBJECT ADDED ENTRY--TOPICAL TERM--URIS">
<x:context href="data/ConvSpec-648-662/marc_uris.xml"/>
<x:expect label="650 creates a subject/Topic property of the Work" test="count(//bf:Work[1]/bf:subject/bf:Topic)=6"/>
<x:expect label="LCSH $0 used for rdf:about" test="//bf:Work[1]/bf:subject[2]/bf:Topic/@rdf:about = 'http://id.loc.gov/authorities/subjects/sh91003756'"/>
<x:expect label="FAST identifier in $0 converted to URI and used for rdf:about" test="//bf:Work[1]/bf:subject[4]/bf:Topic/@rdf:about = 'http://id.worldcat.org/fast/01114228'"/>
<x:expect label="FAST identifier in $0 converted to URI and used for rdf:about" test="//bf:Work[1]/bf:subject[5]/bf:Topic/@rdf:about = 'http://id.worldcat.org/fast/01155423'"/>
<x:expect label="...and $1 used as identifiesRWO" test="//bf:Work[1]/bf:subject[5]/bf:Topic/madsrdf:identifiesRWO/@rdf:resource = 'https://id.oclc.org/entity/1'"/>
<x:expect label="Homosaurus URI in $1 used as resource URI" test="//bf:Work[1]/bf:subject[6]/bf:Topic/@rdf:about = 'https://homosaurus.org/v3/homoit0001048'"/>
</x:scenario>
<x:scenario label="651 - SUBJECT ADDED ENTRY--PLACE--URIS">
<x:context href="data/ConvSpec-648-662/marc_uris.xml"/>
<x:expect label="651 creates a subject/Place property of the Work" test="count(//bf:Work[1]/bf:subject/bf:Place)=1"/>
<x:expect label="Names $0 used as isIdentifiedByAuthority URI" test="//bf:Work[1]/bf:subject[8]/bf:Place/madsrdf:isIdentifiedByAuthority/@rdf:resource = 'http://id.loc.gov/authorities/names/n97057532'"/>
<x:expect label="...and Names $0 converted to Agent $1 used as rdf:about" test="//bf:Work[1]/bf:subject[8]/bf:Place/@rdf:about = 'http://id.loc.gov/rwo/agents/n97057532'"/>
</x:scenario>
</x:description>