Check to see if the implementation supports the "LS-AS" feature, version "3.0".
Construct a DOMBuilder
object
Cast the DOMBuilder
to ASDOMBuilder
Call the parseASURI()
method to read the schema
try {
if (impl.hasFeature("LS-AS", "3.0")) {
DOMImplementationFactoryLS impl =
(DOMImplementationLS) DOMImplementationFactory.getDOMImplementation();
DOMBuilder parser = impl.getDOMBuilder();
ASDOMBuilder schemaParser = (ASDOMBuilder) parser;
ASModel schema = schemaParser.parseASURI(
"http://www.openhealth.org/RDDL/rddl-integration.rxg",
"RELAX");
// Use the schema...
}
}
catch (DOMException e) {
//...
}