Validate ISO 19115 records

Running a validation check

To validate a record from the record edit page, click the Validate button at the top of the page in the menu bar, or the Run validation check button that looks like a “refresh” symbol in the upper right corner of the Validation box on the right side of the screen.

edit menu bar validate

OR

validation circled

Wait for document to validate and check for errors. If everything is green and only a green “thumbs up” icon displays, the document is valid. If any portion of the results are red and a red “thumbs down” icon displays next to the green “thumbs up” icon, look in the Validation box to see what type of errors are returned.

validation box valid

There are three types of validations run on the records:

Schema validation

Schemas define the rules for the structure and content of an XML documents. They describe the data model and define the objects, attributes, and relationships. Schema validation uses XML schema documents with .xsd extensions. Many times the locations of these documents are given in namespaces declarations. The declarations contained in any imported records or created in the NAL GeoData interface are analyzed and content is compared respectively to ensure validation to any declared standards.

Schematron validation for ISO 19115(19139)

Schematron is a rule-based validation language for making assertions about the presence or absence of elements or patterns in XML documents. These are used in conjunction with the schemas. Schematron can handle validation that schemas cannot (such as comparing two elements) and can deliver better error messages. Ex: The East Bounding Coordinate is west of the West Bounding Coordinate. Schematron can also deliver more “human friendly” error messages. Schematron also allows the user to customize validation to enforce more constraints. This would allow an organization to make certain that particular elements were mandatory or had set domains, etc. This section of the validation uses the Schematron validation for ISO 19115 to ensure the record’s validity.

Schematron validation / GeoNetwork recommendations

This section of the validation process uses Schematron to validate against GeoNetwork recommendations. NAL GeoData is based on the GeoNetwork platform, and therefore those validation rules apply to the contained records.

Identify and fix errors in records

After running a validation check on the metadata record, click on the “thumbs up” or “thumbs down” icon (the show / hide success button) for more details about what validation errors needs attention.

validation box errors show

If any errors are present, hover over the list text to display a tool tip of what element is problematic. Errors can be fixed in any of the 3 views. The method users choose depends on the type of error reported. After making a change, click the Save metadata button and refresh the validation to determine if the error is resolved. (Be sure to Save and close before exiting to preserve all changes once you leave the record)

validation box show errors

Some common errors and their fixes are listed below. Errors that list replacement XML strings must be fixed in XML view. However, these are not the only errors that may occur. Many errors result from mandatory or conditional fields left blank. Review the validation results to determine which errors need fixed in each record.

Base unit error

Error

