# Presentation: 698648

## Metadata Validation

## Serving Spatial Metadata

- FGDC
- metadata
- preparation
- (mp)

- FGDC
- style
- metadata

**SGML**

**HTML**

**TEXT**

**Isite**
**Z39.50**
**Software**

- configure

- Index
- (Iindex)

- test
- index

- Serve
- (zserver)

- test
- server

- Administrivia

- register
- your
- server

- Link to
- Clearing-
- house
- Interface

## Metadata Validation 

- Clearinghouse Requirements
- All metadata must be validated with 0 errors
- Triplicate files are required for each metadata entry (Isite software)
-  Roads.XML  (or Roads.SGML)
-  Roads.HTML
-  Roads.TEXT
- Public domain software has been developed
- mp -  Metadata Parser

## mp

- Metadata Parser (mp) Features
- 1. Compiler that parses the metadata, checks the formal syntax,  and creates output files
- 2. Can output the triplicate files required by the Clearinghouse - TEXT, HTML, SGML, and XML files
- Available for DG, MS-DOS, HP, Linux and SunOS
- Developed by Peter Schweitzer (USGS)
*http://geochange.er.usgs.gov/pub/tools/metadata/index.shtml*

## Metadata Validation

- FGDC Metadata:
- Option 1:  Develop metadata in metadata collection software and export file to run through mp software
- Option 2:  Some software have mp built inside the metadata collection software
- ISO Metadata:
-  Future validation will be completed through the XML DTD and XSD.
- XML Parsers internal to ISO software or run externally

## FGDC Metadata ValidationOption 1

- FGDC Metadata ValidationOption 1

- Make corrections to the
- original metadata file
- or metadata software.

- Run the metadata file through mp.

- Place the three output files
- on the Clearinghouse Node

- Run the metadata file through mp to generate the three required files.
**            ****TEXT SGML HTML**

- Are there
- errors in
- error.txt?

- NO

**Metadata **
**creation **
**tool**

- YES

- Export

## mp  Usage

**mp.exe [-c cfile] [-e efile] [-t tfile] [-h hfile]****	****	****	****       [-s sfile]  [-d dfile] input_file**
**	****	**
**	****	****Input Files:****	****	****cfile is the configuration file**
**	****	****	****	****	****input_file is metadata record****	****Error File:****	****	****efile will contain syntax errors**
**	****	****Output Files:****	****tfile will contain text output**
**	****	****	****	****	****hfile will contain html output**
**	****	****	****	****	****sfile will contain sgml output**
**	****	****	****	****	****dfile will contain DIF output**
***Validation Example:***** **
**mp   -e admn.err   admn.txt ****	****	**
***Triplicate File Creation Example:***** **
**mp   -t admn.text -h admn.html -s admn.sgml admn.txt ****	****	**

## Slide 8

## mp Error file  (admn.err) mp –e admn.err admn.txt

- mp 2.7.33 - Peter N. Schweitzer (U.S. Geological Survey)
- Error (line 82): improper value for Progress
- Error (line 85): North_Bounding_Coordinate is required in Bounding_Coordinates
- Warning (line 263): Geospatial_Data_Presentation_Form does not have a value
- Warning (line 489): City does not have a value
- 4 errors: 1 missing, 2 empty, 1 bad_value
- mp has found errors on line 82,85,263 and 489 of the metadata file (admn.txt)
- These errors needs to be fixed in your metadata software tool, re-create the metadata, and run mp to ensure the error has been eliminated.

## mp Triplicate File Creation mp   -t admn.text -h admn.html -s admn.sgml   admn.txt 

- After all errors have been eliminated using the mp software, a second set of syntax commands can be used to generate the triplicate files required for the clearinghouse
- TEXT, SGML, and HTML
- These files are then ready to be transferred to the clearinghouse for immediate public searching and retrieval.

## mp html file (admn.html)

## mp sgml file  (admn.sgml)

## mp text file (admn.txt)

## Metadata Validation

- Use the mp software to correct any errors in the metadata files.  These syntax parsers will allow you to create a fully FGDC compliant metadata file.
- Create metadata with preferred software package and create metadata
- Run the metadata record through the mp parser
*mp -e mp.err metadata.txt*
- Correct each error in the mp.err file.  Corrections should be made to the original metadata.  Re-run the corrected metadata through mp until there are no errors.
- You know have a fully compliant metadata record.  Use mp to create the triplicate files ( TEXT, SGML, and HTML) required by the Clearinghouse
*mp   -t name.text  -s name.sgml   -h name.html   metadata.cns*
- The triplicate files need to be placed on your clearinghouse node to be included in future searches