Search in sources :

Example 41 with SchematronOutputType

use of org.oclc.purl.dsdl.svrl.SchematronOutputType in project ph-schematron by phax.

the class SVRLMarshallerTest method testCreate.

@Test
public void testCreate() throws Exception {
    final ISchematronResource aSV = SchematronResourceSCH.fromClassPath(VALID_SCHEMATRON);
    assertNotNull("Failed to parse Schematron", aSV);
    final Document aDoc = aSV.applySchematronValidation(new ClassPathResource(VALID_XMLINSTANCE));
    assertNotNull("Failed to parse demo XML", aDoc);
    final SchematronOutputType aSO = new SVRLMarshaller().read(aDoc);
    assertNotNull("Failed to parse Schematron output", aSO);
}
Also used : SchematronOutputType(org.oclc.purl.dsdl.svrl.SchematronOutputType) ISchematronResource(com.helger.schematron.ISchematronResource) Document(org.w3c.dom.Document) ClassPathResource(com.helger.commons.io.resource.ClassPathResource) Test(org.junit.Test)

Aggregations

SchematronOutputType (org.oclc.purl.dsdl.svrl.SchematronOutputType)41 Test (org.junit.Test)20 SVRLMarshaller (com.helger.schematron.svrl.SVRLMarshaller)18 FileSystemResource (com.helger.commons.io.resource.FileSystemResource)17 SchematronResourcePure (com.helger.schematron.pure.SchematronResourcePure)15 ClassPathResource (com.helger.commons.io.resource.ClassPathResource)14 IReadableResource (com.helger.commons.io.resource.IReadableResource)11 Document (org.w3c.dom.Document)8 AbstractSchematronResource (com.helger.schematron.AbstractSchematronResource)6 LoggingPSErrorHandler (com.helger.schematron.pure.errorhandler.LoggingPSErrorHandler)6 ISchematronResource (com.helger.schematron.ISchematronResource)5 SchematronResourceSCH (com.helger.schematron.xslt.SchematronResourceSCH)5 MapBasedXPathFunctionResolver (com.helger.xml.xpath.MapBasedXPathFunctionResolver)5 SVRLFailedAssert (com.helger.schematron.svrl.SVRLFailedAssert)4 File (java.io.File)4 XQueryAsXPathFunctionConverter (com.helger.schematron.xpath.XQueryAsXPathFunctionConverter)3 Nonnull (javax.annotation.Nonnull)3 Nullable (javax.annotation.Nullable)3 CollectingPSErrorHandler (com.helger.schematron.pure.errorhandler.CollectingPSErrorHandler)2 PSReader (com.helger.schematron.pure.exchange.PSReader)2