Perform the following to invoke the schematron API from a Java Collaboration:
Obtaining the Factory Object
Obtaining the Validator Object
Performing the Validation
Below is a sample call to the getSchematronValidatorFactory method.
com.stc.connector.hl7.schematron.SchematronValidatorFactory factory = com.stc.connector.hl7.schematron.SchematronValidatorFactory. getSchematronValidatorFactory(); |
Below is a sample call to the getDefaultValidator method.
com.stc.connector.hl7.schematron.SchematronValidator validator = factory.getDefaultValidator( domSource ); |
In the above example, domSource is the DOMSource object of the schematron XML.