if (mUpdateBatchNest)
if (! mDocument)
nsXULTemplateBuilder::OnChange(nsIRDFDataSource* aDataSource,                               nsIRDFResource* aSource,                               nsIRDFResource* aProperty,                               nsIRDFNode* aOldTarget,                               nsIRDFNode* aNewTarget){    // Ignore updates if we're batching    if (mUpdateBatchNest)        return NS_OK;    // Ignore re-entrant builds for content that is currently in our    // activation stack.    if (IsActivated(aSource))        return NS_OK;	if (mCache) {		if (aOldTarget)			// XXX fix this: in-memory DS doesn't like a null oldTarget			mCache->Change(aSource, aProperty, aOldTarget, aNewTarget);		else			// XXX should get tv via observer interface			mCache->Assert(aSource, aProperty, aNewTarget, PR_TRUE);	}    LOG("onchange", aSource, aProperty, aNewTarget);    if (aOldTarget) {        // Pull any old rules that were relying on aOldTarget        Retract(aSource, aProperty, aOldTarget);    }    if (aNewTarget) {        // Fire any new rules that are activated by aNewTarget        nsClusterKeySet newkeys;        Propagate(aSource, aProperty, aNewTarget, newkeys);        FireNewlyMatchedRules(newkeys);    }    // Synchronize any of the content model that may have changed.    SynchronizeAll(aSource, aProperty, aOldTarget, aNewTarget);    return NS_OK;}