Validates XML documents with XML Schema and Schematron
Find a file
2019-06-21 14:44:06 +02:00
.idea (chore) xml nicht formatieren 2019-06-04 08:23:55 +02:00
.settings Automagic changes :( 2019-06-20 14:07:52 +02:00
docs Add OWASP recommendation link 2019-06-21 14:44:06 +02:00
libs/de/kosit/validationtool/packaged-test-scenarios (wip) adding sample jar 2019-05-17 16:26:27 +02:00
src (chore) Nachnutzen der Artefakte aus dem Tests; Entfernen der Docker-Konfiguration 2019-06-04 08:23:01 +02:00
.gitignore .gitignore more IDE related stuff 2019-06-20 17:04:18 +02:00
.gitlab-ci.yml (chore) configure cache 2019-06-04 09:34:57 +02:00
CHANGELOG.md Formatted Changelog.md 2019-06-20 14:03:26 +02:00
LICENSE Initial commit 2017-10-26 09:35:40 +02:00
NOTICE Merge branch 'master' of https://projekte.kosit.org/kosit/validator 2019-05-16 11:55:20 +02:00
pom.xml Fixed broken pom. sry 2019-06-20 13:34:21 +02:00
README.md Merge branch 'master' into better-doc 2019-06-21 14:18:34 +02:00

Validator

The validator is an XML validation-engine. It validates XML documents against XML Schema and Schematrons depending on self defined scenarios which are used to fully configure the validation process. The validator always outputs a validation report in XML including all validation errors and data about the validation.

Releases

Two kind of releases are available:

Das Prüftool steht in zwei Varianten zur Verfügung:

  • als standalone/cli, die von der Kommandozeile aus aufgerufen werden kann
  • als Bibliothek/api, die in eigene Anwendungen integriert werden kann
  • die Standalone-Distribution enthält das Uber-Jar mit allen Klassen zur Verarbeitung von Eingaben aus der Kommandozeile, sowie für Ausgabeoptionen für Ergebnisse. Sämtliche Abhängigkeiten sind im Jar gebundlet und das Jar-File ist 'ausführbar'.
  • die Full-Distribution enthält darüber sämtlichen weiteren Varianten des validationtools sowie die benötigten Abhängigkeiten.

Build

Requirements

  • Maven > 3.0.0
  • Java > 8 update 111

Procedure

mvn install generates two different packages in the dist directory:

Validation Configurations

The validator is just an engine and does not know anything about XML Documents and has no own validation rules.

Validation rules and details are defined in validation scenarios which are used to fully configure the validation process.

All configurations are self-contained modules and deployed on their own.

Third Party Validation Configurations

Currently, there are two public third party validation configurations available.

  • Validation Configuration for XRechnung is available on
  • Validation Configuration for XGewerbeanzeige

Usage

Standalone Command-Line Interface

The general way using the CLI is:

java -jar  validationtool-<version>-standalone.jar  -s <scenario-config-file> [OPTIONS] [FILE] [FILE] [FILE] ...

You can more CLI options by

java -jar  validationtool-<version>-standalone.jar --help

A concrete example with a specific validator configuration can be found on [GitHub](https://github.com/itplr-kosit/validator-configuration-xrechnung

Daemon-Mode

You can also start the validator as an HTTP-Server. Just start it in Daemon-Mode with the -D option.

java -jar  validationtool-<version>-standalone.jar  -s <scenario-config-file> -D

Per default the HTTP-Server listens on localhost at Port 8080.

You can configure it with -H for IP Adress and -P for port number:

java -jar  validationtool-<version>-standalone.jar  -s <scenario-config-file> -D -H 192.168.1.x -P 8081

You can HTTP-POST to / and the response will return the report document as defined in your validator configuration.

Additionally there is the GET /health endpoint which can be used by monitoring systems.

Application User Interface

The validator can also be used in own Java Applications via the API. Details can be found here.