@ Nullable public static SchematronOutputType applySchematron ( @ Nonnull final ISchematronResource aSchematron , @ Nonnull final IReadableResource aXML ) { ValueEnforcer . notNull ( aSchematron , "SchematronResource" ) ; ValueEnforcer . notNull ( aXML , "XMLSource" ) ; try { // Apply Schematron on XML return aSchematron . applySchematronValidationToSVRL ( aXML ) ; } catch ( final Exception ex ) { throw new IllegalArgumentException ( "Failed to apply Schematron " + aSchematron . getID ( ) + " onto XML resource " + aXML . getResourceID ( ) , ex ) ; } }
Apply the passed schematron on the passed XML resource using a custom error handler .