Skip to content

Commit 2d35567

Browse files
committed
Fixing tests.
1 parent ee96a7b commit 2d35567

5 files changed

Lines changed: 17 additions & 23 deletions

File tree

test/ConvSpec-001-007.xspec

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
<x:expect label="pos 0 = 'a' sets Work rdf:type to Cartography" test="count(//bf:Work[1]/rdf:type/@rdf:resource[contains(.,'Cartography')]) = 1"/>
6767
<x:expect label="...and creates a bf:content property" test="//bf:Work[1]/bf:content/bf:Content/rdfs:label = 'cartographic image'"/>
6868
<x:expect label="...if no 337, creates media property of the Instance" test="//bf:Instance[1]/bf:media/bf:Media/rdfs:label = 'unmediated'"/>
69-
<x:expect label="pos 1 sets a genreForm/GenreForm property of the Work" test="//bf:Work[1]/bf:genreForm/bf:GenreForm/@rdf:about = 'http://id.loc.gov/authorities/genreForms/gf2018026045'"/>
70-
<x:expect label="...with a label" test="//bf:Work[1]/bf:genreForm/bf:GenreForm/rdfs:label = 'Views'"/>
69+
<x:expect label="pos 1 sets a genreForm/GenreForm property of the Instance" test="//bf:Instance[1]/bf:genreForm/bf:GenreForm/@rdf:about = 'http://id.loc.gov/authorities/genreForms/gf2018026045'"/>
70+
<x:expect label="...with a label" test="//bf:Instance[1]/bf:genreForm/bf:GenreForm/rdfs:label = 'Views'"/>
7171
<x:expect label="...if no 336, creates a content property of the Work" test="//bf:Work[1]/bf:content/bf:Content/@rdf:about='http://id.loc.gov/vocabulary/contentTypes/cri'"/>
7272
<x:expect label="...with a label" test="//bf:Work[1]/bf:content/bf:Content/rdfs:label = 'cartographic image'"/>
7373
<x:expect label="...if no duplicate property from 338/008, creates a carrier property of the Instance" test="//bf:Instance[1]/bf:carrier[1]/bf:Carrier/@rdf:about='http://id.loc.gov/vocabulary/carriers/nb'"/>
@@ -100,8 +100,8 @@
100100
<x:expect label="...with a label" test="//bf:Work[3]/bf:content/bf:Content/rdfs:label = 'cartographic three-dimensional form'"/>
101101
<x:expect label="...and creates a bf:media property of the Instance if no 337" test="//bf:Instance[3]/bf:media/bf:Media/@rdf:about = 'http://id.loc.gov/vocabulary/mediaTypes/n'"/>
102102
<x:expect label="...with a label" test="//bf:Instance[3]/bf:media/bf:Media/rdfs:label = 'unmediated'"/>
103-
<x:expect label="pos 1 creates a genreForm/GenreForm property of the Work" test="//bf:Work[3]/bf:genreForm[1]/bf:GenreForm/@rdf:about = 'http://id.loc.gov/authorities/genreForms/gf2011026300'"/>
104-
<x:expect label="...with an rdfs:label" test="//bf:Work[3]/bf:genreForm[1]/bf:GenreForm/rdfs:label = 'Globes'"/>
103+
<x:expect label="pos 1 creates a genreForm/GenreForm property of the Instance" test="//bf:Instance[3]/bf:genreForm[1]/bf:GenreForm/@rdf:about = 'http://id.loc.gov/authorities/genreForms/gf2011026300'"/>
104+
<x:expect label="...with an rdfs:label" test="//bf:Instance[3]/bf:genreForm[1]/bf:GenreForm/rdfs:label = 'Globes'"/>
105105
<x:expect label="pos 1 creates a bf:carrier property of the Instance if no duplicate property from 338/008" test="//bf:Instance[3]/bf:carrier/bf:Carrier/@rdf:about='http://id.loc.gov/vocabulary/carriers/nr'"/>
106106
<x:expect label="pos 3 creates a colorContent property of the Instance" test="//bf:Instance[3]/bf:colorContent/bf:ColorContent/rdfs:label = 'color'"/>
107107
<x:expect label="pos 4 creates a baseMaterial property of the Instance" test="//bf:Instance[3]/bf:baseMaterial/bf:BaseMaterial/rdfs:label = 'synthetic'"/>
@@ -150,8 +150,8 @@
150150
<x:expect label="...and creates a bf:content property if no 336" test="//bf:Work[6]/bf:content/bf:Content/@rdf:about = 'http://id.loc.gov/vocabulary/contentTypes/sti'"/>
151151
<x:expect label="...with a label" test="//bf:Work[6]/bf:content/bf:Content/rdfs:label = 'still image'"/>
152152
<x:expect label="...and creates a media property of the Instance if no 337" test="//bf:Instance[6]/bf:media/bf:Media/@rdf:about = 'http://id.loc.gov/vocabulary/mediaTypes/n'"/>
153-
<x:expect label="pos 1 creates a genreForm/GenreForm property of the Work" test="//bf:Work[6]/bf:genreForm/bf:GenreForm/@rdf:about = 'http://id.loc.gov/vocabulary/graphicMaterials/tgm007718'"/>
154-
<x:expect label="...with an rdfs:label" test="//bf:Work[6]/bf:genreForm/bf:GenreForm/rdfs:label = 'Photographic prints'"/>
153+
<x:expect label="pos 1 creates a genreForm/GenreForm property of the Instance" test="//bf:Instance[6]/bf:genreForm/bf:GenreForm/@rdf:about = 'http://id.loc.gov/vocabulary/graphicMaterials/tgm007718'"/>
154+
<x:expect label="...with an rdfs:label" test="//bf:Instance[6]/bf:genreForm/bf:GenreForm/rdfs:label = 'Photographic prints'"/>
155155
<x:expect label="pos 1 creates a bf:carrier property of the Instance if no duplicate property from 338/008" test="//bf:Instance[6]/bf:carrier/bf:Carrier/@rdf:about='http://id.loc.gov/vocabulary/carriers/nb'"/>
156156
<x:expect label="pos 3 creates a colorContent property of the Instance" test="//bf:Instance[6]/bf:colorContent/bf:ColorContent/rdfs:label = 'color'"/>
157157
<x:expect label="pos 4 creates a baseMaterial property of the Instance" test="//bf:Instance[6]/bf:baseMaterial/bf:BaseMaterial/rdfs:label = 'paper'"/>
@@ -169,18 +169,18 @@
169169
<x:expect label="pos 3 creates a colorContent property of the Instance" test="//bf:Instance[7]/bf:colorContent/bf:ColorContent/rdfs:label = 'color'"/>
170170
<x:expect label="pos 4 may create a projectionCharacteristic/PresentationFormat property of the Instance" test="//bf:Instance[7]/bf:projectionCharacteristic/bf:PresentationFormat/@rdf:about='http://id.loc.gov/vocabulary/mpresformat/sound'"/>
171171
<x:expect label="...with an rdfs:label " test="//bf:Instance[7]/bf:projectionCharacteristic/bf:PresentationFormat/rdfs:label = 'standard sound aperture'"/>
172-
<x:expect label="...or an aspectRatio/AspectRatio property of the Work" test="//bf:Work[8]/bf:aspectRatio/bf:AspectRatio[1]/@rdf:about = 'http://id.loc.gov/vocabulary/maspect/nonana'"/>
173-
<x:expect label="...and a second" test="//bf:Work[8]/bf:aspectRatio[2]/bf:AspectRatio/rdfs:label = 'wide-screen'"/>
174-
<x:expect label="...and a third with a note" test="//bf:Work[8]/bf:aspectRatio[3]/bf:AspectRatio/bf:note/bf:Note/rdfs:label = 'non-anamorphic (wide-screen)'"/>
172+
<x:expect label="...or an aspectRatio/AspectRatio property of the Instance" test="//bf:Instance[8]/bf:aspectRatio/bf:AspectRatio[1]/@rdf:about = 'http://id.loc.gov/vocabulary/maspect/nonana'"/>
173+
<x:expect label="...and a second" test="//bf:Instance[8]/bf:aspectRatio[2]/bf:AspectRatio/rdfs:label = 'wide-screen'"/>
174+
<x:expect label="...and a third with a note" test="//bf:Instance[8]/bf:aspectRatio[3]/bf:AspectRatio/bf:note/bf:Note/rdfs:label = 'non-anamorphic (wide-screen)'"/>
175175
<x:expect label="pos 5 creates a soundContent/SoundContent property of the Instance" test="//bf:Instance[7]/bf:soundContent/bf:SoundContent/@rdf:about = 'http://id.loc.gov/vocabulary/msoundcontent/sound'"/>
176176
<x:expect label="...and an rdfs:label" test="//bf:Instance[7]/bf:soundContent/bf:SoundContent/rdfs:label = 'sound'"/>
177177
<x:expect label="pos 6 creates a soundCharacteristic/RecordingMedium property of the Instance" test="//bf:Instance[7]/bf:soundCharacteristic[1]/bf:RecordingMedium/@rdf:about = 'http://id.loc.gov/vocabulary/mrecmedium/opt'"/>
178178
<x:expect label="...and an rdfs:label" test="//bf:Instance[7]/bf:soundCharacteristic[1]/bf:RecordingMedium/rdfs:label = 'optical'"/>
179179
<x:expect label="pos 7 creates a dimensions property of the Instance - 007" test="//bf:Instance[7]/bf:dimensions = '16 mm.'"/>
180180
<x:expect label="pos 8 creates a soundCharacteristic/PlaybackChannels property of the Instance" test="//bf:Instance[7]/bf:soundCharacteristic[2]/bf:PlaybackChannels/@rdf:about = 'http://id.loc.gov/vocabulary/mplayback/mon'"/>
181181
<x:expect label="...and an rdfs:label" test="//bf:Instance[7]/bf:soundCharacteristic[2]/bf:PlaybackChannels/rdfs:label = 'mono'"/>
182-
<x:expect label="pos 9 creates a genreForm property of the Work" test="//bf:Work[7]/bf:genreForm/bf:GenreForm/@rdf:about = 'http://id.loc.gov/authorities/genreForms/gf2011026435'"/>
183-
<x:expect label="...and an rdfs:label" test="//bf:Work[7]/bf:genreForm/bf:GenreForm/rdfs:label = 'Outtakes'"/>
182+
<x:expect label="pos 9 creates a genreForm property of the Instance" test="//bf:Instance[7]/bf:genreForm/bf:GenreForm/@rdf:about = 'http://id.loc.gov/authorities/genreForms/gf2011026435'"/>
183+
<x:expect label="...and an rdfs:label" test="//bf:Instance[7]/bf:genreForm/bf:GenreForm/rdfs:label = 'Outtakes'"/>
184184
<x:expect label="pos 10 creates a polarity property of the Instance" test="//bf:Instance[7]/bf:polarity/bf:Polarity/rdfs:label = 'positive'"/>
185185
<x:expect label="pos 11 creates a generation/Generation property of the Instance" test="//bf:Instance[7]/bf:generation/bf:Generation/@rdf:about = 'http://id.loc.gov/vocabulary/mgeneration/viewcopy'"/>
186186
<x:expect label="...with an rdfs:label" test="//bf:Instance[7]/bf:generation/bf:Generation/rdfs:label = 'viewing copy'"/>

