Schematron Validation

lundi 2 mars 2015

Hi,



I need to implement the schematron validation in Mirth depending on the CCD type I get on a Channel. I am using PHLOC Jar (phloc-commons-4.3.3.jar, phloc-schematron-2.7.1.jar) for schematron and a custom jar that creates an object for CCD and SCH file for validation. Below is the method that I am calling:



public boolean isValidSchematronFromFile(String path)

{

schematron = SchematronResourceSCH.fromFile(path, (ErrorListener)null, (URIResolver)null, new SchematronXSLTValidatorFailedAssertOnly());

return schematron.isValidSchematron();

}



and calling the above method from Mirth using below line



logger.info(validator.isValidSchematronFromFile("D ://ccd//schematron//CCD.sch"));



// Giving error: The Schematron resource 'D:\ccd\schematron\ccd.sch' is invalid!



Using Mirth version 3.0.3.7171



Let me know your thoughts on this.





Schematron Validation

0 commentaires:

Enregistrer un commentaire