if (NS_FAILED(rv)) return rv;  rv = gRDF->GetResource(NC_NAMESPACE_URI "child",   &kNC_Child);
nsHTTPIndexParser::Init(){  NS_PRECONDITION(mHTTPIndex != nsnull, "not initialized");  if (! mHTTPIndex)    return NS_ERROR_NOT_INITIALIZED;  nsresult rv;  rv = mHTTPIndex->GetDataSource(getter_AddRefs(mDataSource));  if (NS_FAILED(rv)) return rv;  // No datasource. Uh oh. We won't be much use then.  if (! mDataSource)    return NS_ERROR_UNEXPECTED;  if (gRefCntParser++ == 0) {    rv = nsServiceManager::GetService("component://netscape/rdf/rdf-service",                                      NS_GET_IID(nsIRDFService),                                      NS_REINTERPRET_CAST(nsISupports**, &gRDF));    if (NS_FAILED(rv)) return rv;    rv = gRDF->GetResource(HTTPINDEX_NAMESPACE_URI "Comment",  &kHTTPIndex_Comment);    if (NS_FAILED(rv)) return rv;    rv = gRDF->GetResource(HTTPINDEX_NAMESPACE_URI "Name", &kHTTPIndex_Filename);    if (NS_FAILED(rv)) return rv;    rv = gRDF->GetResource(HTTPINDEX_NAMESPACE_URI "File-Type", &kHTTPIndex_Filetype);    if (NS_FAILED(rv)) return rv;    rv = gRDF->GetResource(HTTPINDEX_NAMESPACE_URI "loading",  &kHTTPIndex_Loading);    if (NS_FAILED(rv)) return rv;    rv = gRDF->GetLiteral(NS_ConvertASCIItoUCS2("true").GetUnicode(), &kTrueLiteral);    if (NS_FAILED(rv)) return rv;    for (Field* field = gFieldTable; field->mName; ++field) {      nsCAutoString str(field->mResName);      rv = gRDF->GetResource(str, &field->mProperty);      if (NS_FAILED(rv)) return rv;    }  }  return NS_OK;}