nsresult rv = NS_ERROR_FAILURE;   rv = nsComponentManager::CreateInstance(kXULDocumentCID, nsnull, NS_GET_IID(nsIDocument), getter_AddRefs(*doc));
nsCOMPtr<nsIDocument> doc; nsCOMPtr<nsIDocumentViewer> docv; nsresult rv = CreateRDFDocument(aExtraInfo, address_of(doc), address_of(docv)); if (NS_FAILED(rv)) { return rv; }  nsCOMPtr<nsIURI> aURL; rv = aChannel->GetURI(getter_AddRefs(aURL));
nsContentDLF::CreateRDFDocument(nsISupports* aExtraInfo,                               nsCOMPtr<nsIDocument>* doc,                               nsCOMPtr<nsIDocumentViewer>* docv){  nsresult rv = NS_ERROR_FAILURE;      // Create the XUL document  rv = nsComponentManager::CreateInstance(kXULDocumentCID, nsnull,                                          NS_GET_IID(nsIDocument),                                          getter_AddRefs(*doc));  if (NS_FAILED(rv)) return rv;  // Create the image content viewer...  rv = NS_NewDocumentViewer(getter_AddRefs(*docv));  if (NS_FAILED(rv)) return rv;  // Load the UA style sheet if we haven't already done that  (*docv)->SetUAStyleSheet(nsContentDLF::GetUAStyleSheet());  return NS_OK;}