Loading an Abstract Schema from a URI into an ASModel

  1. Check to see if the implementation supports the "LS-AS" feature, version "3.0".

  2. Construct a DOMBuilder object

  3. Cast the DOMBuilder to ASDOMBuilder

  4. 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) {
  //...
}

Previous | Next | Top | Cafe con Leche

Copyright 2000-2002 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified February 3, 2002