public Grammar parseGrammar(String type,XMLInputSource is) throws XNIException, IOException {
  if (type.equals(XMLGrammarDescription.XML_SCHEMA)) {
    return parseXMLSchema(is);
  }
 else   if (type.equals(XMLGrammarDescription.XML_DTD)) {
    return parseDTD(is);
  }
  return null;
}

public Grammar parseGrammar ( String type , XMLInputSource is ) throws XNIException , IOException { if ( type . equals ( XMLGrammarDescription . XML_SCHEMA ) ) { return parseXMLSchema ( is ) ; } else if ( type . equals ( XMLGrammarDescription . XML_DTD ) ) { return parseDTD ( is ) ; } return null ; }
parse a grammar from a location identified by an xmlinputsource . this method also adds this grammar to the xmlgrammarpool
