Comment 3 for bug 1125621

Revision history for this message
Dan Scott (denials) wrote : Re: RDA 336, 337 338 fields

Coding icons (and user-friendly text labels) based on 33x first, with a fallback to 007, shouldn't be too difficult, actually.

The 33x fields won't be fun to deal with, as they are all repeatable, and their subfields are repeatable as well, but assuming we can handle that, the pseudo-code would look like:

# Try and set the format icon and label by RDA fields
my %format = set_format_by_rda($record);

# Fall back to 007 if we did not get anything back from RDA
if (!exists($format->{label}) {
    %format = set_format_by_007($record);
}

Of course all of the fun happens in the to-be-defined set_format_by_rda() function :)

Things are complex enough that I think it would make sense for this mapping to occur in the Perl layer rather than as a TT2 macro, but that's getting well ahead of myself...