4. C3 Plus-Marc21-XML
add chapter

4..1 Target

Generates a Marc21.xml from a C3 Plus XML file.

4..2 Implementation

  • Execution of the C3 Plus XML as the first transfer target
  • Lua script (C:\Program Files (x86)\ImageWareComponents\BCS2_V6\scripts)
  • Reference in the script to the Lua file: var map = ut.c3XmlConv(c3_xml,„marc21_bvb“);
// ---------------------------------------------------------------------------------
// Date: 2018-05-28
// Author: RLO
// Purpose: generate Marc21 XML from C3+ XML (must have been generatedbefore...)
// ---------------------------------------------------------------------------------
// History:
//
// 2018/05/29 RLO created script from former script (old Format)
// ---------------------------------------------------------------------------------
// -----------------------------------------------------------
// Indexnames as Script-Variables:
// use them instead numerics...
// -----------------------------------------------------------
// -----------------------------------------------------------
ind_c3_type = 1; // Index c3_type Type: option list [no associated meta data type]: Type for c3-xml (monograph, serial, periodical)
ind_c3_id = 2; // Index c3_id Type: String [no associated meta data type]:
ind_order_id = 3; // Index order_id Type: String [no associated meta data type]: ME-Ordernumber
ind_medium_number = 4; // Index medium_number Type: String [no associated meta data type]:
ind_swets_id = 5; // Index swets_id Type: String [no associated meta data type]:
ind_library_network_id = 6; // Index library_network_id Type: String [no associated meta data type]: Group identifier
ind_local_id = 7; // Index local_id Type: String [no associated meta data type]:
ind_zdb_id = 8; // Index zdb_id Type: String [ZDB ID]:
ind_main_title = 9; // Index main_title Type: String [no associated meta data type]: Title
ind_publisher = 10; // Index publisher Type: String [no associated meta data type]:
ind_edition = 11; // Index edition Type: String [no associated meta data type]:
ind_year = 12; // Index year Type: Zeichenkette [no associated meta data type]: year of publication
ind_main_language = 13; // Index main_language Type: options list [ISO 639-3 Language Code]: ISO639-3 languages shortcut
ind_volume_issue = 14; // Index volume_issue Type: String [no associated meta data type]:
ind_volume = 15; // Index volume Type: String [no associated meta data type]:
ind_issue = 16; // Index issue Type: String [no associated meta data type]:
ind_publication_date = 17; // Index publication_date Type: String [date of publication]:
ind_publication_place = 18; // Index publication_place Type: String [place of publication]:
ind_callnumber = 19; // Index callnumber Type: String [signature]:
ind_issn = 20; // Index issn Type: String [ISSN]:
ind_isbn = 21; // Index isbn Type: String [ISBN]:
ind_classification_code = 22; // Index classification_code Type: String [no associated meta data type]:
ind_lib_network_isil = 23; // Index lib_network_isil Type: String [no associated meta data type]:
ind_letzte_Seitennummer = 24; // Index letzte Seitennummer Type: String [no associated meta data type]: last page of the last article
// -----------------------------------------------------------
// -----------------------------------------------------------
//
// Fetch C3+ XML Result from Job's KeyMap
//
c3_xml_string = job.getKeyValue("C3_PLUS_XML");
//ut.notifyUser('C3 XML', c3_xml_string);
//
// now create the Marc 21 XML...
//
var map;
map = ut.c3XmlConv(c3_xml, "marc21");
if (0 != map['rc']) {
ut.notifyUser('An error has occurred:', 'Please report the following to your adminitstrator: \n\n' +map['stderr']);
} else { 
marc21_xml_string = map['result_string']; job.setKeyValue("Marc21XML", marc21_xml_string);
//ut.notifyUser('Marc21', marc21_xml_string);
}
marc21_xml_string;