test/ConvSpec-3XX.xspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@
240240
<x:expect label="353 creates a supplementaryContent/SupplementaryContent property of the Work" test="count(//bf:Work[1]/bf:supplementaryContent/bf:SupplementaryContent) = 1"/>
241241
<x:expect label="$a creates rdfs:label of SupplementaryContent" test="//bf:Work[1]/bf:supplementaryContent/bf:SupplementaryContent/rdfs:label = 'biography of creator'"/>
242242
<x:expect label="$b generates URI for SupplementaryContent" test="//bf:Work[1]/bf:supplementaryContent/bf:SupplementaryContent/@rdf:about = 'http://id.loc.gov/vocabulary/msupplcont/creatorbio'"/>
243-
<x:expect label="$0 creates an identifiedBy property of the SupplementaryContent" test="//bf:Work[1]/bf:supplementaryContent/bf:SupplementaryContent/bf:identifiedBy/bf:Identifier/rdf:value/@rdf:resource = 'http://example.com/bio'"/>
244-
<x:expect label="$2 creates a source property of the SupplementaryContent" test="//bf:Work[1]/bf:supplementaryContent/bf:SupplementaryContent/bf:source/bf:Source/bf:code='msupplcont'"/>
245-
<x:expect label="$3 creates a bflc:appliesTo property of the SupplementaryContent" test="//bf:Work[1]/bf:supplementaryContent/bf:SupplementaryContent/bflc:appliesTo/bflc:AppliesTo/rdfs:label = 'Bio supplement'"/>
243+
<!-- <x:expect label="$0 creates an identifiedBy property of the SupplementaryContent" test="//bf:Work[1]/bf:supplementaryContent/bf:SupplementaryContent/bf:identifiedBy/bf:Identifier/rdf:value/@rdf:resource = 'http://example.com/bio'"/> -->
244+
<!-- <x:expect label="$2 creates a source property of the SupplementaryContent" test="//bf:Work[1]/bf:supplementaryContent/bf:SupplementaryContent/bf:source/bf:Source/bf:code='msupplcont'"/> -->
245+
<!-- <x:expect label="$3 creates a bflc:appliesTo property of the SupplementaryContent" test="//bf:Work[1]/bf:supplementaryContent/bf:SupplementaryContent/bflc:appliesTo/bflc:AppliesTo/rdfs:label = 'Bio supplement'"/> -->
246246
</x:scenario>
247247

