switch (mState) { case eRDFContentSinkState_InMemberElement: { nsCOMPtr<nsIRDFContainer> container; NS_NewRDFContainer(getter_AddRefs(container)); container->Init(mDataSource, GetContextElement(1)); container->AppendElement(resource); } break;  case eRDFContentSinkState_InPropertyElement: { mDataSource->Assert(GetContextElement(1), GetContextElement(0), resource, PR_TRUE); } break;  default: break; }
RDFContentSinkImpl::CloseContainer(const nsIParserNode& aNode){    FlushText();    nsIRDFResource* resource;    if (NS_FAILED(PopContext(resource, mState))) {        // XXX parser didn't catch unmatched tags?#ifdef PR_LOGGING        if (PR_LOG_TEST(gLog, PR_LOG_ALWAYS)) {            const nsAReadableString& tagStr = aNode.GetText();            char* tagCStr = ToNewCString(tagStr);            PR_LOG(gLog, PR_LOG_ALWAYS,                   ("rdfxml: extra close tag '%s' at line %d",                    tagCStr, aNode.GetSourceLineNumber()));            nsCRT::free(tagCStr);        }#endif        return NS_ERROR_UNEXPECTED; // XXX    }    // If we've just popped a member or property element, _now_ is the    // time to add that element to the graph.    switch (mState) {    case eRDFContentSinkState_InMemberElement: {        nsCOMPtr<nsIRDFContainer> container;        NS_NewRDFContainer(getter_AddRefs(container));        container->Init(mDataSource, GetContextElement(1));        container->AppendElement(resource);    } break;    case eRDFContentSinkState_InPropertyElement: {        mDataSource->Assert(GetContextElement(1), GetContextElement(0), resource, PR_TRUE);    } break;    default:        break;    }        PRInt32 nestLevel = mContextStack->Count();    if (nestLevel == 0)        mState = eRDFContentSinkState_InEpilog;    PopNameSpaces();          NS_IF_RELEASE(resource);    return NS_OK;}