const nsString& newempty = (iscontainer && isempty) ? kTrueStr : kFalseStr;
if (! (mFlags & eDontTestEmpty)) { nsAutoString oldempty; aElement->GetAttribute(kNameSpaceID_None, nsXULAtoms::empty, oldempty);
nsXULTemplateBuilder::SetContainerAttrs(nsIContent *aElement, const Match* aMatch){    NS_PRECONDITION(aMatch->mRule != nsnull, "null ptr");    if (! aMatch->mRule)        return NS_ERROR_NULL_POINTER;    Value containerval;    aMatch->mAssignments.GetAssignmentFor(aMatch->mRule->GetContainerVariable(), &containerval);    nsAutoString oldcontainer;    aElement->GetAttribute(kNameSpaceID_None, nsXULAtoms::container, oldcontainer);    nsAutoString oldempty;    aElement->GetAttribute(kNameSpaceID_None, nsXULAtoms::empty, oldempty);    PRBool iscontainer, isempty;    CheckContainer(VALUE_TO_IRDFRESOURCE(containerval), &iscontainer, &isempty);    const nsString& newcontainer = iscontainer ? kTrueStr : kFalseStr;    if (oldcontainer != newcontainer) {        aElement->SetAttribute(kNameSpaceID_None, nsXULAtoms::container, newcontainer, PR_TRUE);    }    const nsString& newempty = (iscontainer && isempty) ? kTrueStr : kFalseStr;    if (oldempty != newempty) {        aElement->SetAttribute(kNameSpaceID_None, nsXULAtoms::empty, newempty, PR_TRUE);    }    return NS_OK;}