if (level == mLevel + 1)
if (level == mLevel + 1) { PRUint32 index; repeat->GetStartingIndex(&index);
nsXFormsRepeatElement::ResetInnerRepeats(nsIDOMNode *aNode,                                         PRBool      aIsRefresh){#ifdef DEBUG_XF_REPEAT  printf("\taIsRefresh: %d\n",         aIsRefresh);#endif  nsCOMPtr<nsIDOMElement> element = do_QueryInterface(aNode);  if (!element)    return NS_ERROR_FAILURE;  nsCOMPtr<nsIDOMNodeList> nodeList;  nsresult rv;  rv = element->GetElementsByTagNameNS(NS_LITERAL_STRING(NS_NAMESPACE_XFORMS),                                       NS_LITERAL_STRING("repeat"),                                       getter_AddRefs(nodeList));  NS_ENSURE_SUCCESS(rv, rv);  PRUint32 childCount = 0;  nodeList->GetLength(&childCount);  nsCOMPtr<nsIDOMNode> node;  nsCOMPtr<nsIXFormsRepeatElement> repeat;  PRUint32 index = 1;  for (PRUint32 i = 0; i < childCount; ++i) {    nodeList->Item(i, getter_AddRefs(node));    repeat = do_QueryInterface(node);    NS_ENSURE_STATE(repeat);    PRUint32 level;    repeat->GetLevel(&level);    if (level == mLevel + 1)      repeat->SetIndex(&index, aIsRefresh);  }    return NS_OK;}