else if (mParent) { nsCOMPtr<nsIXMLContent> xml( do_QueryInterface(mParent) );
nsCOMPtr<nsIContent> parent( dont_QueryInterface(mParent) ); while (parent) { nsCOMPtr<nsIXMLContent> xml( do_QueryInterface(parent) );
RDFElementImpl::GetContainingNameSpace(nsINameSpace*& aNameSpace) const{    if (mNameSpace) {        NS_ADDREF(mNameSpace);        aNameSpace = mNameSpace;        return NS_OK;    }    else if (mParent) {        nsCOMPtr<nsIXMLContent> xml( do_QueryInterface(mParent) );        if (xml)            return xml->GetContainingNameSpace(aNameSpace);    }    aNameSpace = nsnull;    return NS_OK;}