++mCounter;
ContainerCursorImpl::SkipToNext(void){    if (!mDataSource || !mContainer)        return;    nsresult rv;    mNext = nsnull;    nsIRDFNode* RDF_nextVal = nsnull;    nsIRDFNode* nextVal     = nsnull;    nsAutoString next;    PRInt32 last;    PRInt32 err;    // XXX we could cache all this crap when the cursor gets created.    if (NS_FAILED(rv = mResourceMgr->GetNode(kURIRDF_nextVal, RDF_nextVal)))        goto done;    if (NS_FAILED(rv = mDataSource->GetTarget(mContainer, RDF_nextVal, PR_TRUE, nextVal)))        goto done;    if (NS_FAILED(rv = nextVal->GetStringValue(next)))        goto done;    last = next.ToInteger(&err);    if (NS_FAILED(err))        goto done;    while (mCounter < last) {        next = kRDFNameSpaceURI;        next.Append("_");        next.Append(mCounter, 10);        nsIRDFNode* ordinalProperty = nsnull;        if (NS_FAILED(rv = mResourceMgr->GetNode(next, ordinalProperty)))            break;                    rv = mDataSource->GetTarget(mContainer, ordinalProperty, PR_TRUE, mNext);        NS_IF_RELEASE(ordinalProperty);        if (NS_SUCCEEDED(rv)) {            // Don't bother releasing mNext; we'll let the AddRef            // serve as the implicit addref that GetNext() should            // perform.            break;        }        ++mCounter;    }done:    NS_IF_RELEASE(nextVal);    NS_IF_RELEASE(RDF_nextVal);}