lcnetdev / marc2bibframe2

Convert MARC records to BIBFRAME2 RDF
http://www.loc.gov/bibframe/
Creative Commons Zero v1.0 Universal
89 stars 35 forks source link

380 conversion subfield strings have bad xml:lang attribute #191

Closed wafschneider closed 3 years ago

wafschneider commented 3 years ago

From @ntra00: For records with a 380, it runs conv spec 3xx, and seems to apply templates mode=xmllang on the current subfield(380$a) for vxmllang, instead of sending in the parent datafield.

This match in utils sets it up:

  <xsl:template match="marc:subfield" mode="generateProperty">
    <xsl:param name="serialization" select="'rdfxml'"/>
    <xsl:param name="pProp"/>
    <xsl:param name="pResource"/>
    <xsl:param name="pTarget"/>
    <xsl:param name="pLabel"/>
    <xsl:param name="pProcess"/>
    <xsl:param name="pPunctuation">
      <xsl:text>.:,;/ </xsl:text>
    </xsl:param>
    <xsl:param name="pVocabStem"/>
    <xsl:variable name="vXmlLang"><xsl:apply-templates select="." mode="xmllang"/></xsl:variable>

http://c2vlsmprxy02.loc.gov:210/lcdb?operation=searchRetrieve&version=1.1&query=rec.id=19612688&recordSchema=bibframe2a-dev&maximumRecords=1

<bf:genreForm>

<bf:GenreForm rdf:about="http://id.loc.gov/authorities/genreForms/gf2014026362">

<rdfs:label xml:lang="Graphic novels">Graphic novels</rdfs:label>

<bf:source>

<bf:Source rdf:about="http://id.loc.gov/vocabulary/genreFormSchemes/lcgft">

<bf:code>lcgft</bf:code>

</bf:Source>

</bf:source>

</bf:GenreForm>

</bf:genreForm>

I’m not sure if there are repercussions from sending it the parent marc:datafield, but I think it needs to be done because xmllang mode is only available for marc:datafields.