nsresult rv;
nsresult rv = NS_OK;
FindRepeatContext(nsIDOMElement *aElement, PRBool aFindContainer){  nsIDOMNode *result = nsnull;    // XXX Possibly use mRepeatState functionality from nsXFormsDelegateStub to  // save running up the tree?  nsCOMPtr<nsIDOMNode> context, temp;  aElement->GetParentNode(getter_AddRefs(context));  nsresult rv;  while (context) {    if (nsXFormsUtils::IsXFormsElement(context,                                       aFindContainer ?                                         NS_LITERAL_STRING("contextcontainer") :                                         NS_LITERAL_STRING("repeat"))) {      break;    }    temp.swap(context);    rv = temp->GetParentNode(getter_AddRefs(context));  }  if (context && NS_SUCCEEDED(rv)) {      NS_ADDREF(result = context);  }  return result;}