use of org.apache.xerces.impl.xs.SchemaGrammar in project iaf by ibissource.
the class MyErrorHandler method registerNamespaces.
private static void registerNamespaces(Grammar grammar, Set<String> namespaces) {
namespaces.add(grammar.getGrammarDescription().getNamespace());
if (grammar instanceof SchemaGrammar) {
List<?> imported = ((SchemaGrammar) grammar).getImportedGrammars();
if (imported != null) {
for (Object g : imported) {
Grammar gr = (Grammar) g;
registerNamespaces(gr, namespaces);
}
}
}
}
Aggregations