NS_VERIFY(NS_SUCCEEDED(gRDFService->GetResource(kURIRDF_instanceOf, &kRDF_instanceOf)), "unable to get resource");  NS_VERIFY(NS_SUCCEEDED(gRDFService->GetResource(kURIRDF_nextVal, &kRDF_nextVal)), "unable to get resource");  NS_VERIFY(NS_SUCCEEDED(gRDFService->GetResource(kURIRDF_type, &kRDF_type)), "unable to get resource");  NS_VERIFY(NS_SUCCEEDED(gRDFService->GetResource(kURIRDF_child, &kRDF_child)), "unable to get resource");  NS_VERIFY(NS_SUCCEEDED(gRDFService->GetResource(kURIXUL_element, &kXUL_element)), "unable to get resource"); } else { NS_ERROR("couldn't get RDF service");
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get RDF service"); if (NS_SUCCEEDED(rv)) { gRDFService->GetResource(kURIRDF_instanceOf, &kRDF_instanceOf); gRDFService->GetResource(kURIRDF_nextVal,    &kRDF_nextVal); gRDFService->GetResource(kURIRDF_type,       &kRDF_type); gRDFService->GetResource(kURIRDF_child,      &kRDF_child); gRDFService->GetResource(kURIXUL_element,    &kXUL_element);
RDFXULBuilderImpl::RDFXULBuilderImpl(void)    : mDB(nsnull),      mDocument(nsnull),      mRoot(nsnull){    NS_INIT_REFCNT();    if (gRefCnt++ == 0) {        nsresult rv;        if (NS_SUCCEEDED(rv = nsComponentManager::CreateInstance(kNameSpaceManagerCID,                                                           nsnull,                                                           kINameSpaceManagerIID,                                                           (void**) &gNameSpaceManager))) {            rv = gNameSpaceManager->RegisterNameSpace(kXULNameSpaceURI, kNameSpaceID_XUL);            NS_ASSERTION(NS_SUCCEEDED(rv), "unable to register XUL namespace");            rv = gNameSpaceManager->RegisterNameSpace(kRDFNameSpaceURI, kNameSpaceID_RDF);            NS_ASSERTION(NS_SUCCEEDED(rv), "unable to register RDF namespace");        }        else {            NS_ERROR("couldn't create namepsace manager");        }        kContainerAtom            = NS_NewAtom("container");        kDataSourcesAtom          = NS_NewAtom("datasources");        kIdAtom                   = NS_NewAtom("id");        kInstanceOfAtom           = NS_NewAtom("instanceof");        kMenuAtom                 = NS_NewAtom("menu");        kMenuBarAtom              = NS_NewAtom("menubar");        kToolbarAtom              = NS_NewAtom("toolbar");        kTreeAtom                 = NS_NewAtom("tree");        kXMLNSAtom                = NS_NewAtom("xmlns");        kXULContentsGeneratedAtom = NS_NewAtom("xulcontentsgenerated");        kXULIncludeSrcAtom        = NS_NewAtom("include");        if (NS_SUCCEEDED(rv = nsServiceManager::GetService(kRDFServiceCID,                                                           kIRDFServiceIID,                                                           (nsISupports**) &gRDFService))) {            NS_VERIFY(NS_SUCCEEDED(gRDFService->GetResource(kURIRDF_instanceOf, &kRDF_instanceOf)),                      "unable to get resource");            NS_VERIFY(NS_SUCCEEDED(gRDFService->GetResource(kURIRDF_nextVal, &kRDF_nextVal)),                      "unable to get resource");            NS_VERIFY(NS_SUCCEEDED(gRDFService->GetResource(kURIRDF_type, &kRDF_type)),                      "unable to get resource");            NS_VERIFY(NS_SUCCEEDED(gRDFService->GetResource(kURIRDF_child, &kRDF_child)),                      "unable to get resource");            NS_VERIFY(NS_SUCCEEDED(gRDFService->GetResource(kURIXUL_element, &kXUL_element)),                      "unable to get resource");        }        else {            NS_ERROR("couldn't get RDF service");        }    }#ifdef PR_LOGGING    if (! gLog)        gLog = PR_NewLogModule("nsRDFXULBuilder");#endif}