TF JATS Validation Tool Command Line Options
The TF JATS Validation Tool can be run from the command line using the options described below. The command-line options give flexibility to specify how validation results are output, and can be used to integrate the validation tool into a workflow tracking system, or to run the validation tool from applications that can be configured to use external programs. To run the validation tool using command line options download the validation tool release pack from the download page.
Command Line Options
The validation tool has several options that can be provided as input on the command line or in a settings file. A path to the file or folder to validate must be specified with -f, and the validation mode must be specified with -m. All other parameters are optional. Validation results will either be displayed on screen, or saved to the folder or file specified in -o. If HTML format is specified (-r html) your computer's default web browser may be launched in order to display the validation results.
For example, to run the validation tool on a final file and output results to an XML file run (at the command line from the validation folder):
java -jar program\TFJATSValidationTool.jar -m final -f ..\samples\BHER_I_18_06_J.zip -q -r xml -o report.xml
The command-line options are:
| -m <mode> | Mode for validation (required). Should be either:
|
| -f <path> | Path to the file/folder to validate (required). Should be either:
|
| -b | Batch validate all files/folders in the folder specified in -f |
| -q | Quiet, don't include passed or skipped checks in report |
| -r <format> | Report format. Should be either:
|
| -o <path> | Path (file or folder) to save validation results. |
| -id <arg> | File identifier to include in report. This can be used to have the report include an identifier assigned by a tracking system. |
| -s <path> | Load settings from file |
| -gui | Open the Graphical User Interface.² |
¹ When an individual XML file is validated it is checked for basic validity using the DTD, XSD and Schematron, but some validation checks are not performed.
² The graphical user interface will open if the -gui parameter is specified or if TFJATSValidationTool.jar is run with no parameters.
Scripts
The release pack includes several .bat scripts that can be used to run the validation tool. Double-click ValidationTool.bat to open the graphical user interface. The other .bat scripts are used by providing a TF JATS .zip file or folder as input. For example, drag and drop the folder BHER_I_18_06 or the .zip file BHER_I_18_06_J.zip onto Validate-Final.bat, and then validation results will be displayed on screen. Alternatively, on a command line provide the path to a TF JATS file or folder to the .bat script; for example:
Validate-Final.bat ..\samples\BHER_I_18_06_J.zip
The following should be used for current work:
- Validate-Final.bat - Use to validate final files and ahead-of-issue article files.
- Validate-Tagging.bat - Use to validate just-accepted article files.
One of the following should be used for files created in retrodigitization projects:
- Validate-Retro.bat - Use to validate a retrodigitized issue file.
- Validate-Retro-Batch-Display.bat - Use to validate retrodigitized issue files in a folder and display results.
- Validate-Retro-Batch-Save.bat - Use to validate retrodigitized issue files in a folder and save results to files.