Skip to content

351 repeatability issues #239

@kirkhess

Description

@kirkhess

<xsl:template match="marc:datafield[@tag='351' or (@tag='880' and substring(marc:subfield[@code='6'],1,3)='351')]" mode="work">
<xsl:param name="serialization" select="'rdfxml'"/>
<xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>
<xsl:choose>
<xsl:when test="$serialization = 'rdfxml'">
<bf:collectionArrangement>
<bf:CollectionArrangement>
<xsl:apply-templates select="marc:subfield[@code='3']" mode="subfield3">
<xsl:with-param name="serialization" select="$serialization"/>
</xsl:apply-templates>
<xsl:for-each select="marc:subfield[@code='c']">
<bf:hierarchicalLevel>
<xsl:if test="$vXmlLang != ''">
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
</xsl:if>
<xsl:call-template name="tChopPunct">
<xsl:with-param name="pString"><xsl:value-of select="."/></xsl:with-param>
</xsl:call-template>
</bf:hierarchicalLevel>
</xsl:for-each>
<xsl:for-each select="marc:subfield[@code='a']">
<bf:collectionOrganization>
<xsl:if test="$vXmlLang != ''">
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
</xsl:if>
<xsl:call-template name="tChopPunct">
<xsl:with-param name="pString"><xsl:value-of select="."/></xsl:with-param>
</xsl:call-template>
</bf:collectionOrganization>
</xsl:for-each>
<xsl:for-each select="marc:subfield[@code='b']">
<bf:pattern>
<xsl:if test="$vXmlLang != ''">
<xsl:attribute name="xml:lang"><xsl:value-of select="$vXmlLang"/></xsl:attribute>
</xsl:if>
<xsl:call-template name="tChopPunct">
<xsl:with-param name="pString"><xsl:value-of select="."/></xsl:with-param>
</xsl:call-template>
</bf:pattern>
</xsl:for-each>
</bf:CollectionArrangement>
</bf:collectionArrangement>
</xsl:when>
</xsl:choose>
</xsl:template>

https://www.oclc.org/bibformats/en/3xx/351.html

Subfield $c is not repeatable so you don't need the code to repeat it in the xslt.

Subfield $a and $b are grouped together. They way it does it now is you have a CollectionArrangement with $c, all the $a and all the $b. When it goes back to MARC it is going to group them the same way, all the a together and all the b together.

Exmaple ocn 10227986:
<datafield tag="351" ind1=" " ind2=" "> <subfield code="a">Organized in five series:</subfield> <subfield code="c">Series I. Minutes and correspondence, 1936-1942,</subfield> <subfield code="b">alphabetical and chronological arrangement;</subfield> <subfield code="a">Series II. Correspondence re protection of the corporate name of the Presbyterian Church in the U.S.A., 1936-1940,</subfield> <subfield code="b">chronological arrangement;</subfield> <subfield code="a">Series III. Correspondence with other judicatories, 1936-1942,</subfield> <subfield code="b">arranged alphabetically by correspondent within category (synods, presbyteries, local churches);</subfield> <subfield code="a">Series IV. Correspondence, Auburn Theological Seminary,</subfield> <subfield code="b">arranged chronologically;</subfield> <subfield code="a">Series V. Miscellaneous.</subfield> </datafield>

m2bf version:
<bf:collectionArrangement> <bf:CollectionArrangement rdf:nodeID="Na6015133f27e497d9884eb7ef23dbf61"> <bf:hierarchicalLevel>Series I. Minutes and correspondence, 1936-1942</bf:hierarchicalLevel> <bf:collectionOrganization>Organized in five series</bf:collectionOrganization> <bf:collectionOrganization>Series II. Correspondence re protection of the corporate name of the Presbyterian Church in the U.S.A., 1936-1940</bf:collectionOrganization> <bf:collectionOrganization>Series III. Correspondence with other judicatories, 1936-1942</bf:collectionOrganization> <bf:collectionOrganization>Series IV. Correspondence, Auburn Theological Seminary</bf:collectionOrganization> <bf:collectionOrganization>Series V. Miscellaneous</bf:collectionOrganization> <bf:pattern>alphabetical and chronological arrangement</bf:pattern> <bf:pattern>chronological arrangement</bf:pattern> <bf:pattern>arranged alphabetically by correspondent within category (synods, presbyteries, local churches)</bf:pattern> <bf:pattern>arranged chronologically</bf:pattern> </bf:CollectionArrangement> </bf:collectionArrangement>

bf2m version:
<marc:datafield tag="351" ind1=" " ind2=" "> <marc:subfield code="c">Series I. Minutes and correspondence, 1936-1942</marc:subfield> <marc:subfield code="a">Series III. Correspondence with other judicatories, 1936-1942</marc:subfield> <marc:subfield code="a">Organized in five series</marc:subfield> <marc:subfield code="a">Series IV. Correspondence, Auburn Theological Seminary</marc:subfield> <marc:subfield code="a">Series V. Miscellaneous</marc:subfield> <marc:subfield code="a">Series II. Correspondence re protection of the corporate name of the Presbyterian Church in the U.S.A., 1936-1940</marc:subfield> <marc:subfield code="b">arranged alphabetically by correspondent within category (synods, presbyteries, local churches)</marc:subfield> <marc:subfield code="b">alphabetical and chronological arrangement</marc:subfield> <marc:subfield code="b">chronological arrangement</marc:subfield> <marc:subfield code="b">arranged chronologically</marc:subfield> </marc:datafield>

Finally, you could fix this specific field, but there are a bunch of 3xx and 5xx that have this pattern where the subfields repeat.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions