if (attribValue[0] != PRUnichar('?') && attribValue.Find("rdf:") != 0)
if (! IsAttrImpactedByVars(aMatch, attribValue, aModifiedVars))
nsXULTemplateBuilder::SynchronizeUsingTemplate(nsIContent* aTemplateNode,                                               nsIContent* aRealElement,                                               Match& aMatch,                                               const VariableSet& aModifiedVars){    nsresult rv;    // check all attributes on the template node; if they reference a resource,    // update the equivalent attribute on the content node    PRInt32    numAttribs;    rv = aTemplateNode->GetAttributeCount(numAttribs);    if (NS_FAILED(rv)) return rv;    if (rv == NS_CONTENT_ATTR_HAS_VALUE) {        for (PRInt32 aLoop=0; aLoop<numAttribs; aLoop++) {            PRInt32    attribNameSpaceID;            nsCOMPtr<nsIAtom> attribName, prefix;            rv = aTemplateNode->GetAttributeNameAt(aLoop,                                                   attribNameSpaceID,                                                   *getter_AddRefs(attribName),                                                   *getter_AddRefs(prefix));            if (NS_FAILED(rv)) return rv;            // See if it's one of the attributes that we unilaterally            // ignore. If so, on to the next one...            if (IsIgnoreableAttribute(attribNameSpaceID, attribName))                continue;            nsAutoString attribValue;            rv = aTemplateNode->GetAttribute(attribNameSpaceID,                                             attribName,                                             attribValue);            if (NS_FAILED(rv)) return rv;            // Make sure it's a variable            if (attribValue[0] != PRUnichar('?') && attribValue.Find("rdf:") != 0)                continue;            // See if this variable's value has changed.            PRInt32 var = aMatch.mRule->LookupSymbol(attribValue);            if (! aModifiedVars.Contains(var))                continue;            // Yep. Get the new text            Value value;            aMatch.GetAssignmentFor(mConflictSet, var, &value);            SubstituteTextForValue(value, attribValue);            if (attribValue.Length() > 0) {                aRealElement->SetAttribute(attribNameSpaceID,                                           attribName,                                           attribValue,                                           PR_TRUE);            }            else {                aRealElement->UnsetAttribute(attribNameSpaceID,                                             attribName,                                             PR_TRUE);            }        }    }    // See if we've generated kids for this node yet. If we have, then    // recursively sync up template kids with content kids    PRBool contentsGenerated = PR_TRUE;    nsCOMPtr<nsIXULContent> xulcontent = do_QueryInterface(aRealElement);    if (xulcontent) {        rv = xulcontent->GetLazyState(nsIXULContent::eTemplateContentsBuilt,                                      contentsGenerated);        if (NS_FAILED(rv)) return rv;    }    else {        // HTML content will _always_ have been generated up-front    }    if (contentsGenerated) {        PRInt32 count;        rv = aTemplateNode->ChildCount(count);        if (NS_FAILED(rv)) return rv;        for (PRInt32 loop=0; loop<count; loop++) {            nsCOMPtr<nsIContent> tmplKid;            rv = aTemplateNode->ChildAt(loop, *getter_AddRefs(tmplKid));            if (NS_FAILED(rv)) return rv;            if (! tmplKid)                break;            nsCOMPtr<nsIContent> realKid;            rv = aRealElement->ChildAt(loop, *getter_AddRefs(realKid));            if (NS_FAILED(rv)) return rv;            if (! realKid)                break;            rv = SynchronizeUsingTemplate(tmplKid, realKid, aMatch, aModifiedVars);            if (NS_FAILED(rv)) return rv;        }    }    return NS_OK;}