if (NS_FAILED(rv = mRDFService->GetDataSource(uri, getter_AddRefs(ds)))) {
if (NS_FAILED(rv = gRDFService->GetDataSource(uri, getter_AddRefs(ds)))) {
XULDocumentImpl::AddNamedDataSource(const char* uri){    NS_PRECONDITION(mXULBuilder != nsnull, "not initialized");    if (! mXULBuilder)        return NS_ERROR_NOT_INITIALIZED;    nsresult rv;    nsCOMPtr<nsIRDFDataSource> ds;    if (NS_FAILED(rv = mRDFService->GetDataSource(uri, getter_AddRefs(ds)))) {        NS_ERROR("unable to get named datasource");        return rv;    }    nsCOMPtr<nsIRDFCompositeDataSource> db;    if (NS_FAILED(rv = mXULBuilder->GetDataBase(getter_AddRefs(db)))) {        NS_ERROR("unable to get XUL db");        return rv;    }    if (NS_FAILED(rv = db->AddDataSource(ds))) {        NS_ERROR("unable to add named data source to XUL db");        return rv;    }    return NS_OK;}