I was trying to import records that where exported from OJS via OAI/marcxml to another system, and realized that (contrary to oai_dc that worked perfectly), with metadataPrefix=marcxml there is NO identifier for each record inside the marc data.
Although I'm not familiar with the internals of OJS nor with the implementation decisions, I found out that I could get the desired result by adding the following line to OAIMetadataFormat_MARC21.inc.php:
83a84
> "\t<controlfield tag=\"001\">" . $article->getBestArticleId() . "</controlfield>\n" .
I believe that this controlfield is crucial for a marc record and should be present if/whenever possible (in addition to the existing OAI Identifier).
In addition to 001, it seems that MARC fields need reordering (so that they follow an ascending order), and I think field 260b is used in a wrong way.
Since the MARC record that is returned from OAI is for the article, the Journal Title, Volume, Date, etc need to be put in the 773 field (Host Item Entry). I propose using at least the following MARC subfields:
773t: Journal Title
773g: Volume/Issue etc
773x: ISSN
773d: Publisher/date of publication
My proposal for the record constructing code is in plugins/oaiMetadataFormats/marcxml/OAIMetadataFormat_MARC21.inc.php:
- Code: Select all
$response = "<record\n" .
"\txmlns=\"http://www.loc.gov/MARC21/slim\"\n" .
"\txmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" .
"\txsi:schemaLocation=\"http://www.loc.gov/MARC21/slim\n" .
"\thttp://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd\">\n" .
"\t<leader> cam 3u </leader>\n" .
"\t<controlfield tag=\"001\">" . $article->getBestArticleId() . "</controlfield>\n" .
"\t<controlfield tag=\"008\">\"" . date('ymd Y', strtotime($issue->getDatePublished())) . " eng \"</controlfield>\n" .
$this->formatElement('042', ' ', ' ', 'a', 'dc');
foreach ($journal->getTitle(null) as $locale => $title) {
if ($locale == $journal->getPrimaryLocale()) continue;
$response .= $this->formatElement('242', '0', '0', 'a', $article->getTitle($locale));
//$response .= $this->formatElement('242', '0', '0', 'y', $locale);
}
$response .= $this->formatElement('245', '0', '0', 'a', $article->getTitle($journal->getPrimaryLocale())) .
$this->formatElement('260', ' ', ' ', 'c', $issue->getDatePublished()) .
$this->formatElement('500', ' ', ' ', 'a', $coverage) .
$this->formatElement('520', ' ', ' ', 'a', $article->getLocalizedAbstract()) .
$this->formatElement('540', ' ', ' ', 'a', strip_tags($journal->getLocalizedSetting('copyrightNotice'))) .
$this->formatElement('546', ' ', ' ', 'a', $article->getLanguage()) .
$this->formatElement('653', ' ', ' ', 'a', $subject) .
$this->formatElement('655', ' ', '7', 'a', $section->getLocalizedIdentifyType()) .
$this->formatElement('720', ' ', ' ', 'a', $creators) .
$this->formatElement('720', ' ', ' ', 'a', strip_tags($article->getLocalizedSponsor())) .
$this->formatElement('773', ' ', ' ', 'd', $publisher) .
$this->formatElement('773', ' ', ' ', 'g', $issue->getIssueIdentification().", ".$pages) .
$this->formatElement('773', ' ', ' ', 't', $journal->getTitle($journal->getPrimaryLocale())) .
$this->formatElement('773', ' ', ' ', 'x', $issn) .
$this->formatElement('786', '0', ' ', 'n', $source) .
$this->formatElement('787', '0', ' ', 'n', $record->relation) .
$this->formatElement('856', ' ', ' ', 'q', $format) .
$this->formatElement('856', '4', '0', 'u', Request::url($journal->getPath(), 'article', 'view', array($article->getBestArticleId()))) .
"</record>\n";
where $issn is defined some lines before as: if ($onlineIssn !="" and $onlineIssn!=$printIssn) $issn=$onlineIssn; else $issn=$printIssn;
What do you think?
Best regards,
Theodoropoulos Theodoros
