ntra00 / marc2bibframe

Convert marc to BIBFRAME 1.0 - see lcnetdev/marc2bibframe2 for current release
http://www.loc.gov/bibframe/
Other
64 stars 20 forks source link

Coversion fails if MARCXML contains "070" datafield 774 and subfield 4 #254

Closed DavideAllavena closed 7 years ago

DavideAllavena commented 7 years ago

While processing MARCXML with SaxonHE9-5-1-10J every file with a section made like

<datafield tag="774" ind1="0" ind2=" ">
....
<subfield code="4">070</subfield>
...
  </datafield>

fails giving this output:

Error in processing Error at computed element constructor on line 3329 of module.MBIB-2-BIBFRAME-Shared.xqy:
  XQDY0074: Invalid element name. Invalid QName local part {070}
  at mbshared:get-name() (file:/home/user/marc2bibframe/modules/module.MBIB-2-BIBFRAME-Shared.xqy#2314)
  at mbshared:generate-related-work() (file:/home/user/marc2bibframe/modules/module.MBIB-2-BIBFRAME-Shared.xqy#2491)
  at mbshared:related-works() (file:/home/user/marc2bibframe/modules/module.MBIB-2-BIBFRAME-Shared.xqy#2751)
  at bfdefault:generate-default-work() (file:/home/user/marc2bibframe/modules/module.MARCXMLBIB-2-BIBFRAME.xqy#92)
  at marcbib2bibframe:marcbib2bibframe() 
Query processing failed: Run-time errors were reported

Reading the documentation there is no reference to the code 070. I can mitigate the issue removing the subfield but I'm loosing informations.

Is it a conversion problem or an error in the MARXML

ntra00 commented 7 years ago

The actual error is further down, at 3341, where it tries to construct a qname using "070". I am not sure why it doesn't have bf:contributor instead, based on the code I see. However, even if fixed, this will generate bibframe 1 data, so I think it would be better to wait a bit for the bibframe2 converter, which will be coming soon, and embedded in yaz and metaproxy.