XSDSchema resolvedSchema = (XSDSchema)resolvedSchemas.next();
XSDSchema resolvedSchema = (XSDSchema)i.next();
  protected XSDNamedComponent resolveNamedComponent(EReference namedComponentsRefReference, String namespace, String localName)  {    for (Iterator resolvedSchemas = resolveSchema(namespace).iterator(); resolvedSchemas.hasNext(); )    {      XSDSchema resolvedSchema = (XSDSchema)resolvedSchemas.next();      XSDNamedComponent xsdNamedComponent =         XSDNamedComponentImpl.findInSortedList          ((List)resolvedSchema.eGet(namedComponentsRefReference), namespace, localName);      if (xsdNamedComponent == null && namespace == null && resolvedSchema == this && getTargetNamespace() != null)      {         xsdNamedComponent =            XSDNamedComponentImpl.findInSortedList             ((List)resolvedSchema.eGet(namedComponentsRefReference), getTargetNamespace(), localName);              }      if (xsdNamedComponent != null)      {        return xsdNamedComponent;      }    }    return null;  }