NAVIGATION

Creating
Metadata

Parsing
Metadata

Distributing
Metadata

                       

Introduction

Software

Helpful
links

                       

HOME

Introducing mp for the PC
Excerpts by Peter N. Schweitzer [pschweitzer@usgs.gov]

updated on 20011008


Because mp is a command line application, it has a reputation of being difficult to understand and hard to use.  Why?  Because for PC users, the command line interface means DOS.  That's right, dreaded DOS.  But don't worry, mp is quite easy to use.

NOTE: This lesson was created using MS Windows NT 4.0. Visit the software section to find information about using mp on different platforms.

This lesson will cover the following topics:


 

Step 1:  Download mp (573kb)


(Internet Explorer File Download dialog box)

 

  • Extraxt the software in your Temp directory of the C-Drive.  For this example, mp.exe is saved to the c:\Temp:


(Internet Explorer Save As dialog box)

[RETURN TO TOP]



 

  • Step 2: Execute mp from the Command Line
    Once you've downloaded and installed mp to your hard drive, you can execute the application from the Command Line.

    • Executing mp from the Windows Explorer via a double-click will not work.  You must execute mp within the command line window (i.e. DOS):

     

    • Because we saved the application to the root of C-drive, one only needs to type mp at the c-prompt (c:\>)


    (Command Prompt)

    • Executing mp is easy.  For example, mp was saved on C:\temp, execute the application by typing "C:" at the prompt to change drives.  From C:\> type "cd temp" to move to the temp directory.  From there mp can be executed.

 

[RETURN TO TOP]


 

  • Step 3: Usage

    • Basic usage:
      Basic usage of mp from the prompt is:

                         
      mp [options] input_file 

    • Explanation of Input:
      The  input_file is the name of a text file containing metadata and [options] refer to command-line operators that provide for selected output formats and properties:

      Note:
      mp does not accept  word-processor documents (*.doc, *.wpd, *.rtf, *.pdf, etc...) as the input file.  It will only read ASCII text, SGML, and XML file formats.


    (Command Prompt for use with mp)

     

    • The options, listed below, provide for 7 file output formats.  Each format can be utilized in different ways depending on your distribution method

      -e efile lists any syntax errors in the metadata to an error file (ex: error.txt)
      -c cfile obtains configuration information from a configuration file (ex: config.txt)
      -t tfile   
      creates text output of the metadata (ex: input_file.txt)
      -h hfile   
      creates html output of the metadata (ex: input_file.html)
      -f ffile   
      creates FAQ-style html output of the metadata (ex: input_file_faq.html)
      -s sfile   
      creates sgml output of the metadata (ex: input_file.sgml)
      -d dfile   
      creates DIF output of the metadata (ex: input_file.dif)
      -x xfile creates XML output of the metadata (ex: input_file.xml)

    • Explanation of the Output:

      • Errors:
        Syntax errors indicate discrepancies between the input file and the standard. MP provides the line number(s) and the element(s) in the input file that contain the errors.  Choosing -e efile is the easiest way to obtain a list of all errors identified by mp.  

      • Text:
        Text output, if requested, follows the encoding format. This provides a check of the compiler; any such program should be able to reproduce its input without significant loss of information.

      • HTML:
        HTML output, if requested, uses descriptive lists to arrange the elements hierarchically. The HEAD element of the metadata contains META elements corresponding to the Dublin Core.

      • FAQ-style HTML:
        FAQ-style output, if requested, uses the general arrangement of information found in plain language and re-expresses the metadata in a manner that is easier to read. This format is not parseable in subsequent software processing. To see how mp writes standard metadata elements in this output format, consult

        Dublin core elements are added to the HEAD element as META tags.

      • SGML:
        SGML output uses the eight-character tags proposed by the FGDC Clearinghouse Working Group. The SGML output is designed to work with a Document Type Definition (DTD).

      • XML:
        XML output uses the eight-character tags given in the 1998 version of the CSDGM. The XML output is designed to work with a Document Type Definition (DTD).

      • Directory Interchange Format (DIF):
        DIF output will require editing to fix inconsistencies between the DIF and FGDC metadata standards, and to add information required by DIF that is not clearly identified in the FGDC scheme, such as Entry_ID.

        NOTE: The configuration file will be discussed in later lessons.

 

[RETURN TO TOP]

or

Lesson 2: Parsing your Record

L A G I C
Louisiana Geographic Information Center