rdf_MakeAbsoluteURI(NS_ConvertASCIItoUCS2(documentURL), uri);
rdf_MakeAbsoluteURI(NS_ConvertUTF8toUCS2(documentURL), uri);
RDFContentSinkImpl::GetResourceAttribute(const nsIParserNode& aNode,                                         nsIRDFResource** aResource){    nsresult rv;    nsAutoString k;    PRInt32 ac = aNode.GetAttributeCount();    for (PRInt32 i = 0; i < ac; i++) {        // Get upper-cased key        const nsString& key = aNode.GetKeyAt(i);        const char* nameSpaceURI;        nsCOMPtr<nsIAtom> attr;        rv = ParseAttributeString(key, &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(aNode.GetValueAt(i));            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...            char* documentURL;            mDocumentURL->GetSpec(&documentURL);            rdf_MakeAbsoluteURI(NS_ConvertASCIItoUCS2(documentURL), uri);            nsCRT::free(documentURL);            return gRDFService->GetUnicodeResource(uri.GetUnicode(), aResource);        }    }    return NS_ERROR_FAILURE;}