Hi Ron,
As requested by you, I state my feature request in the biblio issue queue.
When looking at the code with which MARC records are imported in the Biblio module (biblio.import.export.inc lines 505 - 572) I noticed that not all fields of a MARC record are matched against (possible) Biblio fields.
For example, MARC field 650 which holds the subject(s) are not matched against the Biblio keywords fields. MARC field 650 is a repeatable field and can perfectly be matched against the many-to-many keywords tables biblio_keyword & biblio_keyword_data. Regretfully I do not know how to code the match of the multiple values of this 650 field into the biblio keywords fields structure...
A second example is that of the MARC 856 field(s), this field holds the 'electronic location and access' of a source (e.g. a url). My attempt to write some code here, results in the last occurence of the 856 field to be stored in biblio_url. Is there a way to create multiple biblio_urls for a biblio record? Using CCK for this does not help quite well because of other modules (like your OAI module) using only biblio fields. Or is there a way to let me choose which MARC 856 occurence is saved in Biblio (e.g. the first occurence instead of the last)?
A third question is about Publication Type, when importing the attached sample file all records get the Miscellaneous value although these are books, journals or cd's.
code example MARC 856 fields matched against biblio_url:
case '856':
$node['biblio_url'] = $field->subfield('u');
break;
Last thing, when importing the sample file I get an error for contributors:
warning: Invalid argument supplied for foreach() in /example.com/modules/biblio/biblio.contributors.inc on line 71
As a reference I uploaded an example file of 5 MARC recods from a production environment (please remove the .txt part of the file, only with this I could upload this file).
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | test05082010-1.mrc_.zip | 2.24 KB | cvknl |
| 5_records_utf8.mrc_.txt | 5.83 KB | cvknl |
Comments
Comment #1
rjerome commentedI don't claim to be a "MARC" expert, and if I recall correctly, publication types was one of the issues I was trying to resolve when I last looked at this portion of the module. Do you know which MARC field stores the publication type?
Ron.
Comment #2
cvknl commentedThe information about publication type can be found in the Leader part of the MARC record (have a look at http://www.loc.gov/marc/bibliographic/bdleader.html for more info). A combination of the position 06 and 07 gives the right publication type.
The sixth position (06) reflects the publication type (e.g. a=language material (fysical), m=computer file (electronic), etc), the seventh position (07) shows whether the record is a book (m=Monograph/Item), book chapter (a=Monographic component part), journal (s=Serial) or journal article (b=Serial component part), etc.
For example: a topografical map will have position 06=e and position 07=m.
In Biblio there is not a publication type "Electronic book" (which is quite often used nowadays in libraries), if that publication type is added to biblio, it can be mapped with a MARC record like this position 06=m and position 07=m.
Best regards, Christian.
Comment #3
cvknl commentedHi Ron,
Any news regarding this issue?
Greetings Christian.
Comment #4
rjerome commentedUnfortunately, I haven't had a chance to work on this yet. Don't be afraid to remind me again though ;-)
Comment #5
rjerome commentedI had a chance to look at this tonight, and I've check in some changes (http://drupal.org/cvs?commit=383478) that address most, if not all of these issues.
Ron
Comment #6
cvknl commentedHi Ron,
Thanx a lot! I will try the new code soon.
Best regards, Christian.
Comment #7
cvknl commentedHi Ron,
One more thing: in MARC, fields are repeatable, for example a book can be written by more than one (corporate) author. When importing MARC records into Biblio not all (corporate) authors are imported, it is always the last author that gets imported. Maybe there should be a foreach loop when importing the (corporate) authors, like you did for keywords? It occurs for the 100 & 700 MARC fields and the 110 & 710 MARC fields.
I attached a MARC file containing 4 records, the first record ("Assessing district health needs...") has three authors of which only Annett, H gets imported. I added .zip to file to be able to upload it, just remove the _.zip part of the file.
Best regards, Christian
EDIT: the same applies to keywords as well, only the last keyword is imported and all others before the last one are not. Looks like the foreach loop that you used for keywords does not work properly.
Comment #8
cvknl commentedHi Ron,
With your changes made to the MARC parser most of the requested functionality is now present. I changed some Biblio code a little bit for the migration phase to meet my project goals. The Biblio implementation will return to the original Biblio code base after migration.
BR, Christian.