Search in sources :

Example 6 with AbstractSchematronResource

use of com.helger.schematron.AbstractSchematronResource in project ph-schematron by phax.

the class IssueXsltKeyTest method validateAndProduceSVRL.

public static void validateAndProduceSVRL(final File schematron, final File xml) throws Exception {
    final IReadableResource aSchematron = new FileSystemResource(schematron.getAbsoluteFile());
    final IReadableResource anXMLSource = new FileSystemResource(xml.getAbsoluteFile());
    final AbstractSchematronResource pure = new SchematronResourceSCH(aSchematron);
    final SchematronOutputType aSVRL = pure.applySchematronValidationToSVRL(anXMLSource);
    assertNotNull(aSVRL);
    if (false)
        System.out.println(new SVRLMarshaller().getAsString(aSVRL));
}
Also used : SchematronOutputType(org.oclc.purl.dsdl.svrl.SchematronOutputType) SchematronResourceSCH(com.helger.schematron.xslt.SchematronResourceSCH) IReadableResource(com.helger.commons.io.resource.IReadableResource) SVRLMarshaller(com.helger.schematron.svrl.SVRLMarshaller) FileSystemResource(com.helger.commons.io.resource.FileSystemResource) AbstractSchematronResource(com.helger.schematron.AbstractSchematronResource)

Aggregations

FileSystemResource (com.helger.commons.io.resource.FileSystemResource)6 IReadableResource (com.helger.commons.io.resource.IReadableResource)6 AbstractSchematronResource (com.helger.schematron.AbstractSchematronResource)6 SVRLMarshaller (com.helger.schematron.svrl.SVRLMarshaller)6 SchematronOutputType (org.oclc.purl.dsdl.svrl.SchematronOutputType)6 SchematronResourcePure (com.helger.schematron.pure.SchematronResourcePure)5 SchematronResourceSCH (com.helger.schematron.xslt.SchematronResourceSCH)2 LoggingPSErrorHandler (com.helger.schematron.pure.errorhandler.LoggingPSErrorHandler)1 SuppressFBWarnings (edu.umd.cs.findbugs.annotations.SuppressFBWarnings)1