rv = ParseAttributeString(key, &nameSpaceURI, getter_AddRefs(attr));
rv = ParseAttributeString(nsDependentString(aAttributes[0]), &nameSpaceURI, getter_AddRefs(attr));
RDFContentSinkImpl::GetIdAboutAttribute(const nsIParserNode& aNode,                                        nsIRDFResource** aResource,                                        PRBool* aIsAnonymous){    // This corresponds to the dirty work of production [6.5]    nsAutoString k;    PRInt32 ac = aNode.GetAttributeCount();    nsresult rv;    nsXPIDLCString docURI;    rv = mDocumentURL->GetSpec(getter_Copies(docURI));    if (NS_FAILED(rv)) return rv;    for (PRInt32 i = 0; i < ac; i++) {        // Get upper-cased key        const nsAReadableString& 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 either `ID' or `rdf:ID' (ibid with `about' or        // `rdf:about') in the spirit of being 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() == kAboutAtom) {            if (aIsAnonymous)                *aIsAnonymous = PR_FALSE;            nsAutoString uri(aNode.GetValueAt(i));            nsRDFParserUtils::StripAndConvert(uri);            rdf_MakeAbsoluteURI(NS_ConvertUTF8toUCS2(docURI), uri);            return gRDFService->GetUnicodeResource(uri.get(), aResource);        }        else if (attr.get() == kIdAtom) {            if (aIsAnonymous)                *aIsAnonymous = PR_FALSE;            nsAutoString name(aNode.GetValueAt(i));            nsRDFParserUtils::StripAndConvert(name);            // In the spirit of leniency, we do not bother trying to            // enforce that this be a valid "XML Name" (see            // http://www.w3.org/TR/REC-xml#NT-Nmtoken), as per            // 6.21. If we wanted to, this would be where to do it.            // Construct an in-line resource whose URI is the            // document's URI plus the XML name specified in the ID            // attribute.            name.Insert(PRUnichar('#'), 0);                        rdf_MakeAbsoluteURI(NS_ConvertUTF8toUCS2(docURI), name);            return gRDFService->GetUnicodeResource(name.get(), aResource);        }        else if (attr.get() == kAboutEachAtom) {            // XXX we don't deal with aboutEach...            PR_LOG(gLog, PR_LOG_ALWAYS,                   ("rdfxml: ignoring aboutEach at line %d",                    aNode.GetSourceLineNumber()));        }    }    // Otherwise, we couldn't find anything, so just gensym one...    if (aIsAnonymous)        *aIsAnonymous = PR_TRUE;    rv = gRDFService->GetAnonymousResource(aResource);    return rv;}