forked from lcnetdev/marc2bibframe2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConvSpec-050-088.xspec
120 lines (106 loc) · 12 KB
/
ConvSpec-050-088.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
<?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/"
stylesheet="../xsl/marc2bibframe2.xsl"
xslt-version="1.0">
<x:scenario label="050 - LIBRARY OF CONGRESS CALL NUMBER">
<x:context href="data/ConvSpec-050-088/marc.xml"/>
<x:expect label="050 creates an Item" test="count(//bf:Item[@rdf:about ='http://example.org/1#Item050-2'])= 1"/>
<x:expect label="...and a hasItem property of the Instance" test="count(//bf:Instance[1]/bf:hasItem) = 3"/>
<x:expect label="...and classification properties of the Work" test="count(//bf:Work[1]/bf:classification/bf:ClassificationLcc) = 4"/>
<x:expect label="...and a shelfMark property of the Item" test="count(//bf:Item[@rdf:about ='http://example.org/1#Item050-2']/bf:shelfMark) = 2"/>
<x:expect label="ind2 = '0' creates a source property of the ClassificationLcc" test="//bf:Work[1]/bf:classification[1]/bf:ClassificationLcc/bf:source/bf:Source/@rdf:about = 'http://id.loc.gov/vocabulary/organizations/dlc'"/>
<x:expect label="...and a source of the ShelfMarkLcc" test="//bf:Item[1]/bf:shelfMark[1]/bf:ShelfMarkLcc/bf:source/bf:Source/@rdf:about = 'http://id.loc.gov/vocabulary/organizations/dlc'"/>
<x:expect label="$a creates a classificationPortion of the ClassificationLcc" test="//bf:Work[1]/bf:classification[1]/bf:ClassificationLcc/bf:classificationPortion = 'Z7164.N3'"/>
<x:expect label="$b creates an itemPortion of the ClassificationLcc" test="//bf:Work[1]/bf:classification[1]/bf:ClassificationLcc/bf:itemPortion = 'L34 no. 9'"/>
<x:expect label="$ab become the rdfs:label of the ShelfMark" test="//bf:Item[1]/bf:shelfMark[1]/bf:ShelfMarkLcc/rdfs:label = 'Z7164.N3 L34 no. 9'"/>
<x:expect label="$a not of form ABC123... does not create a bf:classification property" test="count(//bf:ClassificationLcc/bf:classificationPortion[contains(.,'123.45')]) = 0"/>
<x:expect label="If the first $a is of form ABC123... 050 creates a ShelfMarkLcc object of the shelfMark property" test="count(//bf:Item[@rdf:about ='http://example.org/1#Item050-2']/bf:shelfMark/bf:ShelfMarkLcc) = 2"/>
<x:expect label="otherwise it creates a ShelfMark object of the shelfMark property" test="count(//bf:Item[@rdf:about ='http://example.org/1#Item050-4']/bf:shelfMark/bf:ShelfMark) = 1"/>
</x:scenario>
<x:scenario label="051 - LIBRARY OF CONGRESS COPY, ISSUE, OFFPRINT STATEMENT">
<x:context href="data/ConvSpec-050-088/marc.xml"/>
<x:expect label="051 creates a shelfMark property of the Item" test="count(//bf:Item[@rdf:about ='http://example.org/1#Item050-2']/bf:shelfMark) = 2"/>
<x:expect label="...rdfs:label of the ShelfMark is $abc" test="//bf:Item[1]/bf:shelfMark[2]/bf:ShelfMarkLcc/rdfs:label = 'QE75.G4 2d set'"/>
</x:scenario>
<x:scenario label="052 - GEOGRAPHIC CLASSIFICATION">
<x:context href="data/ConvSpec-050-088/marc.xml"/>
<x:expect label="052 creates a geographicCoverage/Place property of the Work" test="count(//bf:Work[1]/bf:geographicCoverage) = 3"/>
<x:expect label="ind1 = ' ' creates a source property of the Place" test="//bf:Work[1]/bf:geographicCoverage[1]/bf:Place/bf:source/bf:Source/@rdf:about = 'http://id.loc.gov/vocabulary/classSchemes/lcc'"/>
<x:expect label="$ab creates an rdf:value property of the Place" test="//bf:Work[1]/bf:geographicCoverage[2]/bf:Place/rdf:value = '4034 R8'"/>
<x:expect label="$d creates an rdfs:label property of the Place" test="//bf:Work[1]/bf:geographicCoverage[3]/bf:Place/rdfs:label = 'Mostar'"/>
</x:scenario>
<x:scenario label="055 - CLASSIFICATION NUMBERS ASSIGNED IN CANADA">
<x:context href="data/ConvSpec-050-088/marc.xml"/>
<x:expect label="055 creates a classification/ClassificationLcc property of the Work" test="count(//bf:Work[1]/bf:classification/bf:ClassificationLcc) = 4"/>
<x:expect label="$a creates the classificationPortion of the ClassificationLcc" test="//bf:Work[1]/bf:classification[4]/bf:ClassificationLcc/bf:classificationPortion = 'F5050 .2'"/>
<x:expect label="$b creates an itemPortion of the ClassificationLcc" test="//bf:Work[1]/bf:classification[4]/bf:ClassificationLcc/bf:itemPortion = 'T5'"/>
<x:expect label="ind2 = 0,1,2 creates a source of the ClassificationLcc" test="//bf:Work[1]/bf:classification[4]/bf:ClassificationLcc/bf:source/bf:Source/rdfs:label = 'Library and Archives Canada'"/>
</x:scenario>
<x:scenario label="060 - NATIONAL LIBRARY OF MEDICINE CALL NUMBER">
<x:context href="data/ConvSpec-050-088/marc.xml"/>
<x:expect label="060 creates a classification/ClassificationNlm property of the Work" test="count(//bf:Work[1]/bf:classification/bf:ClassificationNlm) = 1"/>
<x:expect label="$a creates the classificationPortion of the ClassificationNlm" test="//bf:Work[1]/bf:classification[5]/bf:ClassificationNlm/bf:classificationPortion = 'W 22 DC2.1'"/>
<x:expect label="$b creates an itemPortion of the ClassificationNlm" test="//bf:Work[1]/bf:classification[5]/bf:ClassificationNlm/bf:itemPortion = 'B8M'"/>
<x:expect label="ind1 = '0' creates an Item with a heldBy property" test="//bf:Item[contains(@rdf:about,'Item060-8')]/bf:heldBy/bf:Agent/rdfs:label = 'National Library of Medicine'"/>
<x:expect label="...and a hasItem property of the Instance" test="count(//bf:Instance[1]/bf:hasItem) = 3"/>
<x:expect label="ind2 = '0' creates a source property of the ClassificationNlm" test="//bf:Work[1]/bf:classification[5]/bf:ClassificationNlm/bf:source/bf:Source/rdfs:label = 'National Library of Medicine'"/>
</x:scenario>
<x:scenario label="070 - NATIONAL AGRICULTURAL LIBRARY CALL NUMBER">
<x:context href="data/ConvSpec-050-088/marc.xml"/>
<x:expect label="070 creates a classification/Classification property of the Work" test="count(//bf:Work[1]/bf:classification/bf:Classification) = 2"/>
<x:expect label="...with a source property" test="//bf:Work[1]/bf:classification[6]/bf:Classification/bf:source/bf:Source/rdfs:label = 'National Agricultural Library'"/>
<x:expect label="$a creates the classificationPortion of the Classification" test="//bf:Work[1]/bf:classification[6]/bf:Classification/bf:classificationPortion = 'HD3492.H8'"/>
<x:expect label="$b creates an itemPortion of the Classification" test="//bf:Work[1]/bf:classification[6]/bf:Classification/bf:itemPortion = 'L3'"/>
</x:scenario>
<x:scenario label="072 - SUBJECT CATEGORY CODE">
<x:context href="data/ConvSpec-050-088/marc.xml"/>
<x:expect label="072 creates a subject property of the Work" test="count(//bf:Work[1]/bf:subject/rdfs:Resource) = 2"/>
<x:expect label="$ax becomes the rdf:value of the rdfs:Resource" test="//bf:Work[1]/bf:subject[2]/rdfs:Resource/rdf:value = 'Z1 .630'"/>
<x:expect label="$2 creates source property of the rdfs:Resource" test="//bf:Work[1]/bf:subject[2]/rdfs:Resource/bf:source/bf:Source/rdfs:label = 'mesh'"/>
<x:expect label="ind2 = '0' creates 'agricola' source property of the rdfs:Resource" test="//bf:Work[1]/bf:subject[1]/rdfs:Resource/bf:source/bf:Source/rdfs:label = 'agricola'"/>
</x:scenario>
<x:scenario label="074 - GPO ITEM NUMBER">
<x:context href="data/ConvSpec-050-088/marc.xml"/>
<x:expect label="074 creates an identifiedBy/Identifier property of the Instance" test="count(//bf:Instance[1]/bf:identifiedBy/bf:Identifier) = 2"/>
<x:expect label="...with a source labelled 'US GPO'" test="//bf:Instance[1]/bf:identifiedBy[1]/bf:Identifier/bf:source/bf:Source/rdfs:label = 'US GPO'"/>
<x:expect label="$a is the rdf:value of the Identifier" test="//bf:Instance[1]/bf:identifiedBy[1]/bf:Identifier/rdf:value = '1022-A'"/>
<x:expect label="$z creates an status/Status property of an Identifier with rdfs:label 'invalid'" test="//bf:Instance[1]/bf:identifiedBy[2]/bf:Identifier/bf:status/bf:Status/rdfs:label = 'invalid'"/>
</x:scenario>
<x:scenario label="082 - DEWEY DECIMAL CLASSIFICATION NUMBER">
<x:context href="data/ConvSpec-050-088/marc.xml"/>
<x:expect label="082 creates a classification/ClassificationDdc property of the Work" test="count(//bf:Work[1]/bf:classification/bf:ClassificationDdc) = 2"/>
<x:expect label="$a creates the classificationPortion of the ClassificationDdc" test="//bf:Work[1]/bf:classification[7]/bf:ClassificationDdc/bf:classificationPortion = '975.5/4252/00222'"/>
<x:expect label="$b creates an itemPortion of the ClassificationDdc" test="//bf:Work[1]/bf:classification[7]/bf:ClassificationDdc/bf:itemPortion = 'Wor'"/>
<x:expect label="$2 creates an edition property of the ClassificationDdc" test="//bf:Work[1]/bf:classification[7]/bf:ClassificationDdc/bf:edition[1] = '22'"/>
<x:expect label="$q creates a source property of the ClassificationDdc" test="//bf:Work[1]/bf:classification[8]/bf:ClassificationDdc/bf:source/bf:Source/rdfs:label = 'DE-101b'"/>
<x:expect label="ind1 creates an edition property of the ClassificationDdc" test="//bf:Work[1]/bf:classification[7]/bf:ClassificationDdc/bf:edition[2] = 'full'"/>
<x:expect label="ind2 can set a source property of the ClassificationDdc" test="//bf:Work[1]/bf:classification[7]/bf:ClassificationDdc/bf:source/bf:Source/@rdf:about = 'http://id.loc.gov/vocabulary/organizations/dlc'"/>
</x:scenario>
<x:scenario label="084 - OTHER CLASSIFICATION NUMBER">
<x:context href="data/ConvSpec-050-088/marc.xml"/>
<x:expect label="084 creates a classification/Classification property of the Work" test="count(//bf:Work[1]/bf:classification/bf:Classification) = 2"/>
<x:expect label="$a creates the classificationPortion of the Classification" test="//bf:Work[1]/bf:classification[9]/bf:Classification/bf:classificationPortion = 'KB112.554'"/>
<x:expect label="$b creates an itemPortion of the Classification" test="//bf:Work[1]/bf:classification[9]/bf:Classification/bf:itemPortion = 'U62 1980'"/>
<x:expect label="$q creates an adminMetadata/AdminMetadata/assigner property of the Classification" test="//bf:Work[1]/bf:classification[9]/bf:Classification/bf:adminMetadata/bf:AdminMetadata/bf:assigner/bf:Agent/rdfs:label = 'DE-101'"/>
<x:expect label="$2 creates a source property of the Classification" test="//bf:Work[1]/bf:classification[9]/bf:Classification/bf:source/bf:Source/rdfs:label = 'sdnb'"/>
</x:scenario>
<x:scenario label="086 - GOVERNMENT DOCUMENT CLASSIFICATION NUMBER">
<x:context href="data/ConvSpec-050-088/marc.xml"/>
<x:expect label="086 creates a classification/Classification property of the Instance" test="count(//bf:Instance[1]/bf:classification/bf:Classification) = 3"/>
<x:expect label="$a is the rdfs:label of the Classification" test="//bf:Instance[1]/bf:classification[1]/bf:Classification/rdfs:label = 'A 1.1:'"/>
<x:expect label="$z creates an 'invalid' Classification" test="//bf:Instance[1]/bf:classification[2]/bf:Classification/bf:status/bf:Status/rdfs:label = 'invalid'"/>
<x:expect label="$2 creates a source property of the classification" test="//bf:Instance[1]/bf:classification[3]/bf:Classification/bf:source/bf:Source/rdfs:label = 'ordocs'"/>
<x:expect label="ind1 can create a source property of the Classification" test="//bf:Instance[1]/bf:classification[1]/bf:Classification/bf:source/bf:Source/rdfs:label = 'sudocs'"/>
</x:scenario>
<x:scenario label="088 - REPORT NUMBER">
<x:context href="data/ConvSpec-050-088/marc.xml"/>
<x:expect label="088 creates an identifiedBy/ReportNumber property of the Instance" test="count(//bf:Instance[1]/bf:identifiedBy/bf:ReportNumber) = 2"/>
<x:expect label="$a is the rdf:value of the Identifier" test="//bf:Instance[1]/bf:identifiedBy[3]/bf:ReportNumber/rdf:value = 'NASA-RP-1124-REV-3'"/>
<x:expect label="$z creates a status/Status property of an Identifier with rdfs:label 'invalid'" test="//bf:Instance[1]/bf:identifiedBy[4]/bf:ReportNumber/bf:status/bf:Status/rdfs:label = 'invalid'"/>
</x:scenario>
</x:description>