nsIRDFDataSource* ds = NS_STATIC_CAST(nsIRDFDataSource*, mDataSources[i]);
nsIRDFDataSource* ds = mDataSources[i];
CompositeDataSourceImpl::Unassert(nsIRDFResource* aSource,                                  nsIRDFResource* aProperty,                                  nsIRDFNode* aTarget){    NS_PRECONDITION(aSource != nsnull, "null ptr");    if (! aSource)        return NS_ERROR_NULL_POINTER;    NS_PRECONDITION(aProperty != nsnull, "null ptr");    if (! aProperty)        return NS_ERROR_NULL_POINTER;    NS_PRECONDITION(aTarget != nsnull, "null ptr");    if (! aTarget)        return NS_ERROR_NULL_POINTER;    nsresult rv;    // Iterate through each of the datasources, starting with "the    // most local" and moving to "the most remote". If _any_ of the    // datasources have the assertion, attempt to unassert it.    PRBool unasserted = PR_TRUE;    PRInt32 i;    PRInt32 count = mDataSources.Count();    for (i = 0; i < count; ++i) {        nsIRDFDataSource* ds = NS_STATIC_CAST(nsIRDFDataSource*, mDataSources[i]);        PRBool hasAssertion;        rv = ds->HasAssertion(aSource, aProperty, aTarget, PR_TRUE, &hasAssertion);        if (NS_FAILED(rv)) return rv;        if (hasAssertion) {            rv = ds->Unassert(aSource, aProperty, aTarget);            if (NS_FAILED(rv)) return rv;            if (rv != NS_RDF_ASSERTION_ACCEPTED) {                unasserted = PR_FALSE;                break;            }        }    }    // Either none of the datasources had it, or they were all willing    // to let it be unasserted.    if (unasserted)        return NS_RDF_ASSERTION_ACCEPTED;    // If we get here, one of the datasources already had the    // assertion, and was adamant about not letting us remove    // it. Iterate from the "most local" to the "most remote"    // attempting to assert the negation...    for (i = 0; i < count; ++i) {        nsIRDFDataSource* ds = NS_STATIC_CAST(nsIRDFDataSource*, mDataSources[i]);        rv = ds->Assert(aSource, aProperty, aTarget, PR_FALSE);        if (NS_FAILED(rv)) return rv;        // Did it take?        if (rv == NS_RDF_ASSERTION_ACCEPTED)            return rv;    }    // Couln't get anyone to accept the negation, either.    return NS_RDF_ASSERTION_REJECTED;}