nsCOMPtr<nsIXFormsDelegate> outEl(do_QueryInterface(aSrc));
nsCOMPtr<nsIDelegateInternal> outEl(do_QueryInterface(aSrc));
nsXFormsMessageElement::CloneNode(nsIDOMNode* aSrc, nsIDOMNode** aTarget){  nsAutoString ns;  nsAutoString localName;  aSrc->GetNamespaceURI(ns);  aSrc->GetLocalName(localName);  // Clone the visual content of the <output>.  // According to the XForms Schema it is enough   // to support <output> here.  if (ns.EqualsLiteral(NS_NAMESPACE_XFORMS) &&      localName.EqualsLiteral("output")) {    nsCOMPtr<nsIXFormsDelegate> outEl(do_QueryInterface(aSrc));    if (outEl) {      nsCOMPtr<nsIDOMDocument> doc;      aSrc->GetOwnerDocument(getter_AddRefs(doc));      if (doc) {        nsCOMPtr<nsIDOMText> text;        nsAutoString value;        outEl->GetValue(value);        doc->CreateTextNode(value, getter_AddRefs(text));        NS_IF_ADDREF(*aTarget = text);      }    }    return;  }  // Clone other elements  aSrc->CloneNode(PR_FALSE, aTarget);  if (!*aTarget)    return;  // Add the new children  nsCOMPtr<nsIDOMNode> tmp;  nsCOMPtr<nsIDOMNodeList> childNodes;  aSrc->GetChildNodes(getter_AddRefs(childNodes));  PRUint32 count = 0;  if (childNodes)    childNodes->GetLength(&count);  for (PRUint32 i = 0; i < count; ++i) {    nsCOMPtr<nsIDOMNode> child;    childNodes->Item(i, getter_AddRefs(child));        if (child) {      nsCOMPtr<nsIDOMNode> clone;      CloneNode(child, getter_AddRefs(clone));      if (clone)        (*aTarget)->AppendChild(clone, getter_AddRefs(tmp));    }  }}