nsCOMPtr<nsIContent> content; content = changeData->mProto->GetImmediateChild(nsXBLAtoms::content);
nsIContent* content = changeData->mProto->GetImmediateChild(nsXBLAtoms::content);
PRBool PR_CALLBACK SetAttrs(nsHashKey* aKey, void* aData, void* aClosure){  nsXBLAttributeEntry* entry = NS_STATIC_CAST(nsXBLAttributeEntry*, aData);  nsXBLAttrChangeData* changeData = NS_STATIC_CAST(nsXBLAttrChangeData*, aClosure);  nsIAtom* src = entry->GetSrcAttribute();  PRInt32 srcNs = changeData->mSrcNamespace;  nsAutoString value;  PRBool attrPresent = PR_TRUE;  if (src == nsHTMLAtoms::text && srcNs == kNameSpaceID_XBL) {    nsXBLBinding::GetTextData(changeData->mBoundElement, value);    value.StripChar(PRUnichar('\n'));    value.StripChar(PRUnichar('\r'));    nsAutoString stripVal(value);    stripVal.StripWhitespace();    if (stripVal.IsEmpty())       attrPresent = PR_FALSE;  }  else {    nsresult result = changeData->mBoundElement->GetAttr(srcNs, src, value);    attrPresent = (result == NS_CONTENT_ATTR_NO_VALUE ||                   result == NS_CONTENT_ATTR_HAS_VALUE);  }  if (attrPresent) {    nsCOMPtr<nsIContent> content;    content = changeData->mProto->GetImmediateChild(nsXBLAtoms::content);    nsXBLAttributeEntry* curr = entry;    while (curr) {      nsIAtom* dst = curr->GetDstAttribute();      PRInt32 dstNs = curr->GetDstNameSpace();      nsIContent* element = curr->GetElement();      nsIContent *realElement =        changeData->mProto->LocateInstance(changeData->mBoundElement, content,                                           changeData->mContent, element);      if (realElement) {        realElement->SetAttr(dstNs, dst, value, PR_FALSE);        if ((dst == nsHTMLAtoms::text && dstNs == kNameSpaceID_XBL) ||            (realElement->GetNodeInfo()->Equals(nsHTMLAtoms::html,                                                kNameSpaceID_XUL) &&             dst == nsHTMLAtoms::value && !value.IsEmpty())) {          nsCOMPtr<nsITextContent> textContent;          NS_NewTextNode(getter_AddRefs(textContent));          if (!textContent) {            continue;          }          textContent->SetText(value, PR_TRUE);          realElement->AppendChildTo(textContent, PR_TRUE, PR_FALSE);        }      }      curr = curr->GetNext();    }  }  return PR_TRUE;}