NAME

MARC::Detrans::Config - Stores de-transliteration configuration data

SYNOPSIS

use MARC::Detrans::Config;
my $config = MARC::Detrans::Config->new( 'file.xml' );

DESCRIPTION

MARC::Detrans::Config will read detransliteration rules from an XML file which you can then use to create a MARC::Detrans::Converter object to actually convert MARC records.

<?xml version="1.0" encoding="UTF-8"?>
<config>

    <!-- the language we are detransliterating -->
    <language name="Russian" code="rus" />

    <!-- which fields/subfields to detransliterate or copy -->
    <detrans-fields>
        <field tag="245">
            <subfield code="a" />
            <subfield code="q" />
            <subfield code="d" copy="true" />
        </field>
        <field tag="440">
            <subfield code="a" />
        </field>
    </detrans-fields>

    <!-- a single character mapping -->
    <rule>
        <roman>b</roman>
        <marc escape="(N">B</marc>
    </rule>

    <!-- more rules ... -->

    <!-- a single authority mapping -->
    <name>
        <roman>$aNicholas $bI, $cEmperor of Russia, $d1796-1855</roman>
        <marc>$a^ESC(NnIKOLAJ^ESCs, $bI, $c^ESC(NiMPERATOR^ESCs ^ESC(NwSEROSSIJSKIJ^ESCs, $d1796-1855</marc>
    </name>

</config>

METHODS

new()

The constructor, which you must pass a file path.

rules()

Returns a MARC::Detrans::Rules object that contains the transliteration rules being used in the configuration.

names()

Returns a MARC::Detrans::Names object that contains the authority mappings being used in the configuration.

allEscapeCodes()

Returns a list of all the MARC8 escape codes that are in use in this configuration. Useful for when you are building 006 fields that itemize the different character set codes in use.

detransFields()

Returns a list of fields that the configuration lists as desiring de-transliteration.

needsDetrans()

Returns true (1) or false (undef) to indicate whether the config lists a particular field/subfield combination as needing detransliteration.

needsCopy()

Returns true (1) or false (undef) to indicate wheter the config lists a particular field/subfield combination as needing a copy.

AUTHORS

  • Ed Summers <ehs@pobox.com>

1 POD Error

The following errors were encountered while parsing the POD:

Around line 140:

=over without closing =back