nsCAutoString documentURL; mDocumentURL->GetSpec(documentURL); rdf_MakeAbsoluteURI(NS_ConvertUTF8toUCS2(documentURL), uri);
const char* documentURL; mDocumentURL->GetSpec(&documentURL); rdf_PossiblyMakeAbsolute(documentURL, uri);
RDFContentSinkImpl::GetResourceAttribute(const PRUnichar** aAttributes,                                         nsIRDFResource** aResource){  nsresult rv;  for (; *aAttributes; aAttributes += 2) {      // Get upper-cased key      const char* nameSpaceURI;      nsCOMPtr<nsIAtom> attr;      rv = ParseAttributeString(nsDependentString(aAttributes[0]),                                 &nameSpaceURI,                                 getter_AddRefs(attr));      if (NS_FAILED(rv)) return rv;      // We'll accept `resource' or `rdf:resource', under the spirit      // that we should be liberal towards the input that we      // receive.      if (nameSpaceURI && 0 != PL_strcmp(nameSpaceURI, kRDFNameSpaceURI)) {          continue;      }      // XXX you can't specify both, but we'll just pick up the      // first thing that was specified and ignore the other.      if (attr.get() == kResourceAtom) {          nsAutoString uri(aAttributes[1]);          nsRDFParserUtils::StripAndConvert(uri);          // XXX Take the URI and make it fully qualified by          // sticking it into the document's URL. This may not be          // appropriate...          nsCAutoString documentURL;          mDocumentURL->GetSpec(documentURL);          rdf_MakeAbsoluteURI(NS_ConvertUTF8toUCS2(documentURL), uri);          return gRDFService->GetUnicodeResource(uri, aResource);      }  }  return NS_ERROR_FAILURE;}