if (!mDataSource || !mContainer) return NS_ERROR_NOT_INITIALIZED;
RDFContainerImpl::SetNextValue(PRInt32 aIndex){    nsresult rv;    // Remove the current value of nextVal, if there is one.    nsCOMPtr<nsIRDFNode> nextValNode;    if (NS_SUCCEEDED(rv = mDataSource->GetTarget(mContainer,                                                 kRDF_nextVal,                                                 PR_TRUE,                                                 getter_AddRefs(nextValNode)))) {        if (NS_FAILED(rv = mDataSource->Unassert(mContainer, kRDF_nextVal, nextValNode))) {            NS_ERROR("unable to update nextVal");            return rv;        }    }    nsAutoString s;    s.AppendInt(aIndex, 10);    nsCOMPtr<nsIRDFLiteral> nextVal;    if (NS_FAILED(rv = gRDFService->GetLiteral(s.get(), getter_AddRefs(nextVal)))) {        NS_ERROR("unable to get nextVal literal");        return rv;    }    rv = mDataSource->Assert(mContainer, kRDF_nextVal, nextVal, PR_TRUE);    if (rv != NS_RDF_ASSERTION_ACCEPTED) {        NS_ERROR("unable to update nextVal");        return NS_ERROR_FAILURE;    }    return NS_OK;}