[Koha-devel] Default MARC dialect

Jane Wagner jwagner at ptfs.com
Thu Jul 22 13:47:56 CEST 2010


Wouldn't a better solution be to build in a check for the syspref
marcflavour, then act accordingly?  I'm assuming you're adding NORMARC to
that as an option.  That might be more flexible in the long run, as others
add other MARC variants.

Jane Wagner
Library Systems Analyst
PTFS Inc.
Content Management and Library Solutions
6400 Goldsboro Road, Suite 200
Bethesda, MD  20817
(301) 654-8088 x 151
jwagner at ptfs.com

-----Original Message-----
From: koha-devel-bounces at lists.koha-community.org
[mailto:koha-devel-bounces at lists.koha-community.org] On Behalf Of Magnus
Enger
Sent: Thursday, July 22, 2010 7:44 AM
To: koha-devel at lists.koha-community.org
Subject: [Koha-devel] Default MARC dialect

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
_______________________________________________
Koha-devel mailing list
Koha-devel at lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel


More information about the Koha-devel mailing list