Skip to content
Philip Helger edited this page Nov 24, 2020 · 11 revisions

Welcome to the ph-schematron wiki

ph-schematron is a Java library that validates XML documents via ISO Schematron.

Schematron is an XML based validation language to validate XML documents.

Schematron is part of the ISO 19757 standard "Information technology — Document Schema Definition Languages (DSDL)", Part 3 "Rule-based validation — Schematron". Until version 2016 the standard was free, since the 2020 version the standard need to be paid.

This Wiki should provide you with all the information you need for version 6 and later releases. See the menu on the right side for your sub-navigation.

Project modules

The project module structure was heavily reworked for version 6 to be more modular and flexible.

ph-schematron-api

This module contains the basic shared components used by the different implementation modules (see below). This module is always required.

It transitively contains ph-commons, ph-xml, ph-jaxb, SLF4J and Saxon HE.

ph-schematron-xslt

The dependency for ph-schematron-xslt looks like this, replacing x.y.z with the latest version number:

<dependency>
  <groupId>com.helger.schematron</groupId>
  <artifactId>ph-schematron-xslt</artifactId>
  <version>x.y.z</version>
</dependency>

ph-schematron-pure

Alternatively ph-schematron-pure offers a Java-native implementation for the Schematron XPath binding which offers superior performance over the XSLT approach but can only be used, if the Schematron rules consist purely of XPath expressions and don't contain any XSLT.

The dependency for ph-schematron-pure looks like this, replacing x.y.z with the latest version number:

<dependency>
  <groupId>com.helger.schematron</groupId>
  <artifactId>ph-schematron-pure</artifactId>
  <version>x.y.z</version>
</dependency>

Note: up to and including v5.x the Maven groupId was com.helger.

ph-schematron-validator

It is a validator for Schematron definitions based on RelaxNG definition.

Add the following to your pom.xml to use this artifact, replacing x.y.z with the latest version number:

<dependency>
  <groupId>com.helger.schematron</groupId>
  <artifactId>ph-schematron-validator</artifactId>
  <version>x.y.z</version>
</dependency>
Clone this wiki locally