lcnetdev / marc2bibframe2

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

Removing Equal sign (=) from bf:mainTitle #72

Closed elephantsmith closed 5 years ago

elephantsmith commented 6 years ago

In MARC 245 subfield $a, there is an equal sign trailing to the subfield if there is a parallel title designated as 245 subfield $b. An example can be found in the following OCLC record #32448722

245 00 Klaviersonate op. 27/2 = ǂb Piano sonata op. 27/2 : Sonata quasi una fantasia / ǂc Ludwig van Beethoven ; nach den Quellen herausgegeben von Peter Hauschild ; Hinweise zur Interpretation und Fingersätze von Boris Bloch.

The converter will convert 245$a into bf:mainTitle with equal sign (=) at the end of the statement: bf:mainTitle "Klaviersonate op. 27/2 =" ;

You can check the whole title field conversion with BIBFRAME Comparison Tool: http://id.loc.gov/tools/bibframe/compare-lccn/full-ttl?find=96752910

Another example is OCLC record #164908904 with the following 245 fields: 西游记 = ǂb Journey to the West / ǂc [文字改编彭福祥 ; 电脑美术孟庆丰]. Xi you ji = ǂb Journey to the West / ǂc [wen zi gai bian Peng Fuxiang ; dian nao mei shu Meng Qingfeng].

The converter will convert 245$a into bf:mainTitle with equal sign (=) at the end of the statements: bf:title [ a bf:Title ; rdfs:label "Xi you ji = Journey to the West /" ; bflc:titleSortKey "Xi you ji = Journey to the West /" ; bf:mainTitle "Xi you ji =" ; bf:subtitle "Journey to the West" ], [ a bf:Title ; rdfs:label "西游记 = Journey to the West /"@zh-hani ; bflc:titleSortKey "西游记 = Journey to the West /" ; bf:mainTitle "西游记 ="@zh-hani ; bf:subtitle "Journey to the West"@zh-hani ] .

You check the whole record conversion using BIBFRAME Comparison Tool: http://id.loc.gov/tools/bibframe/compare-lccn/full-ttl?find=2008401465

PS: This is a multiscript record where title proper and parallel title are in different language. The converter incorrectly treats them as the same language.

Remove equal sign (=) from bf:mainTitle. Thanks!

kirkhess commented 6 years ago

The bf:mainTitle conversion strips trailing punctuation now but "=" isn't specified as one of the punctuation characters to strip: utils.xsl:line137-139

<xsl:param name="punctuation">
     <xsl:text>.:,;/ </xsl:text>
</xsl:param>
wafschneider commented 5 years ago

This has been fixed in PR #88, merged into the v1.4.0 branch (soon to be released).