Usage
<-- Installation
Configuration -->



Usage

ion-docval comes with three tools: ion-docval-server, ion-docval-client, and ion-docval-command-line.

ion-docval-server

This is the main tool that performs the validation. When running, it acts as a small webserver that serves a page where you can validate documents and as an API for continuous or bulk validation.

Given the defaults from the sample configuration file, it will listen on localhost port 35791. You can access it with any webbrowser by visiting the page:

http://localhost:35791/validate

That page contains a single form field, where you can select any .xml document type that matches one of the keywords in the current configuration.

For more information on the API, see the section ‘Server API’.

Example of the validation page

ion-docval-client

ion-docval-client can send requests to ion-docval-server for a more automated use of the validation service. It sends the given document to a running server, and prints out the result. This tool is intended to be incorporated in scripts or batch jobs, in those cases where ion-docval is not integrated as a library directly. It is recommended to use the client (or a different client script) together with the server if you want to validate many documents, or want to validate documents regularly.

ion-docval-client.py

This is a second implementation of the server client, but written in python. This client is slightly faster to execute (less startup time), and also serves as a second example of a client.

ion-docval-command-line

This is a standalone command-line version of the validator. It can validate a document against one or more validation files, specified on the command-line. This tool is intended for quickly checking validion files, or in the case where you only need to validate a single file once. Due to the slow start-up time of Java and potential slow loading of validation files, it is not recommended to use this tool to validate multiple documents.