Search in sources :

Example 1 with SchemaGrammar

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);
            }
        }
    }
}
Also used : SchemaGrammar(org.apache.xerces.impl.xs.SchemaGrammar) Grammar(org.apache.xerces.xni.grammars.Grammar) SchemaGrammar(org.apache.xerces.impl.xs.SchemaGrammar) XSGrammar(org.apache.xerces.xni.grammars.XSGrammar)

Aggregations

SchemaGrammar (org.apache.xerces.impl.xs.SchemaGrammar)1 Grammar (org.apache.xerces.xni.grammars.Grammar)1 XSGrammar (org.apache.xerces.xni.grammars.XSGrammar)1