mParent->IndexOf(this, pos);
mParent->IndexOf(NS_STATIC_CAST(nsIStyledContent*, this), pos);
RDFElementImpl::GetNextSibling(nsIDOMNode** aNextSibling){    if (nsnull != mParent) {        PRInt32 pos;        mParent->IndexOf(this, pos);        if (pos > -1) {            nsIContent* next;            mParent->ChildAt(++pos, next);            if (nsnull != next) {                nsresult res = next->QueryInterface(kIDOMNodeIID, (void**) aNextSibling);                NS_ASSERTION(NS_OK == res, "not a DOM Node");                NS_RELEASE(next); // balance the AddRef in ChildAt()                return res;            }        }    }    // XXX Nodes that are just below the document (their parent is the    // document) need to go to the document to find their next sibling.    *aNextSibling = nsnull;    return NS_OK;}