Open nichtich opened 2 years ago
The difference is because of the history how these mappers were created . I made the marc_map and in a later phase @cKlee 's research on MARC Spec resulted in his marc_spec implementation in Perl.
There is overlap between marc_map and the marc_spec (Casten worked on that) but there is some syntax differences. E.g.:
100$a
vs 100a
)100[0]
as first 100 field vs 100[0]
the 100 field with indicator-1 == 0)The marc_map syntax is also used in other fixes such as marc_replace_all
, marc_remove
, marc_cut
, marc_copy
These things can be tackled by mapping the MARC paths themselves to the MARCSpec version and using the MARC Spec tools. This seems doable for all the fixes above, but requires time and effort.
There is some overhead currently in using marc_spec which runs on my local tests about 11% slower for every included marc_spec instead of marc_map. This overhead is for my own local applications a reason to use marc_map over marc_spec in some use cases (with lots of data and little time slots available for processing)
Thank's for clarification. To summarize:
$
optional in marc_spec
so subfield references are valid in both fixesmarc_spec
to understand indicators in square brackets (at least when it includes a comma)?marc_spec
marc_map
fixes aliases of the corresponding marc_spec
fixes.
Having both
marc_map
andmarc_spec
is confusing, why having both with slightly different functionality? Can we makemarc_map
an alias formarc_spec
instead?