nsAutoString uri((const char*) s);
{ CBufDescriptor desc(NS_CONST_CAST(char*, p + aContextURI.Length()), PR_TRUE, -1); nsCAutoString id(desc);
rdf_IsAnonymousResource(const nsString& aContextURI, nsIRDFResource* aResource){    nsresult rv;    nsXPIDLCString s;    if (NS_FAILED(rv = aResource->GetValue( getter_Copies(s) ))) {        NS_ASSERTION(PR_FALSE, "unable to get resource URI");        return PR_FALSE;    }    nsAutoString uri((const char*) s);    // Make sure that they have the same context (prefix)    if (uri.Find(aContextURI) != 0)        return PR_FALSE;    uri.Cut(0, aContextURI.Length());    // Anonymous resources look like the regexp "\$[0-9]+"    if (uri.CharAt(0) != '#' || uri.CharAt(1) != '$')        return PR_FALSE;    for (PRInt32 i = uri.Length() - 1; i >= 1; --i) {        if (uri.CharAt(i) < '0' || uri.CharAt(i) > '9')            return PR_FALSE;    }    return PR_TRUE;}