Installing and Configuring Validate Tool

From The SBN Wiki
Revision as of 10:53, 19 May 2017 by Raugh (talk | contribs) (Safety Save)
Jump to navigation Jump to search


The Validate Tool is the canonical validator for PDS4 products. It can be used to validate single product labels, collections, and bundles. Capabilities are still being developed and added, and will continue to be for the foreseeable future. Being able to run Validate Tool locally can reduce the turn-around time for submitting data to PDS for review and archiving by allowing data preparers to spot-check their labels throughout development, and to run the same canonical tool used by PDS to vet their submissions for standards compliance.

Validate Tool Functions

The primary functions provided by Validate Tool as of this writing are schematic validation (against both XSD and Schematron files), and referential integrity checking of collections and bundles (i.e., ensuring all member products are present and complete, and no non-member products are present). Capabilities still in development include the ability to validate data objects (like images and tables) against their label definitions.

Validate Tool can also, on request, perform a checksum verification as part of the validation process.


Our goal of this page is to start with the Validate Tool installation package and end up with the tool installed for general use on the target system. "General use" in this case means you can invoke the tool in any directory where you happen to be working with a command line that, in its simplest form, looks something like this:

     % validate product.xml -r report.txt

Part List

To run the Validate Tool locally, you'll need:

  • Java 6 (1.6) or later. Type java -version at your command line to what version of Java, if any, you have available. If you don't have Java installed, or want to work with a later version, you'll usually need administrator privileges on your computer to download and install a newer version from the Oracle web site Java 7 (1.7) and later includes a handy feature that will help with configuration later on, so if you're still running a (relatively) ancient version, you now have one more reason to upgrade.
  • A text editor that can handle simple text files for batch processing without filling them up with stupid control characters. On linux-based systems, things like vi, pico, or gedit will work; from the Windows DOS command line, you can use the edit command on older systems (pre-Windows 7), or Notepad (which can be invoked from the Windows command line as notepad) on newer ones.

General Procedure

Here's the general procedure for setting up the tool:

  1. Unpack the Validate Tool package.
  2. Move the directories you nee to run the tool to a permanent location.
  3. Edit the wrapper script for the local environment.
  4. Install the wrapper script.
  5. Test the installation.
  6. Rejoice in the knowledge of a job well done.


Unpack the Validate Tool Package

Use an standard ZIP tool (unzip on linux-based systems; the Extract All option in Windows Explorer) to extract the files from the ZIP package. For the tar file, use the z option to uncompress while you extract on a linux system. You should end up with a directory with a name that starts with validate- and ends with the internal version number of the tool. As of this writing, the latest version of the tool is 1.11.0, so the delivery package unpacks into a directory called validate-1.11.0. You can unpack it anywhere - we'll move the directory tree we need to a new home once we're picked one out. If you haven't inspected previous Validate Tool delivery packages, you should probably take a few minutes to familiarize yourself with the contents.

Here's what you'll find in the unpacked directory:


The executable elements of the package include:

You'll only need one of the two files from this directory, depending on your system type. We'll be modifying the appropriate script to work on your local system.
This directory contains the Java archive files comprising the Validate Tool code.


The doc/ subdirectory contains an HTML directory tree. Point your browser to the index.html file to see it in its intended format.


Like packing peanutes, these files are included in the ZIP but are not directly involved in program operation:

  • LICENSE.txt : Standard boilerplate license (JPL employees produced this code, and JPL is part of the California Institute of Technology)
  • README.txt : This file just directs you to the doc/index.html file.