USGS - science for a changing world

Formal metadata: information and software

Formal metadata information and software

mp: A compiler for formal metadata

This program is a compiler to parse formal metadata, checking the syntax against the FGDC Content Standard for Digital Geospatial Metadata and generating output suitable for viewing with a web browser or text editor. It runs on Linux and UNIX systems and on PC's running all versions of Microsoft Windows (95 and up including XP). MP generates a textual report indicating errors in the metadata, primarily in the structure but also in the values of some of the scalar elements (that is, those whose values are restricted by the standard).

The compiler, its source code, executables for UNIX (Solaris and Linux) and Microsoft Windows, and its own formal metadata are available through <http://geology.usgs.gov/tools/metadata/>

A separate document shows the revision history of mp (that page is generated automatically by extracting the information from Process_Step elements found in mp's metadata).

Getting the software

Source:src.tar.gzGzipped tar file containing source code of all programs and documentation
Executables:mp-2.9.27.zipZip package for Microsoft Windows
Web version:Metadata validation serviceNo need to download; this may be all you need

Diagram showing mp's function

diagram showing input and output of mp and related software for processing metadata

Usage

Basic usage is
    mp [options] input_file
where input_file is the name of a text file containing metadata encoded as described in the encoding format document or in SGML conforming to a specific Document Type Definition (DTD). These command-line options are available:
-c cfileobtains configuration information from cfile
-e efiledirects syntax errors to efile
-t tfilecreates text output in tfile
-h hfilecreates html output in hfile
-f ffilecreates FAQ-style html output in ffile
-s sfilecreates sgml output in sfile
-d dfilecreates DIF output in dfile
-x xfilecreates XML output in xfile
-l codeindicates element names are in the language identified by code
Note that these symbols cfile, ffile and so forth represent the full names of files appropriate for your operating system, and may include directory path separators (on Windows this is the backslash \ and on Unix the slash /).

Syntax error messages indicate the nature of discrepancies between the input file and the standard, and the line numbers of the relevant elements in the input file. If -e efile is not specified, syntax errors are written to stderr, which is usually the console (for MS-DOS) or the terminal from which the compiler is launched.

Input

mp can read
Indented text
Since the FGDC Content Standard for Digital Geospatial Metadata, as the name implies, specifies only the contents of metadata files and not their encoding, it was necessary to devise a specification for metadata encoding in order to develop and use this compiler. That encoding format is purely textual and the fidelity of the compiler to this format is fanatical.
XML or SGML
The FGDC metadata standard was written before XML existed. At that time, SGML did exist but its use was not common outside some specific communities such as the publishing community (remember Ventura Publisher?). Since then, XML has become more widely accepted and supported, and mp was modified to read well-formed XML documents that use specified element names arranged in accord with the Document Type Definition.
Note: mp does not read word-processor documents, it only reads plain text, SGML, and XML!

Output

Aside from the error report, output is generated only in the formats you specifically request (meaning that no other output is generated by default). Use the command-line options to specify the output file names and formats that you want.

Examples

In these examples, the name of the input file is catfish.met.
    mp catfish.met -e catfish.err
A report of errors is written to the file catfish.err.
    mp catfish.met -e catfish.err -h catfish.html
In addition to the error report, an outline-style HTML page is created, named catfish.html.
    mp catfish.met -e catfish.err -h catfish.html -f catfish.faq.html
In addition to the error report and outline-style HTML page, a FAQ-style HTML page is created, named catfish.faq.html.
Because the command line can become long and complex, you can simplify the process by using a configuration file.

Notes on output formats

Language support

mp is able to interpret metadata element names written in several languages. To use this feature, include the -l option on the command line or the language option within the input section of the config file. In each case the language is specified using a 2-letter abbreviation from the following table:

enEnglish (default)
esSpanish
caCatalan
idIndonesian
frFrench
deGerman
ptPortuguese

Translations should be regarded as a work in progress. I seek help with them, especially with languages that are not currently implemented and with new profiles and extensions. A separate table shows the current translation of element names in the various languages supported. Feel free to discuss with me any ways you would like to help with this effort.

Technical contact:

    Peter N. Schweitzer
    Mail Stop 954, National Center
    U.S. Geological Survey
    Reston, VA 20192

    Tel: (703) 648-6533
    FAX: (703) 648-6252
    Email: pschweitzer@usgs.gov

Accessibility FOIA Privacy Policies and Notices

Take Pride in America logo USA.gov logo U.S. Department of the Interior | U.S. Geological Survey
URL: http://(none)/tools/metadata/tools/doc/mp.html
Page Contact Information: Peter Schweitzer
Page Last Modified: Friday, 24-Jan-2014 09:57:42 EST