248248
<x:scenario label="362 - DATES OF PUBLICATION AND/OR SEQUENTIAL DESIGNATION">

test/ConvSpec-5XX.xspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@
4545
<x:scenario label="505 - FORMATTED CONTENTS NOTE">
4646
<x:context href="data/ConvSpec-5XX/marc.xml"/>
4747
<x:expect label="505 creates a tableOfContents/TableOfContents property of the Work" test="//bf:Work[1]/bf:tableOfContents[1]/bf:TableOfContents/rdfs:label = 'Quatrain II (16:35) -- Water ways (1:57) / by Stephen Paulus.'"/>
48-
<x:expect label="$u creates an rdf:value property of the TableOfContents" test="//bf:Work[1]/bf:tableOfContents[1]/bf:TableOfContents/rdf:value = 'https://stephenpaulus.com'"/>
49-
<x:expect label="...with xs:anyURI datatype" test="//bf:Work[1]/bf:tableOfContents[1]/bf:TableOfContents/rdf:value/@rdf:datatype='http://www.w3.org/2001/XMLSchema#anyURI'"/>
48+
<x:expect label="$u creates an electronicLocator property of the TableOfContents" test="//bf:Work[1]/bf:tableOfContents[1]/bf:TableOfContents/bf:electronicLocator/@rdf:resource = 'https://stephenpaulus.com'"/>
5049
</x:scenario>
5150

