if (schemaWithDecl == null) {
// cannot get to this schema from the one containing the requesting decl
reportSchemaError("src-resolve.4", new Object[]{currSchema, declToTraverse.uri});
return null;
}
SchemaGrammar sGrammar = fGrammarResolver.getGrammar(schemaWithDecl.fTargetNamespace);
Object retObj = null;
switch (declType) {
case ATTRIBUTE_TYPE :
retObj = sGrammar.getGlobalAttributeDecl(declToTraverse.localpart);
break;
case ATTRIBUTEGROUP_TYPE :
retObj = sGrammar.getGlobalAttributeGroupDecl(declToTraverse.localpart);
break;
case ELEMENT_TYPE :
retObj = sGrammar.getGlobalElementDecl(declToTraverse.localpart);
break;
case GROUP_TYPE :
retObj = sGrammar.getGlobalGroupDecl(declToTraverse.localpart);
break;
case IDENTITYCONSTRAINT_TYPE :
retObj = sGrammar.getIDConstraintDecl(declToTraverse.localpart);
break;
case NOTATION_TYPE :
retObj = sGrammar.getNotationDecl(declToTraverse.localpart);
break;
case TYPEDECL_TYPE :
retObj = sGrammar.getGlobalTypeDecl(declToTraverse.localpart);
break;
}
if (retObj != null)
return retObj;