Skip to content

Commit f204eec

Browse files
author
Dan Scott
committed
Treat OCLC Work identifiers as bf:Work bf:Identifiers
The OCLC Work identifier URIs are intended to group like works together, thus if found they should be turned into an Identifier at the level of a bf:Work instead of at the bf:Instance level. Signed-off-by: Dan Scott <dscott@laurentian.ca>
1 parent 7f4d46e commit f204eec

1 file changed

Lines changed: 33 additions & 15 deletions

File tree

xsl/ConvSpec-010-048.xsl

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,22 @@
310310
</xsl:choose>
311311
</xsl:template>
312312

313+
<xsl:template match="marc:datafield[@tag='024']" mode="work">
314+
<xsl:if test='starts-with(marc:subfield[@code="a"], "http://worldcat.org/entity/work/")' >
315+
<xsl:choose>
316+
<xsl:when test="$serialization = 'rdfxml'">
317+
<xsl:for-each select="marc:subfield[@code='a']">
318+
<bf:identifiedBy>
319+
<bf:Identifier>
320+
<xsl:attribute name="rdf:about"><xsl:value-of select="."/></xsl:attribute>
321+
</bf:Identifier>
322+
</bf:identifiedBy>
323+
</xsl:for-each>
324+
</xsl:when>
325+
</xsl:choose>
326+
</xsl:if>
327+
</xsl:template>
328+
313329
<xsl:template match="marc:datafield[@tag='033']" mode="work">
314330
<xsl:param name="serialization" select="'rdfxml'"/>
315331
<xsl:variable name="vDate">
@@ -852,21 +868,23 @@
852868
</xsl:apply-templates>
853869
</xsl:when>
854870
<xsl:when test="@tag='024'">
855-
<xsl:variable name="vIdentifier">
856-
<xsl:choose>
857-
<xsl:when test="@ind1 = '0'">bf:Isrc</xsl:when>
858-
<xsl:when test="@ind1 = '1'">bf:Upc</xsl:when>
859-
<xsl:when test="@ind1 = '2'">bf:Ismn</xsl:when>
860-
<xsl:when test="@ind1 = '3'">bf:Ean</xsl:when>
861-
<xsl:when test="@ind1 = '4'">bf:Sici</xsl:when>
862-
<xsl:otherwise>bf:Identifier</xsl:otherwise>
863-
</xsl:choose>
864-
</xsl:variable>
865-
<xsl:apply-templates select="." mode="instanceId">
866-
<xsl:with-param name="serialization" select="$serialization"/>
867-
<xsl:with-param name="pIdentifier"><xsl:value-of select="$vIdentifier"/></xsl:with-param>
868-
<xsl:with-param name="pInvalidLabel">invalid</xsl:with-param>
869-
</xsl:apply-templates>
871+
<xsl:if test='not(starts-with(marc:subfield[@code="a"], "http://worldcat.org/entity/work/"))' >
872+
<xsl:variable name="vIdentifier">
873+
<xsl:choose>
874+
<xsl:when test="@ind1 = '0'">bf:Isrc</xsl:when>
875+
<xsl:when test="@ind1 = '1'">bf:Upc</xsl:when>
876+
<xsl:when test="@ind1 = '2'">bf:Ismn</xsl:when>
877+
<xsl:when test="@ind1 = '3'">bf:Ean</xsl:when>
878+
<xsl:when test="@ind1 = '4'">bf:Sici</xsl:when>
879+
<xsl:otherwise>bf:Identifier</xsl:otherwise>
880+
</xsl:choose>
881+
</xsl:variable>
882+
<xsl:apply-templates select="." mode="instanceId">
883+
<xsl:with-param name="serialization" select="$serialization"/>
884+
<xsl:with-param name="pIdentifier"><xsl:value-of select="$vIdentifier"/></xsl:with-param>
885+
<xsl:with-param name="pInvalidLabel">invalid</xsl:with-param>
886+
</xsl:apply-templates>
887+
</xsl:if>
870888
</xsl:when>
871889
<xsl:when test="@tag='025'">
872890
<xsl:apply-templates select="." mode="instanceId">

0 commit comments

Comments
 (0)