if ((PL_strncmp(mOriginalURLSpec, kFileURIPrefix, sizeof(kFileURIPrefix) - 1) != 0) && (PL_strncmp(mOriginalURLSpec, kResourceURIPrefix, sizeof(kResourceURIPrefix) - 1) != 0)) { mIsWritable = PR_FALSE;
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get RDF service"); if (NS_FAILED(rv)) return rv;
RDFXMLDataSourceImpl::Init(const char* uri){    NS_PRECONDITION(mInner != nsnull, "not initialized");    if (! mInner)        return NS_ERROR_OUT_OF_MEMORY;    nsresult rv;    rv = NS_NewURI(getter_AddRefs(mURL), nsDependentCString(uri));    if (NS_FAILED(rv)) return rv;    // Keep a 'cached' copy of the URL; opening it may cause the spec    // to be re-written.    mURL->GetSpec(mOriginalURLSpec);    // XXX this is a hack: any "file:" URI is considered writable. All    // others are considered read-only.    if ((PL_strncmp(mOriginalURLSpec, kFileURIPrefix, sizeof(kFileURIPrefix) - 1) != 0) &&        (PL_strncmp(mOriginalURLSpec, kResourceURIPrefix, sizeof(kResourceURIPrefix) - 1) != 0)) {        mIsWritable = PR_FALSE;    }    rv = gRDFService->RegisterDataSource(this, PR_FALSE);    if (NS_FAILED(rv)) return rv;    return NS_OK;}