Sun Adapter for TCP/IP HL7 User's Guide

Using the Schematron API

Perform the following to invoke the schematron API from a Java Collaboration:

Obtaining the Factory Object

Below is a sample call to the getSchematronValidatorFactory method.


com.stc.connector.hl7.schematron.SchematronValidatorFactory
  factory = com.stc.connector.hl7.schematron.SchematronValidatorFactory.
  getSchematronValidatorFactory();

Obtaining the Validator Object

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.