NAME
MARC::HTML.pm
SYNOPSIS
$html = &array2html (@marc_array);
These variables are also accessible:
@MARC::HTML::html_fields
%MARC::HTML::html_names
%MARC::HTML::html_hash
%MARC::HTML::html_map
DESCRIPTION
MARC::HTML.pm takes as input a MARC array structure (as output by MARC::Base::marc2array) and returns an HTML formatted version of the MARC content, as a string.
The input record is formatted as an HTML TABLE, with two columns: the left column contains a field description ('Title', 'Subject', ...) while the right column contains the actual record data.
MARC fields are minimally converted to text fields. In some cases, multiple MARC fields are combined into a single output field, e.g. 'Subject' combines all instances of 6xx MARC fields into a single text field, with multiples separated by a line break.
Several data structures are also available if needed:
@html_fields is a list of fields required for output, defining the order of output.
%html_names is a hash of fields containing the name (description) to be used for each field in the output.
%html_hash is a hash of fields containing the data for each output field, as a string. This may be useful if you wish to do some post-processing of the data.
%html_map is a hash mapping each required MARC tag to an output field name, and specifying whether multiple values are allowed, and a replacement string for the subfield delimiter and subfield code.
VERSION
Version 2.004 (2000-Jun-14)
Added titles (730 & 740) are mapped separately. Suppress 24x subfield i.
Version 2.003 (1999-Nov-11)
The latest version of this script should be found at: http://www.library.adelaide.edu.au/~sthomas/scripts/
AUTHOR
Steve Thomas <sthomas@library.adelaide.edu.au>
LICENCE
Copyright (C) 1998,1999 Steve Thomas
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.