MARC Toolkit for Libraries (formerly MARC Template Library) SourceForge Logo

Introduction | Documentation | FAQ | Downloads | Licence | Contact

Library of Congress - MARC
James (MARC Java Events)
Mercury Z39.50 Client

The MARC Template Library is currently is the proccess of being renamed (to MARC Toolkit for Libraries) and completely rewitten. Expect to see lots more here soon. 4 October 2006.

The MARC Toolkit for Libraries will be a collection of source code libraries and software for MARC records. Planned improvements will be completely rewritten C++ library, PHP source code, MARC editor written in C++ using wxWidgets, and MySQL User Defined Functions for working with MARC records stored in MySQL tables.

MARC Template Library - Version 0.6.2

Last Updated - 14th June 2002.

The MARC Template Library is a C++ API (using C++ templates and STL) for reading, writing and processing MARC records. I (Mark Basedow) am using this project to impove my knowledge of the C++ Standard Template Library.

The MTL has currently been compiled and tested with Microsoft Visual C++ Version 6 (sp5), Borland Free Command Line Tools 5.5, and the Mingw compiler (using Bloodshed Dev-C++ 4) on Windows 98 SE. It should work on other platforms with a few changes to the make files.

Version 0.6.1 has only been compilied on Microsoft Visual C++ 6.0 (sp5). It should work with other compilers with little or no changes.
Version 0.6.2 - 14 June 2002
  • Fixed the MARC8XMLEntity class. Improved character conversion.
  • Started work on MARC8Unicode and MARC8ASCII classes.
  • Various other improvements.
  • RemoveField() and AddField(MARCField * mf) methods added to MARCRecord template.

Version 0.6.1 - 12 June 2002

  • Fixed the MARCRecord template which was broken by changes made in Version 0.6.
  • A number of serious bugs fixed in MARCField, MARCDataField and MARCControlField.
  • A simple graphical user interface for marctoxml program using MFC (for WIN32 only).
  • Fixed bug in MARCRecordEvent that would cause unpredicatable behaviour if it tried to read incomplete data.
  • MARCRecords GetTitleString(bool bDiscardNonFilingChars = false, char * szTag = "245") now has the option to discard nonfiling characters. Useful for sorting records.

Version 0.6 - 10 June 2002

  • Start of Complete Rewrite.
  • StaticMARCRecord template removed.
  • MARCRecordEvent and MARCRecord(formerly Dynamic_MARCRecord) improved.
  • MARCStreamEvent template added (inherits from MARCRecordEvent) which provides a similar API as the James MARC.

Version 0.5 - May - Not released

  • Class static_marc_iterator added. Currently used to provide an iterator interface to the StaticMARCRecord template. Very crude but it works.
  • Stream insertion and extraction operators added to StaticMARCRecord template.

Version 0.4.5 - 5 April 2002

  • FastStringCatBuffer has been renamed FastStringBuffer. Many significant performance related improvements have been made to this class.
  • Many functions that returned strings now return MARC_String or MARC_WString which is not a real string class but a struct with a pointer to the string and the length of the string. The string is unlikely to be null terminated so you will may need to call the CreateString member function or do your own processing of the string data.
Version 0.4 - 28 March 2002

I have simplified much of MTL. I have removed a few classes.

  • The virtual abstract base class MARCRecord has been removed.
  • After experimenting with adding Z39.50 support I have decided against it.
  • MARCDataSource has been simplified and renamed MARCBuffer.
Version 0.3
  • Rewrote a few classes to use static rather than dynamic polymorphism (ie. more templates) and restructured things a bit.
  • Fixed a number of very serious bugs in StaticMARCField and MARCDataSource.
  • Numerous small improvements.
  • Started work on better sample programs.


  • Little support for character encodings.
  • Inadequate error handling.

To Do

  • Add support for other character encodings.
  • Add some better error handling. Exceptions
  • Add support to load MARC records using FTP and HTTP.
  • Write more documentation.