lcnetdev / marc2bibframe2

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

Missing bf:Title tags #208

Closed RichardWallis closed 3 years ago

RichardWallis commented 3 years ago

Identified error where <bf:Title> tags are missed out of produced RDF.

Example RDF extract:

      ...
<bf:Instance rdf:about="http://example.org/4412230#Instance856-27">
        <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Electronic"/>
        <bf:title>
          <rdfs:label>A geography of the Malay Peninsula and surrounding countries. Part I, Malay Peninsula, Borneo /</rdfs:label>
          <bflc:titleSortKey>geography of the Malay Peninsula and surrounding countries. Part I, Malay Peninsula, Borneo /</bflc:titleSortKey>
          <bf:mainTitle>A geography of the Malay Peninsula and surrounding countries</bf:mainTitle>
          <bf:partNumber>Part I</bf:partNumber>
          <bf:partName>Malay Peninsula, Borneo</bf:partName>
        </bf:title>
        ...

Whereas the bf:Work definition in the same output file is correct:

    <bf:title>
      <bf:Title>
        <rdfs:label>geography of the Malay Peninsula and surrounding countries. Part I, Malay Peninsula, Borneo</rdfs:label>
        <bflc:titleSortKey>geography of the Malay Peninsula and surrounding countries. Part I, Malay Peninsula, Borneo</bflc:titleSortKey>
        <bf:mainTitle>A geography of the Malay Peninsula and surrounding countries.</bf:mainTitle>
        <bf:partNumber>Part I</bf:partNumber>
        <bf:partName>Malay Peninsula, Borneo</bf:partName>
      </bf:Title>
    </bf:title>

As the resultant RDFXML is invalid it fails import validation for downstream RDF processing.

I have many examples of this and they all appear to be Instance definitions of type http://id.loc.gov/ontologies/bibframe/Electronic - which might give a clue as to where the problem may reside.

kefo commented 3 years ago

Looks like this was fixed: https://github.com/lcnetdev/marc2bibframe2/pull/201

Feel free to try 1.7. It's a work in progress, but I believe all tests are passing presently.

RichardWallis commented 3 years ago

Confirmed fix in latest version.