nsresult rv = NS_CONTENT_ATTR_NOT_THERE;  if (nsnull != mAttributes) { PRInt32 count = mAttributes->Count(); PRInt32 index; for (index = 0; index < count; index++) { const nsGenericAttribute* attr = (const nsGenericAttribute*)mAttributes->ElementAt(index); if ((aNameSpaceID == kNameSpaceID_Unknown || attr->mNodeInfo->NamespaceEquals(aNameSpaceID)) && (attr->mNodeInfo->Equals(aName))) { attr->mNodeInfo->GetPrefixAtom(aPrefix); aResult = attr->mValue; if (0 < aResult.Length()) { rv = NS_CONTENT_ATTR_HAS_VALUE; } else { rv = NS_CONTENT_ATTR_NO_VALUE; } break; } } }  if (rv == NS_CONTENT_ATTR_NOT_THERE) {     aResult.Truncate(); }  return rv; }
  NS_METHOD GetAttribute(const nsAString& aName,                         nsAString& aReturn)   {    return nsGenericElement::GetAttribute(aName, aReturn);  }