5251
<x:scenario label="506 - RESTRICTIONS ON ACCESS NOTE">

test/ConvSpec-841-887.xspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
<x:scenario label="856 - ELECTRONIC LOCATION AND ACCESS">
1414
<x:scenario label="$3 = 'Table of Contents'">
1515
<x:context href="data/ConvSpec-841-887/marc.xml"/>
16-
<x:expect label="856 with $3 = 'Table of Contents' generates a tableOfContents property of the Work" test="//bf:Work[@rdf:about='http://example.org/1#Work']/bf:tableOfContents/bf:TableOfContents/rdf:value='http://www.loc.gov/catdir/toc/onix07/93048623.html'"/>
17-
<x:expect label="...with xs:anyURI datatype" test="//bf:Work[@rdf:about='http://example.org/1#Work']/bf:tableOfContents/bf:TableOfContents/rdf:value/@rdf:datatype='http://www.w3.org/2001/XMLSchema#anyURI'"/>
16+
<x:expect label="856 with $3 = 'Table of Contents' generates a tableOfContents property of the Work" test="//bf:Work[@rdf:about='http://example.org/1#Work']/bf:tableOfContents/@rdf:resource='http://www.loc.gov/catdir/toc/onix07/93048623.html'"/>
1817
</x:scenario>
1918
<x:scenario label="If ind1 = 2">
2019
<x:context href="data/ConvSpec-841-887/marc.xml"/>

test/marc2bibframe2.xspec

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -909,11 +909,7 @@
909909
</bf:relatedTo>
910910
</bflc:Relationship>
911911
</bflc:relationship>
912-
<bf:tableOfContents>
913-
<bf:TableOfContents>
914-
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">http://www.loc.gov/catdir/toc/onix07/93048623.html</rdf:value>
915-
</bf:TableOfContents>
916-
</bf:tableOfContents>
912+
<bf:tableOfContents rdf:resource="http://www.loc.gov/catdir/toc/onix07/93048623.html" />
917913
<bf:hasInstance rdf:resource="http://example.org/4417401#Instance"/>
918914
</bf:Work>
919915
<bf:Instance rdf:about="http://example.org/4417401#Instance">

0 commit comments

Comments
 (0)