Invalid content was found starting with element ‘gml:BaseUnit’. One of ‘{“http://www.opengis.net/gml”:UnitDefinition}’ is expected. (Element: gml:BaseUnit with parent element: gmd:valueUnit)

Solution

Replace:

<gmd:valueUnit>
   <gml:BaseUnit xmlns:gml="http://www.opengis.net/gml/3.2" gml:id="meters">
      <gml:identifier codeSpace="meters ">meters</gml:identifier>
      <gml:unitsSystem/>
   </gml:BaseUnit>
</gmd:valueUnit>

With this:

<gmd:valueUnit xlink:href="http://www.opengis.net/def/uom/SI/metre"></gmd:valueUnit>

Time period error

Error

Invalid content was found starting with element ‘gml:TimePeriod’. One of ‘{“http://www.opengis.net/gml”:AbstractTimePrimitive}’ is expected. (Element: gml:TimePeriod with parent element: gmd:extent)

Solution

Replace:

<gmd:temporalElement>
   <gmd:EX_TemporalExtent id="boundingTemporalExtent">
      <gmd:extent>
         <gml:TimePeriod gml:id="boundingTemporalExtentA">
            <gml:description>publication date</gml:description>
            <gml:beginPosition>2015-05</gml:beginPosition>
            <gml:endPosition>2015-05</gml:endPosition>
         </gml:TimePeriod>
      </gmd:extent>
   </gmd:EX_TemporalExtent>
</gmd:temporalElement>

With this:

<gmd:temporalElement>
   <gmd:EX_TemporalExtent id="boundingTemporalExtent">
      <gmd:extent>
         <gml:TimePeriod gml:id="boundingTemporalExtentA">
            <gml:description>publication date</gml:description>
            <gml:beginPosition>2015-05</gml:beginPosition>
            <gml:endPosition indeterminatePosition="unknown"/>
         </gml:TimePeriod>
      </gmd:extent>
   </gmd:EX_TemporalExtent>
</gmd:temporalElement>

Contact error

Errors

Invalid content was found starting with element ‘gmd:contact’. One of ‘{“http://www.isotc211.org/2005/gmd”:CI_ResponsibleParty}’ is expected. (Element: gmd:contact with parent element: gmd:contact)

OR

[ISOFTDS19139:2005-TableA1-Row24] - A name is required for contact. You must specify one or more of individualName, organisationName or positionName. Suggestions: Check contact information for metadata contact or cited responsable party in identification section for example.

Solution

Check to make sure either Name or Organization is filled in for every gmd:contact element. Remove any fully blank contact entries.

Process step error

Error:

[ISOFTDS19139:2005-TableA1-Row10] - Content mandatory for dataset or series Statement is mandatory if no source or process step defined for dataset or a serie. If(count(source) + count(processStep) =0) and (DQ_DataQuality.scope.level = ‘dataset’ or ‘series’) then statement is mandatory.

Solution

Add a process step or add a series number.

Lineage source role error

Error

[ISOFTDS19139:2005-TableA1-Row11 Row12] - Lineage ‘source’ role is mandatory if LI_Lineage.statement and ‘processStep’ role are not documented. Suggestions: Define lineage statement or process step role.

Solution

Add a lineage step if processStep is not filled in.

Lineage process step role error

Error

[ISOFTDS19139:2005-TableA1-Row11 Row12] - Lineage ‘processStep’ role is mandatory if LI_Lineage.statement and ‘source’ role are not documented. Suggestions: Define lineage statement or source role.

Solution

Add a process step if source (lineage) is not filled in.

Geometric object count error

Error

<gmd:geometricObjectCount>
   <gco:Integer>329</gco:Integer>
   <gco:Integer>866</gco:Integer>
   <gco:Integer>330</gco:Integer>
</gmd:geometricObjectCount>

Solution

Delete the second two integer values – the schema only allows one gco:Integer value.

Topic category error

Error

[ISOFTDS19139:2005-TableA1-Row05] - Dataset or series must have a topic category Topic category is mandatory if MD_Metadata.hierarchyLevel equal ‘dataset’ or ‘series’ or doesn’t exist.

Solution

Insert gmd:topicCategory between gmd:characterSet and gmd:environmentDescription like so:

<gmd:characterSet>
   ...
   ...
   ...
</gmd:characterSet>
<gmd:topicCategory>
   <gmd:MD_TopicCategoryCode>boundaries</gmd:MD_TopicCategoryCode>
</gmd:topicCategory>
<gmd:environmentDescription>
   ...
   ...
   ...
</gmd:environmentDescription>

GeoServer web map service error

Error

[ISOFTDS19139:2005-TableA1] - HierarchyLevelName must be documented if hierarchyLevel does not contain “dataset” hierarchyLevelName must be documented if hierarchyLevel does not contain ‘dataset’

Solution

Fixed this by adding:

<gmd:hierarchyLevelName>
   <gco:CharacterString xmlns:gco="http://www.isotc211.org/2005/gco">nilReason</gco:CharacterString>
</gmd:hierarchyLevelName>

to the same level as gmd:hierarchyLevel, right after that element.

This error list will be updated as more common errors are discovered.

Contact

For questions about the NAL GeoData network, including technical questions or depositing data, contact NAL-GeoData@ars.usda.gov for more information.

For reference or research questions regarding the material found in NAL GeoData or any other geospatial topic, contact agrefquestion@libraryresearch.info.