static nsCOMPtr<nsIAtom> kTypeAtom = getter_AddRefs(NS_NewAtom("type"));
PRBool IsSimpleXlink(nsIContent *aContent, nsString &aHREF){  NS_ASSERTION(aContent, "invalid call to IsXlink with null content");  PRBool rv = PR_FALSE;  // set the out-param to default / empty  aHREF.Truncate(0);  if (aContent) {    // first see if we have an XML element    nsCOMPtr<nsIXMLContent> xml(do_QueryInterface(aContent));    if (xml) {      static nsCOMPtr<nsIAtom> kTypeAtom = getter_AddRefs(NS_NewAtom("type"));  // NOTE: this should be in an atom table but isn't      nsAutoString strSimple;      strSimple.AssignWithConversion("simple");      // see if there is an xlink namespace'd href attribute      nsresult attrState = aContent->GetAttribute(kNameSpaceID_XLink, nsHTMLAtoms::href, aHREF);      if (NS_CONTENT_ATTR_HAS_VALUE == attrState) {        // see if it is type=simple (we don't deal with other types)        nsAutoString val;        attrState = aContent->GetAttribute(kNameSpaceID_XLink, kTypeAtom, val);        if (val == strSimple) {          rv = PR_TRUE;        }      }    }  }  return rv;}