[Koha-devel] Default MARC dialect

Magnus Enger magnus at enger.priv.no
Thu Jul 22 13:43:45 CEST 2010


Hi all!

During my quest to add support for NORMARC (the Norwegian dialect of
MARC) to Koha, I have come across several places[1] where UNIMARC is
treated as the default if MARC21 is not specified. Here is an example
from the subroutine GetMarcNotes in C4/Biblio.pm:

1268     if ( $marcflavour eq "MARC21" ) {
1269         $scope = '5..';
1270     } else {    # assume unimarc if not marc21
1271         $scope = '3..';
1272     }

When $marcflavour is "NORMARC" this fails, because NORMARC is more
similar to MARC21 than to UNIMARC. I can think of two solutions to
this:

1. Add NORMARC to the conditional:

if ( $marcflavour eq "MARC21" || $marcflavour eq "NORMARC" ) {
   $scope = '5..';
} else {    # assume unimarc if not marc21
   $scope = '3..';
}

2. Reverse the logic:

if ( $marcflavour eq "UNIMARC" ) {
   $scope = '3..';
} else {    # assume marc21 if not unimarc
   $scope = '5..';
}

I would prefer the second solution, because

- in all the places I have found this situation it would be resolved
by this solution, because NORMARC is so similar to MARC21
- as far as I know there are more MARC dialects that resemble MARC21
than there are dialects that resemble UNIMARC, so this solution would
perhaps make it easier to add more dialects in the future

If anyone has a completely different solution or pro/con arguments
they would like to add I'm all ears!

Regards,
Magnus Enger
libriotech.no

PS. Just for the record: I'm no fan of NORMARC and would prefer if
Norwegian libraries started using MARC21, but for Koha to be accepted
in Norway it needs to support NORMARC...

Notes:
[1] http://wiki.github.com/MagnusEnger/KohaNor/existing-files


More information about the Koha-devel mailing list