schemaToRedefine.patch();
schemaToRedefine.setSchemaLocation(schemaToRedefine.pendingSchemaLocation);
  protected void patch()  {    if (getSchemaLocation() != null && getSchemaLocation().length() > 0)    {      XSDSchemaImpl containingSchema = (XSDSchemaImpl)getContainer();      String oldPendingSchemaLocation = containingSchema.pendingSchemaLocation;      if (containingSchema.getSchemaLocation() != null)      {        containingSchema.pendingSchemaLocation = containingSchema.getSchemaLocation();      }      resolve("", getSchemaLocation());      containingSchema.pendingSchemaLocation = oldPendingSchemaLocation;      super.patch();      if (oldPendingSchemaLocation == null)      {        List redefinitions = containingSchema.getSchemasToRedefine();        containingSchema.schemasToRedefine = null;        for (Iterator i = redefinitions.iterator(); i.hasNext(); )        {          XSDSchemaImpl schemaToRedefine = (XSDSchemaImpl)i.next();          if (schemaToRedefine != containingSchema)          {            schemaToRedefine.forceResolve = true;            schemaToRedefine.patch();            schemaToRedefine.forceResolve = false;            schemaToRedefine.pendingSchemaLocation = null;          }        }      }    }    else    {      super.patch();    }  }