if (NS_FAILED(rv))	return(rv);
if (NS_FAILED(rv) || (rv == NS_RDF_NO_VALUE))	return(rv); if (!trueEngine)	return(NS_RDF_NO_VALUE);
InternetSearchDataSource::GetTarget(nsIRDFResource *source,                                nsIRDFResource *property,                                PRBool tv,                                nsIRDFNode **target /* out */){	NS_PRECONDITION(source != nsnull, "null ptr");	if (! source)		return NS_ERROR_NULL_POINTER;	NS_PRECONDITION(property != nsnull, "null ptr");	if (! property)		return NS_ERROR_NULL_POINTER;	NS_PRECONDITION(target != nsnull, "null ptr");	if (! target)		return NS_ERROR_NULL_POINTER;	nsresult		rv = NS_RDF_NO_VALUE;	// we only have positive assertions in the internet search data source.	if (! tv)		return(rv);	if ((isSearchCategoryURI(source)) && (categoryDataSource))	{		const char	*uri = nsnull;		source->GetValueConst(&uri);		if (!uri)	return(NS_ERROR_UNEXPECTED);		nsAutoString	catURI; catURI.AssignWithConversion(uri);		nsCOMPtr<nsIRDFResource>	category;    nsCAutoString caturiC;    caturiC.AssignWithConversion(catURI);		if (NS_FAILED(rv = gRDFService->GetResource(caturiC,			getter_AddRefs(category))))			return(rv);		rv = categoryDataSource->GetTarget(category, property, tv, target);		return(rv);	}	if (isSearchCategoryEngineURI(source))	{		nsCOMPtr<nsIRDFResource>	trueEngine;		rv = resolveSearchCategoryEngineURI(source, getter_AddRefs(trueEngine));		if (NS_FAILED(rv))	return(rv);		source = trueEngine;	}	if (isSearchURI(source) && (property == kNC_Child))	{		// fake out the generic builder (i.e. return anything in this case)		// so that search containers never appear to be empty		*target = source;		NS_ADDREF(source);		return(NS_OK);	}	if (isSearchCommand(source) && (property == kNC_Name))	{		// XXX localize: put static strings into a string bundle		nsAutoString	name;		if (source == kNC_SearchCommand_AddToBookmarks)			name.AssignWithConversion("Add to bookmarks");		else if (source == kNC_SearchCommand_FilterResult)			name.AssignWithConversion("Filter out this URL from all search results");		else if (source == kNC_SearchCommand_FilterSite)			name.AssignWithConversion("Filter out this web site from all search results");		else if (source == kNC_SearchCommand_ClearFilters)			name.AssignWithConversion("Clear all search filters");		if (name.Length() > 0)		{			*target = nsnull;			nsCOMPtr<nsIRDFLiteral>	literal;			if (NS_FAILED(rv = gRDFService->GetLiteral(name.GetUnicode(), getter_AddRefs(literal))))				return(rv);			*target = literal;			NS_IF_ADDREF(*target);			return(rv);		}	}	if (isEngineURI(source))	{		// if we're asking for info on a search engine, (deferred) load it if needed		nsAutoString	data;		FindData(source, data);	}	if (mInner)	{		rv = mInner->GetTarget(source, property, tv, target);	}	return(rv);}