public XSModel load(LSInput is) { try { Grammar g = loadGrammar(dom2xmlInputSource(is)); return ((XSGrammar) g).toXSModel(); } catch (Exception e) { reportDOMFatalError(e); return null; } }
/** * Parse an XML Schema document from a resource identified by a * <code>LSInput</code> . * @param is The <code>LSInput</code> from which the source * document is to be read. * @return An XSModel representing this schema. */ public XSModel load(LSInput is) { try { fGrammarPool.clear(); return ((XSGrammar) fSchemaLoader.loadGrammar(fSchemaLoader.dom2xmlInputSource(is))).toXSModel(); } catch (Exception e) { fSchemaLoader.reportDOMFatalError(e); return null; } }
public XSModel loadInputList(LSInputList is) { int length = is.getLength(); SchemaGrammar[] gs = new SchemaGrammar[length]; for (int i = 0; i < length; i++) { try { gs[i] = (SchemaGrammar) loadGrammar(dom2xmlInputSource(is.item(i))); } catch (Exception e) { reportDOMFatalError(e); return null; } } return new XSModelImpl(gs); }
/** * Parses the content of XML Schema documents specified as a list of * <code>LSInput</code>s. * @param is The list of <code>LSInput</code>s from which the XML * Schema documents are to be read. * @return An XSModel representing the schema documents. */ public XSModel loadInputList(LSInputList is) { final int length = is.getLength(); try { fGrammarPool.clear(); for (int i = 0; i < length; ++i) { fSchemaLoader.loadGrammar(fSchemaLoader.dom2xmlInputSource(is.item(i))); } return fGrammarPool.toXSModel(); } catch (Exception e) { fSchemaLoader.reportDOMFatalError(e); return null; } }