Skip to content
  • Marcel de Rooy's avatar
    Bug 10407: Add marcxml import (follow-up) · 3badc57c
    Marcel de Rooy authored and Kyle M Hall's avatar Kyle M Hall committed
    
    
    This patch makes the following changes:
    
    [1] Based on the groundwork of the former patch, add call to
        RecordsFromMARCXMLFile in stage-marc-import. Use format param.
    [2] Add format to the template. Use file extension to determine.
        If you use .xml or .marcxml as extension, MARCXML is selected.
    [3] In stage-marc-import.tt mark UTF-8 encoding as UTF-8 not as utf8.
    [4] BatchStageMarcRecords: do not call plugin if you have no records.
    [5] RecordsFromISO2709File: also return errors in an array.
    [6] In misc/stage_file.pl also use UTF-8. Handling of errors from [5].
    
    Test plan:
    [1] Import an empty file as MARC or MARCXML (with Tools/Stage..import).
    [2] Import an non-empty file with invalid contents as MARC or MARCXML.
    [3] Export a few records with Tools/Export as MARC and MARCXML.
    [4] Import these two files. Check selected format versus file extension.
    [5] Import a MARCXML file with misc/stage_file.pl.
    
    Signed-off-by: default avatarMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
    
    Signed-off-by: default avatarJosef Moravec <josef.moravec@gmail.com>
    
    Signed-off-by: default avatarJonathan Druart <jonathan.druart@bugs.koha-community.org>
    
    Signed-off-by: default avatarKyle M Hall <kyle@bywatersolutions.com>
    3badc57c