forked from lcnetdev/marc2bibframe2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConvSpec-760-788-Links.xspec
83 lines (75 loc) · 15.7 KB
/
ConvSpec-760-788-Links.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
<?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="760-788 LINKS">
<x:context href="data/ConvSpec-760-788-Links/marc.xml"/>
<x:expect label="760 creates a hasSeries property of the Work" test="count(/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation/bf:relationship[@rdf:resource='http://id.loc.gov/vocabulary/relationship/series']) = 1"/>
<x:expect label="762 creates a hasSubseries property of the Work" test="count(/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation/bf:relationship[@rdf:resource='http://id.loc.gov/vocabulary/relationship/subseries']) = 1"/>
<x:expect label="765 creates a translationOf property of the Work" test="count(/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation/bf:relationship[@rdf:resource='http://id.loc.gov/vocabulary/relationship/translationof']) = 1"/>
<x:expect label="767 creates a translation property of the Work" test="count(/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation/bf:relationship[@rdf:resource='http://id.loc.gov/vocabulary/relationship/translatedas']) = 1"/>
<x:expect label="770 creates a supplement property of the Work" test="count(/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation/bf:relationship[@rdf:resource='http://id.loc.gov/vocabulary/relationship/supplement']) = 1"/>
<x:expect label="772 creates a supplementTo property of the Work" test="count(/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation/bf:relationship[@rdf:resource='http://id.loc.gov/vocabulary/relationship/supplementto']) = 1"/>
<x:expect label="773 creates a partOf property of the Work" test="count(/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation/bf:relationship[@rdf:resource='http://id.loc.gov/vocabulary/relationship/partof']) = 1"/>
<x:expect label="774 creates a hasPart property of the Work" test="count(/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation/bf:relationship[@rdf:resource='http://id.loc.gov/vocabulary/relationship/part']) = 1"/>
<x:expect label="775 creates an otherEdition property of the Work" test="count(/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation/bf:relationship[@rdf:resource='http://id.loc.gov/vocabulary/relationship/otheredition']) = 1"/>
<x:expect label="776 creates an otherPhysicalFormat property of the Work" test="count(/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation/bf:relationship[@rdf:resource='http://id.loc.gov/vocabulary/relationship/otherphysicalformat']) = 1"/>
<x:expect label="777 creates an issuedWith property of the Work" test="count(/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation/bf:relationship[@rdf:resource='http://id.loc.gov/vocabulary/relationship/issuedwith']) = 1"/>
<x:expect label="780 creates a property of the Work determined by ind2" test="count(/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation/bf:relationship[@rdf:resource='http://id.loc.gov/vocabulary/relationship/absorptionof']) = 1"/>
<x:expect label="785 creates a property of the Work determined by ind2" test="count(/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation/bf:relationship[@rdf:resource='http://id.loc.gov/vocabulary/relationship/absorbedby']) = 1"/>
<x:expect label="786 creates a dataSource property of the Work" test="count(/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation/bf:relationship[@rdf:resource='http://id.loc.gov/vocabulary/relationship/datasource']) = 1"/>
<x:expect label="787 creates a relatedTo property of the Work" test="count(/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation/bf:relationship[@rdf:resource='http://id.loc.gov/vocabulary/relationship/relatedwork']) = 1"/>
</x:scenario>
<x:scenario label="760-788 SUBFIELDS">
<x:context href="data/ConvSpec-760-788-Links/marc.xml"/>
<x:expect label="$a creates a contribution property of the linked Work" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/series']/bf:associatedResource/bf:Work/bf:contribution/bf:PrimaryContribution/bf:agent/bf:Agent/rdfs:label = 'United States. Geological Survey.'"/>
<x:expect label="$b creates an editionStatement property of the linked Instance" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/otheredition']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:editionStatement = 'Havana ed.'"/>
<x:expect label="$c creates a title/Title/qualifier property of the title of the linked Work" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/translationof']/bf:associatedResource/bf:Work/bf:title[1]/bf:Title/bf:qualifier = 'Original'"/>
<x:expect label="$d creates a provisionActivityStatement of the linked Instance" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/partof']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:provisionActivityStatement = 'Wallingford : Gem Publishing Company'"/>
<x:expect label="$e creates a language property of the linked Work" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/otheredition']/bf:associatedResource/bf:Work/bf:language/bf:Language/@rdf:about = 'http://id.loc.gov/vocabulary/languages/eng'"/>
<x:expect label="$f creates a provisionActivity property of the linked Instance" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/otheredition']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:provisionActivity/bf:ProvisionActivity/bf:place/bf:Place/@rdf:about= 'http://id.loc.gov/vocabulary/countries/cu'"/>
<x:expect label="$g creates a part property of the linked Instance" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/absorptionof']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:part = '1971'"/>
<x:expect label="$h creates an extent property of the linked Instance" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/part']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:extent/bf:Extent/rdfs:label = 'file on disc'"/>
<x:expect label="$i creates a bflc:relationship property of the linked Work" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/relatedwork']/bf:relationship/bf:Relationship/rdfs:label = 'Related source work'"/>
<x:expect label="$j creates a note property of the linked Instance" test="//bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/datasource']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:note/bf:Note/rdfs:label='19181111'"/>
<x:expect label="$k creates a seriesStatement property of the linked Instance" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/partof']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:seriesStatement = 'Wonders of man series'"/>
<x:expect label="$m creates a note property of the linked Instance" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/part']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:note[2]/bf:Note/rdfs:label = '240 x 760px'"/>
<x:expect label="$n creates a note property of the linked Instance" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/part']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:note[1]/bf:Note/rdfs:label = '[DIAPimage]'"/>
<x:expect label="$o creates an identifiedBy/Local property of the linked Instance" test="//bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/relatedwork']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:identifiedBy/bf:Local/rdf:value = '(istc)0A3200912B4A1057'"/>
<x:expect label="$p creates a title/AbbreviatedTitle property of the linked Work" test="//bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/partof']/bf:associatedResource/bf:Work/bf:title/bf:AbbreviatedTitle/bf:mainTitle = 'ENTOMOL MON MAG'"/>
<x:expect label="$q creates a note property of the linked Instance" test="//bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/partof']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:note/bf:Note/rdfs:label = '24:B:9<235'"/>
<x:expect label="$r creates an identifiedBy/ReportNumber property of the linked Instance" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/supplement']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:identifiedBy/bf:ReportNumber/rdf:value = 'APA 3011'"/>
<x:expect label="Title for linked Work comes from $s" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/absorptionof']/bf:associatedResource/bf:Work/bf:title/bf:Title/bf:mainTitle = 'Publications'"/>
<x:expect label="...unless there is no $s, then from $t" test="//bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/series']/bf:associatedResource/bf:Work/bf:title/bf:Title/bf:mainTitle = 'Water supply papers'"/>
<x:expect label="...if neither then from 245 $ab" test="//bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/supplement']/bf:associatedResource/bf:Work/bf:title/bf:Title/bf:mainTitle = 'College English'"/>
<x:expect label="$t creates a title property of the linked Instance" test="//bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/series']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:title/bf:Title/bf:mainTitle = 'Water supply papers'"/>
<x:expect label="If no $t, pull title from 245 $ab" test="//bf:Work[1]/bf:hasInstance[1]/bf:Instance/bf:title/bf:Title/bf:mainTitle = 'College English'"/>
<x:expect label="$u creates an identifiedBy/Strn property of the linked Instance" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/absorptionof']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:identifiedBy/bf:Strn/rdf:value = 'MPC-387'"/>
<x:expect label="$v creates a note property of the linked Work" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/datasource']/bf:associatedResource/bf:Work/bf:note/bf:Note/rdfs:label = 'Data for reformatting to DEM format'"/>
<x:expect label="$w creates an identifiedBy/Identifier property of the linked Instance" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/translationof']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:identifiedBy[2]/bf:Identifier/rdf:value = '4798581'"/>
<x:expect label="...with assigner from parenthetical qualifier" test="//bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/translationof']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:identifiedBy[2]/bf:Identifier/bf:assigner/bf:Agent/bf:code = 'OCoLC'"/>
<x:expect label="...unless qualifier is DLC, when it creates an Lccn" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/translationof']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:identifiedBy[1]/bf:Lccn/rdf:value = ' 78648457 '"/>
<x:expect label="...with DLC assigner" test="//bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/translationof']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:identifiedBy[1]/bf:Lccn/bf:assigner/bf:Agent/@rdf:about = 'http://id.loc.gov/vocabulary/organizations/dlc'"/>
<x:expect label="$x creates an identifiedBy/Issn property of the linked Work" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/translatedas']/bf:associatedResource/bf:Work/bf:identifiedBy/bf:Issn/rdf:value = '0190-2709'"/>
<x:expect label="$y creates an identifiedBy/Coden property of the linked Instance" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/partof']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:identifiedBy/bf:Coden/rdf:value = 'FNMMA'"/>
<x:expect label="$z creates an identifiedBy/Isbn property of the linked Instance" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/absorptionof']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:identifiedBy/bf:Isbn/rdf:value = '0491001304'"/>
<x:expect label="$3 creates a bflc:appliesTo property of the linked Work" test="/rdf:RDF/bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/partof']/bf:associatedResource/bf:Work/bflc:appliesTo/bflc:AppliesTo/rdfs:label = 'Pamphlet'"/>
<x:expect label="$4 creates a bf:role property of the linked Work" test="//bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/absorbedby']/bf:associatedResource/bf:Work/bf:role/bf:Role/@rdf:about='http://rdaregistry.info/Elements/w/P10145'"/>
<x:expect label="...and the Instance" test="//bf:Work[1]/bf:relation/bf:Relation[bf:relationship/@rdf:resource='http://id.loc.gov/vocabulary/relationship/absorbedby']/bf:associatedResource/bf:Work/bf:hasInstance/bf:Instance/bf:role/bf:Role/@rdf:about='http://rdaregistry.info/Elements/w/P10145'"/>
</x:scenario>
<x:scenario label="758-LINKS">
<x:context href="data/ConvSpec-760-788-Links/marc_758_uris.xml"/>
<x:expect label="758 with $1 and no relationship creates hasEquivalent relationship" test="/rdf:RDF/bf:Work[1]/bf:relation[1]/bf:Relation/bf:relationship/@rdf:resource='http://id.loc.gov/ontologies/bibframe/hasEquivalent'" />
<x:expect label="...with link to $1 resource" test="/rdf:RDF/bf:Work[1]/bf:relation[1]/bf:Relation/bf:associatedResource/@rdf:resource='http://worldcat.org/entity/work/id/5464332661'" />
<x:expect label="758 with non-ID $1 and instanceOf relationship creates indirect instanceOf relationship" test="/rdf:RDF/bf:Work[1]/bf:relation[2]/bf:Relation/bf:relationship/@rdf:resource='http://id.loc.gov/ontologies/bibframe/instanceOf'" />
<x:expect label="...with link to $1 resource" test="/rdf:RDF/bf:Work[1]/bf:relation[2]/bf:Relation/bf:associatedResource/@rdf:resource='http://www.wikidata.org/entity/Q15754099'" />
<x:expect label="758 with $1 and $i relationship" test="/rdf:RDF/bf:Work[1]/bf:relation[3]/bf:Relation/bf:relationship/bf:Relationship/rdfs:label='Has work manifested:'" />
<x:expect label="...with link to $1 resource" test="/rdf:RDF/bf:Work[1]/bf:relation[3]/bf:Relation/bf:associatedResource/@rdf:resource='http://www.wikidata.org/entity/Q27712857'" />
</x:scenario>
</x:description>