(attr->mName == kIdAtom || attr->mName == kXULContentsGeneratedAtom))
(attr->mName == kIdAtom))
RDFElementImpl::AddBroadcastListener(const nsString& attr, nsIDOMElement* anElement) { 	// Add ourselves to the array.	if (mBroadcastListeners == nsnull)  {      mBroadcastListeners = new nsVoidArray();  }	mBroadcastListeners->AppendElement(new XULBroadcastListener(attr, anElement));	// We need to sync up the initial attribute value.  nsCOMPtr<nsIContent> listener( do_QueryInterface(anElement) );  if (attr == "*") {    // All of the attributes found on this node should be set on the    // listener.    if (mAttributes) {        for (PRInt32 i = mAttributes->Count() - 1; i >= 0; --i) {            const nsXULAttribute* attr = (const nsXULAttribute*) mAttributes->ElementAt(i);            if ((attr->mNameSpaceID == kNameSpaceID_None) &&                (attr->mName == kIdAtom || attr->mName == kXULContentsGeneratedAtom))              continue;            // We aren't the id atom, so it's ok to set us in the listener.            listener->SetAttribute(attr->mNameSpaceID, attr->mName, attr->mValue, PR_TRUE);        }    }    return NS_OK;  }  // Find out if the attribute is even present at all.  nsAutoString attrValue;  nsIAtom* kAtom = NS_NewAtom(attr);	nsresult result = GetAttribute(kNameSpaceID_None, kAtom, attrValue);	PRBool attrPresent = (result == NS_CONTENT_ATTR_NO_VALUE ||                        result == NS_CONTENT_ATTR_HAS_VALUE);	if (attrPresent)  {    // Set the attribute     anElement->SetAttribute(attr, attrValue);  }  else  {    // Unset the attribute    anElement->RemoveAttribute(attr);  }  NS_RELEASE(kAtom);	return NS_OK; }