NameSpaceMap* entry;   for (entry = mNameSpaces; entry != nsnull; entry = entry->Next) { if (aURI.Equals(entry->URI)) return NS_OK; }   entry = new NameSpaceMap; if (! entry) return NS_ERROR_OUT_OF_MEMORY;  NS_IF_ADDREF(aPrefix); entry->Prefix = aPrefix; entry->URI = aURI; entry->Next = mNameSpaces; mNameSpaces = entry;
mNameSpaces.Put(aURI, aPrefix);
RDFXMLDataSourceImpl::AddNameSpace(nsIAtom* aPrefix, const nsString& aURI){    NameSpaceMap* entry;    // ensure that URIs are unique    for (entry = mNameSpaces; entry != nsnull; entry = entry->Next) {        if (aURI.Equals(entry->URI))            return NS_OK;    }    // okay, it's a new one: let's add it.    entry = new NameSpaceMap;    if (! entry)        return NS_ERROR_OUT_OF_MEMORY;    NS_IF_ADDREF(aPrefix);    entry->Prefix = aPrefix;    entry->URI = aURI;    entry->Next = mNameSpaces;    mNameSpaces = entry;    return NS_OK;}