Skip to content

Commit 61ebb60

Browse files
committed
Ammend 020 and 024 so that acquisitionTerms is part of Identifier resource; fix tests, kind of.
1 parent 7dc9f45 commit 61ebb60

2 files changed

Lines changed: 4 additions & 29 deletions

File tree

test/ConvSpec-010-048.xspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<x:expect label="020 creates identifiedBy/Isbn properties of the Instance" test="count(//bf:Instance[1]/bf:identifiedBy/bf:Isbn) = 3"/>
5353
<x:expect label="$a is the rdf:value of the Isbn (without parenthetical qualifier)" test="//bf:Instance[1]/bf:identifiedBy[9]/bf:Isbn/rdf:value = '0877790086'"/>
5454
<x:expect label="$a can include qualifier in parentheses" test="//bf:Instance[1]/bf:identifiedBy[9]/bf:Isbn/bf:qualifier = 'pbk'"/>
55-
<x:expect label="$c creates an acqusitionTerms property of the Instance" test="//bf:Instance[1]/bf:acquisitionTerms[1] = '$10.00'"/>
55+
<x:expect label="$c creates an acqusitionTerms property of the Instance" test="//bf:Instance[1]/bf:identifiedBy[9]/bf:acquisitionTerms[1] = '$10.00'"/>
5656
<x:expect label="$q creates a qualifier property of the Isbn" test="//bf:Instance[1]/bf:identifiedBy[10]/bf:Isbn/bf:qualifier = 'black leather'"/>
5757
<x:expect label="$z creates a status/Status property of the Isbn" test="//bf:Instance[1]/bf:identifiedBy[11]/bf:Isbn/bf:status/bf:Status/@rdf:about = 'http://id.loc.gov/vocabulary/mstatus/cancinv'"/>
5858
<x:expect label="...with rdfs:label 'invalid'" test="//bf:Instance[1]/bf:identifiedBy[11]/bf:Isbn/bf:status/bf:Status/rdfs:label = 'invalid'"/>
@@ -90,7 +90,7 @@
9090
<x:expect label="$a creates an identifiedBy/Identifier property of the Instance" test="//bf:Instance[1]/bf:identifiedBy[12]/bf:Isrc/rdf:value = 'NLC018413261'"/>
9191
<x:expect label="...except if $2 = 'eidr', then it creates an identifiedBy property on the Work" test="//bf:Work[1]/bf:identifiedBy[6]/bf:Eidr/rdf:value = '10.5240/EA73-79D7-1B2B-B378-3A73-M'"/>
9292
<x:expect label="$a can include qualifier in parentheses" test="//bf:Instance[1]/bf:identifiedBy[18]/bf:Identifier/bf:qualifier = 'v. 1'"/>
93-
<x:expect label="$c creates an acquisitionTerms property of the instance" test="//bf:Instance[1]/bf:acquisitionTerms[3] = 'EUR28.50'"/>
93+
<x:expect label="$c creates an acquisitionTerms property of the instance" test="//bf:Instance[1]/bf:identifiedBy[18]/bf:acquisitionTerms[1] = 'EUR28.50'"/>
9494
<x:expect label="$d creates a note property of the Identifier" test="//bf:Instance[1]/bf:identifiedBy[15]/bf:Ean/bf:note/bf:Note/rdfs:label = '51000'"/>
9595
<x:expect label="$q creates a qualifier property of the Identifier" test="//bf:Instance[1]/bf:identifiedBy[14]/bf:Ismn/bf:qualifier[2] = 'sewn'"/>
9696
<x:expect label="$z creates a status/Status property of the Identifier with rdfs:label 'invalid'" test="//bf:Instance[1]/bf:identifiedBy[13]/bf:Upc/bf:status/bf:Status/rdfs:label = 'invalid'"/>

xsl/ConvSpec-010-048.xsl

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,17 +1021,6 @@
10211021
</xsl:apply-templates>
10221022
</xsl:when>
10231023
<xsl:when test="$vTag='020'">
1024-
<xsl:choose>
1025-
<xsl:when test="$serialization='rdfxml'">
1026-
<xsl:for-each select="marc:subfield[@code='c']">
1027-
<bf:acquisitionTerms>
1028-
<xsl:call-template name="tChopPunct">
1029-
<xsl:with-param name="pString" select="."/>
1030-
</xsl:call-template>
1031-
</bf:acquisitionTerms>
1032-
</xsl:for-each>
1033-
</xsl:when>
1034-
</xsl:choose>
10351024
<xsl:apply-templates select="." mode="instanceId">
10361025
<xsl:with-param name="serialization" select="$serialization"/>
10371026
<xsl:with-param name="pIdentifier">bf:Isbn</xsl:with-param>
@@ -1081,20 +1070,6 @@
10811070
</xsl:choose>
10821071
</xsl:if>
10831072
</xsl:variable>
1084-
<xsl:choose>
1085-
<xsl:when test="$serialization='rdfxml'">
1086-
<xsl:for-each select="marc:subfield[@code='c']">
1087-
<bf:acquisitionTerms>
1088-
<xsl:if test="$vXmlLang != ''">
1089-
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
1090-
</xsl:if>
1091-
<xsl:call-template name="tChopPunct">
1092-
<xsl:with-param name="pString" select="."/>
1093-
</xsl:call-template>
1094-
</bf:acquisitionTerms>
1095-
</xsl:for-each>
1096-
</xsl:when>
1097-
</xsl:choose>
10981073
<xsl:if test="$vIdentifier != ''">
10991074
<xsl:apply-templates select="." mode="instanceId">
11001075
<xsl:with-param name="serialization" select="$serialization"/>
@@ -1274,8 +1249,8 @@
12741249
</bf:assigner>
12751250
</xsl:for-each>
12761251
</xsl:if>
1277-
<!-- special handling for 036 -->
1278-
<xsl:if test="$vTag='036'">
1252+
<!-- special handling for 020, 024, 036 -->
1253+
<xsl:if test="$vTag='020' or $vTag='024' or $vTag='036'">
12791254
<xsl:for-each select="../marc:subfield[@code='c']">
12801255
<bf:acquisitionTerms>
12811256
<xsl:if test="$vXmlLang != ''">

0 commit comments

Comments
 (0)