forked from lcnetdev/marc2bibframe2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConvSpec-006,008.xspec
149 lines (134 loc) · 15 KB
/
ConvSpec-006,008.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
<?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="006 - FIXED-LENGTH DATA ELEMENTS-- ADDITIONAL MATERIAL CHARACTERISTICS">
<x:context href="data/ConvSpec-006,008/marc.xml"/>
<x:expect label="pos 1-17 NOT processed as 008/18-34" test="count(//bf:Work[9]/bf:illustrativeContent/bf:Illustration/rdfs:label) = 0"/>
<x:expect label="do not generate carrier from 006 or 008" test="count(//bf:Instance[9]/bf:carrier) = 0"/>
</x:scenario>
<x:scenario label="008 - FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION">
<x:scenario label="008 material type based on leader">
<x:context mode="mMaterialType008">
<marc:leader>01094cam a2200229 a 4500</marc:leader>
</x:context>
<x:expect label="Material type for 008 determined by leader" select="'BK'"/>
</x:scenario>
<x:scenario label="ALL MATERIALS">
<x:context href="data/ConvSpec-006,008/marc.xml"/>
<x:expect label="pos 0-5 should set the AdminMetadata to type 'create'" test="//bf:Work[1]/bf:adminMetadata[1]/bf:AdminMetadata/bf:status/bf:Status/@rdf:about = 'http://id.loc.gov/vocabulary/mstatus/n'"/>
<x:expect label="pos 0-5 should set the AdminMetadata date property of the 'create' AM" test="//bf:Work[1]/bf:adminMetadata[1]/bf:AdminMetadata/bf:date = '2004-05-20'"/>
<x:expect label="pos 6-14 date handling" test="//bf:Instance[1]/bf:provisionActivity/bf:ProvisionActivity/bf:date = '200X'"/>
<x:expect label="c or d in pos 6 adds a status" test="//bf:Instance[7]/bf:provisionActivity/bf:ProvisionActivity/bf:status/bf:Status/rdfs:label = 'ceased'"/>
<x:expect label="...with URI" test="//bf:Instance[7]/bf:provisionActivity/bf:ProvisionActivity/bf:status/bf:Status/@rdf:about = 'http://id.loc.gov/vocabulary/mstatus/ceased'"/>
<x:expect label="| in pos 6 handled like s or m" test="//bf:Instance[10]/bf:provisionActivity/bf:ProvisionActivity/bf:date = '1981'"/>
<x:expect label="pos 15-17 publication place" test="//bf:Instance[1]/bf:provisionActivity/bf:ProvisionActivity/bf:place/@rdf:resource='http://id.loc.gov/vocabulary/countries/dk'"/>
<x:expect label="||| in pos 15-17 should not create ProvisionActivity/place" test="not(//bf:Instance[10]/bf:provisionActivity/bf:ProvisionActivity/bf:place)"/>
<x:expect label="pos 35-37 should set the language property of the Work" test="//bf:Work[1]/bf:language/@rdf:resource = 'http://id.loc.gov/vocabulary/languages/dan'"/>
</x:scenario>
<x:scenario label="BOOKS">
<x:context href="data/ConvSpec-006,008/marc.xml"/>
<x:expect label="pos 18-21 create illustrativeContent properties of the Work" test="//bf:Work[1]/bf:illustrativeContent/bf:Illustration/rdfs:label = 'illustrations'"/>
<x:expect label="...with URI" test="//bf:Work[1]/bf:illustrativeContent/bf:Illustration/@rdf:about = 'http://id.loc.gov/vocabulary/millus/ill'"/>
<x:expect label="pos 22 creates an intendedAudience property of the Work" test="//bf:Work[1]/bf:intendedAudience/bf:IntendedAudience/rdfs:label = 'juvenile'"/>
<x:expect label="...with URI" test="//bf:Work[1]/bf:intendedAudience/bf:IntendedAudience/@rdf:about = 'http://id.loc.gov/vocabulary/maudience/juv'"/>
<x:expect label="pos 23 may create a carrier property of the Instance" test="//bf:Instance[1]/bf:carrier/bf:Carrier/rdfs:label = 'other computer carrier'"/>
<x:expect label="...with URI" test="//bf:Instance[1]/bf:carrier/bf:Carrier/@rdf:about = 'http://id.loc.gov/vocabulary/carriers/cz'"/>
<x:expect label="...unless the same URI is generated by a 338" test="count(//bf:Instance[13]/bf:carrier) = 1"/>
<x:expect label="and a media property" test="//bf:Instance[1]/bf:media/bf:Media/rdfs:label = 'computer'"/>
<x:expect label="...with URI" test="//bf:Instance[1]/bf:media/bf:Media/@rdf:about = 'http://id.loc.gov/vocabulary/mediaTypes/c'"/>
<x:expect label="...and a fontSize property" test="//bf:Instance[2]/bf:fontSize/bf:FontSize/rdfs:label = 'large print'"/>
<x:expect label="...with URI" test="//bf:Instance[2]/bf:fontSize/bf:FontSize/@rdf:about = 'http://id.loc.gov/vocabulary/mfont/lp'"/>
<x:expect label="...and a notation" test="//bf:Instance[3]/bf:notation/bf:TactileNotation/rdfs:label = 'braille code'"/>
<x:expect label="...with URI" test="//bf:Instance[3]/bf:notation/bf:TactileNotation/@rdf:about = 'http://id.loc.gov/vocabulary/mtactile/brail'"/>
<x:expect label="pos 24-27 may create genreForm properties of the Work" test="//bf:Work[1]/bf:genreForm[1]/bf:GenreForm/@rdf:about = 'http://id.loc.gov/authorities/genreForms/gf2014026266'"/>
<x:expect label="...with an rdfs:label" test="//bf:Work[1]/bf:genreForm[1]/bf:GenreForm/rdfs:label = 'Comics (Graphic works)'"/>
<x:expect label="pos 28 creates a bflc:governmentPubType property of the Work" test="//bf:Work[1]/bflc:governmentPubType/bflc:GovernmentPubType/@rdf:about = 'http://id.loc.gov/vocabulary/mgovtpubtype/a'"/>
<x:expect label="...with an rdfs:label" test="//bf:Work[1]/bflc:governmentPubType/bflc:GovernmentPubType/rdfs:label = 'autonomous'"/>
<x:expect label="pos 29 creates a genreForm for a conference pub" test="//bf:Work[1]/bf:genreForm[2]/bf:GenreForm/@rdf:about = 'http://id.loc.gov/authorities/genreForms/gf2014026068'"/>
<x:expect label="...with an rdfs:label" test="//bf:Work[1]/bf:genreForm[2]/bf:GenreForm/rdfs:label = 'Conference papers and proceedings'"/>
<x:expect label="...but only 1 present when duplicate value found in 655" test="count(//bf:Work[1]/bf:genreForm[2]/bf:GenreForm/rdfs:label[. = 'Conference papers and proceedings']) = 1"/>
<x:expect label="pos 30 creates a genreForm for a festschrift" test="//bf:Work[1]/bf:genreForm[3]/bf:GenreForm/@rdf:about = 'http://id.loc.gov/authorities/genreForms/gf2016026082'"/>
<x:expect label="...with an rdfs:label" test="//bf:Work[1]/bf:genreForm[3]/bf:GenreForm/rdfs:label = 'Festschriften'"/>
<x:expect label="pos 31 creates a supplementaryContent property of the Work" test="//bf:Work[1]/bf:supplementaryContent[1]/bf:SupplementaryContent/rdfs:label = 'index'"/>
<x:expect label="...with a URI" test="//bf:Work[1]/bf:supplementaryContent[1]/bf:SupplementaryContent/@rdf:about = 'http://id.loc.gov/vocabulary/msupplcont/index'"/>
<x:expect label="pos 33 creates a genreForm for the literary form" test="//bf:Work[1]/bf:genreForm[4]/bf:GenreForm/@rdf:about = 'http://id.loc.gov/authorities/genreForms/gf2014026339'"/>
<x:expect label="...with an rdfs:label" test="//bf:Work[1]/bf:genreForm[4]/bf:GenreForm/rdfs:label = 'Fiction'"/>
<x:expect label="pos 34 creates a genreForm for biography" test="//bf:Work[1]/bf:genreForm[5]/bf:GenreForm/@rdf:about = 'http://id.loc.gov/authorities/genreForms/gf2014026047'"/>
<x:expect label="...with an rdfs:label" test="//bf:Work[1]/bf:genreForm[5]/bf:GenreForm/rdfs:label = 'Autobiographies'"/>
<x:expect label="One genreForm property when multiple, equal 655s present" test="count(//bf:Work[1]/bf:genreForm[2]/bf:GenreForm/rdfs:label[. = 'Conference papers and proceedings']) = 1"/>
</x:scenario>
<x:scenario label="COMPUTER FILES">
<x:context href="data/ConvSpec-006,008/marc.xml"/>
<x:expect label="pos 26 creates a genreForm for the computer file type" test="//bf:Work[4]/bf:genreForm[1]/bf:GenreForm/rdfs:label = 'sound'"/>
<x:expect label="...with a URI" test="//bf:Work[4]/bf:genreForm[1]/bf:GenreForm/@rdf:about = 'http://id.loc.gov/vocabulary/marcgt/sou'"/>
</x:scenario>
<x:scenario label="MAPS">
<x:context href="data/ConvSpec-006,008/marc.xml"/>
<x:expect label="pos 18-21 create cartographicAttributes properties of the Work" test="//bf:Work[5]/bf:cartographicAttributes[2]/bf:Cartographic/bf:relief/bf:Relief/rdfs:label = 'shading'"/>
<x:expect label="...with a URI" test="//bf:Work[5]/bf:cartographicAttributes[2]/bf:Cartographic/bf:relief/bf:Relief/@rdf:about = 'http://id.loc.gov/vocabulary/mrelief/shad'"/>
<x:expect label="pos 22-23 creates a cartographicAttributes property of the Work" test="//bf:Work[5]/bf:cartographicAttributes[3]/bf:Cartographic/bf:projection/bf:Projection/rdfs:label = 'Krovak'"/>
<x:expect label="...with a URI" test="//bf:Work[5]/bf:cartographicAttributes[3]/bf:Cartographic/bf:projection/bf:Projection/@rdf:about = 'http://id.loc.gov/vocabulary/mprojection/bk'"/>
<x:expect label="pos 33-34 create genreForm properties of the Work" test="//bf:Work[5]/bf:genreForm[2]/bf:GenreForm/rdfs:label = 'Playing cards'"/>
<x:expect label="...with a URI" test="//bf:Work[5]/bf:genreForm[2]/bf:GenreForm/@rdf:about = 'http://id.loc.gov/authorities/genreForms/gf2017027252'"/>
</x:scenario>
<x:scenario label="MUSIC">
<x:context href="data/ConvSpec-006,008/marc.xml"/>
<x:expect label="pos 18-19 creates a genreForm property of the Work" test="//bf:Work[6]/bf:genreForm[1]/bf:GenreForm/@rdf:about = 'http://id.loc.gov/authorities/genreForms/gf2014026872'"/>
<x:expect label="...with an rdfs:label" test="//bf:Work[6]/bf:genreForm[1]/bf:GenreForm/rdfs:label = 'Hymns'"/>
<x:expect label="pos 20 creates a musicFormat property of the Work" test="//bf:Work[6]/bf:musicFormat/bf:MusicFormat/@rdf:about = 'http://id.loc.gov/vocabulary/mmusicformat/score'"/>
<x:expect label="...with an rdfs:label" test="//bf:Work[6]/bf:musicFormat/bf:MusicFormat/rdfs:label = 'score'"/>
<x:expect label="pos 24-29 create supplementaryContent properties of the Work" test="//bf:Work[6]/bf:supplementaryContent[2]/bf:SupplementaryContent/rdfs:label = 'bibliography'"/>
<x:expect label="...with a URI" test="//bf:Work[6]/bf:supplementaryContent[2]/bf:SupplementaryContent/@rdf:about = 'http://id.loc.gov/vocabulary/msupplcont/bibliography'"/>
<x:expect label="pos 30-31 create genreForm properties of the Work" test="//bf:Work[6]/bf:genreForm[3]/bf:GenreForm/rdfs:label = 'Drama'"/>
<x:expect label="...with a URI" test="//bf:Work[6]/bf:genreForm[3]/bf:GenreForm/@rdf:about = 'http://id.loc.gov/authorities/genreForms/gf2014026297'"/>
</x:scenario>
<x:scenario label="CONTINUING RESOURCES">
<x:context href="data/ConvSpec-006,008/marc.xml"/>
<x:expect label="pos 18 creates a frequency property of the Instance" test="//bf:Instance[7]/bf:frequency[1]/bf:Frequency/@rdf:about = 'http://id.loc.gov/vocabulary/frequencies/wkl'"/>
<x:expect label="...and an rdfs:label" test="//bf:Instance[7]/bf:frequency[1]/bf:Frequency/rdfs:label = 'weekly'"/>
<x:expect label="pos 19 creates another frequency property of the Instance" test="//bf:Instance[7]/bf:frequency[2]/bf:Frequency/rdfs:label = 'irregular'"/>
<x:expect label="...with a URI" test="//bf:Instance[7]/bf:frequency[2]/bf:Frequency/@rdf:about = 'http://id.loc.gov/vocabulary/frequencies/irr'"/>
<x:expect label="pos 21 creates a bflc:serialPubType property of the Work" test="//bf:Work[7]/bflc:serialPubType[1]/bflc:SerialPubType/@rdf:about = 'http://id.loc.gov/vocabulary/mserialpubtype/periodical'"/>
<x:expect label="...with an rdfs:label" test="//bf:Work[7]/bflc:serialPubType[1]/bflc:SerialPubType/rdfs:label = 'periodical'"/>
<x:expect label="pos 22 creates a note/Note property of the Instance with rdf:type mnotetype" test="//bf:Instance[7]/bf:note[1]/bf:Note/rdf:type/@rdf:resource='http://id.loc.gov/vocabulary/mnotetype/orig'"/>
<x:expect label="pos 22 with appropriate note text" test="//bf:Instance[7]/bf:note[1]/bf:Note/rdfs:label = 'Electronic'"/>
<x:expect label="pos 22 does not create a note property of the Instance when pos 22=blank space" test="count(//bf:Instance[12]/bf:note[1]/bf:Note/rdfs:label) = 0"/>
<x:expect label="pos 33 creates a notation property of the Work" test="//bf:Work[7]/bf:notation/bf:Script/rdfs:label = 'Basic roman'"/>
<x:expect label="...with a URI" test="//bf:Work[7]/bf:notation/bf:Script/@rdf:about = 'http://id.loc.gov/vocabulary/mscript/a'"/>
<x:expect label="pos 34 creates a note property of the AdminMetadata" test="//bf:Work[7]/bf:adminMetadata/bf:AdminMetadata/bf:note/bf:Note[rdf:type/@rdf:resource = 'http://id.loc.gov/vocabulary/mnotetype/metaentry']/rdfs:label = '0 - successive'"/>
</x:scenario>
<x:scenario label="VISUAL MATERIALS">
<x:context href="data/ConvSpec-006,008/marc.xml"/>
<x:expect label="pos 18-21 create a duration property of the Work" test="//bf:Work[8]/bf:duration = 'PT1M'"/>
<x:expect label="...with a datatype of xsd:duration" test="//bf:Work[8]/bf:duration/@rdf:datatype = 'http://www.w3.org/2001/XMLSchema#duration'"/>
<x:expect label="pos 33 creates a genreForm property of the Work" test="//bf:Work[8]/bf:genreForm[1]/bf:GenreForm/@rdf:about = 'http://id.loc.gov/authorities/genreForms/gf2011026406'"/>
<x:expect label="with an rdfs:label" test="//bf:Work[8]/bf:genreForm[1]/bf:GenreForm/rdfs:label = 'Motion pictures'"/>
<x:expect label="pos 34 creates a bflc:movingImageTechnique property of the Work" test="//bf:Work[8]/bflc:movingImageTechnique/bflc:MovingImageTechnique/@rdf:about = 'http://id.loc.gov/vocabulary/mtechnique/live'"/>
<x:expect label="...with an rdfs:label" test="//bf:Work[8]/bflc:movingImageTechnique/bflc:MovingImageTechnique/rdfs:label = 'live action'"/>
<x:expect label="pos 18-21 are pipes so no duration should be present on the Work" test="not(//bf:Work[14]/bf:duration)"/>
<x:expect label="pos 18-21 are blanks so no duration should be present on the Work" test="not(//bf:Work[15]/bf:duration)"/>
</x:scenario>
</x:scenario>
<x:scenario label="Carrier URI from 008">
<x:context mode="mCarrier008URI">
<marc:record>
<marc:leader>01094cam a2200229 a 4500</marc:leader>
<marc:controlfield tag="008">040520s200u dk ab js6 a111 1adan </marc:controlfield>
</marc:record>
</x:context>
<x:expect label="Return the carrier URI from the 008" select="'http://id.loc.gov/vocabulary/carriers/cz'"/>
</x:scenario>
<x:scenario label="008 - DATES">
<x:context href="data/ConvSpec-006,008/marc.xml"/>
<x:expect label="s date" test="//bf:Instance[15]/bf:provisionActivity/bf:ProvisionActivity/bf:date[@rdf:datatype='http://id.loc.gov/datatypes/edtf']='2002'"/>
<x:expect label="m date" test="//bf:Instance[16]/bf:provisionActivity/bf:ProvisionActivity/bf:date[@rdf:datatype='http://id.loc.gov/datatypes/edtf']='2013/2016'"/>
<x:expect label="q date" test="//bf:Instance[17]/bf:provisionActivity/bf:ProvisionActivity/bf:date[@rdf:datatype='http://id.loc.gov/datatypes/edtf']='1900~/1956~'"/>
</x:scenario>
</x:description>