rv = aRealNode->SetAttr(nameSpaceID, tag, nsAutoString(valueStr), PR_FALSE);
rv = aRealNode->SetAttr(nameSpaceID, tag, nsDependentString(valueStr), PR_FALSE);
nsXULContentBuilder::AddPersistentAttributes(nsIContent* aTemplateNode,                                             nsIRDFResource* aResource,                                             nsIContent* aRealNode){    nsresult rv;    nsAutoString persist;    rv = aTemplateNode->GetAttr(kNameSpaceID_None, nsXULAtoms::persist, persist);    if (NS_FAILED(rv)) return rv;    if (rv != NS_CONTENT_ATTR_HAS_VALUE)        return NS_OK;    nsAutoString attribute;    while (!persist.IsEmpty()) {        attribute.Truncate();        PRInt32 offset = persist.FindCharInSet(" ,");        if (offset > 0) {            persist.Left(attribute, offset);            persist.Cut(0, offset + 1);        }        else {            attribute = persist;            persist.Truncate();        }        attribute.Trim(" ");        if (attribute.IsEmpty())            break;        nsCOMPtr<nsIAtom> tag;        PRInt32 nameSpaceID;        nsCOMPtr<nsINodeInfo> ni =            aTemplateNode->GetExistingAttrNameFromQName(attribute);        if (ni) {            tag = ni->NameAtom();            nameSpaceID = ni->NamespaceID();        }        else {            tag = do_GetAtom(attribute);            NS_ENSURE_TRUE(tag, NS_ERROR_OUT_OF_MEMORY);            nameSpaceID = kNameSpaceID_None;        }        nsCOMPtr<nsIRDFResource> property;        rv = nsXULContentUtils::GetResource(nameSpaceID, tag, getter_AddRefs(property));        if (NS_FAILED(rv)) return rv;        nsCOMPtr<nsIRDFNode> target;        rv = mDB->GetTarget(aResource, property, PR_TRUE, getter_AddRefs(target));        if (NS_FAILED(rv)) return rv;        if (! target)            continue;        nsCOMPtr<nsIRDFLiteral> value = do_QueryInterface(target);        NS_ASSERTION(value != nsnull, "unable to stomach that sort of node");        if (! value)            continue;        const PRUnichar* valueStr;        rv = value->GetValueConst(&valueStr);        if (NS_FAILED(rv)) return rv;        rv = aRealNode->SetAttr(nameSpaceID, tag, nsAutoString(valueStr), PR_FALSE);        if (NS_FAILED(rv)) return rv;    }    return NS_OK;}