kIdAtom              = NS_NewAtom("ID");
kIdAtom              = NS_NewAtom("id");
RDFTreeBuilderImpl::RDFTreeBuilderImpl(void)    : mDocument(nsnull),      mDB(nsnull),      mRoot(nsnull){    NS_INIT_REFCNT();    if (gRefCnt == 0) {        kContainerAtom         = NS_NewAtom("container");        kContentsGeneratedAtom = NS_NewAtom("contentsGenerated");        kIdAtom              = NS_NewAtom("ID");        kOpenAtom            = NS_NewAtom("open");        kResourceAtom        = NS_NewAtom("resource");        kTreeAtom            = NS_NewAtom("tree");        kTreeBodyAtom        = NS_NewAtom("treebody");        kTreeCellAtom        = NS_NewAtom("treecell");        kTreeChildrenAtom    = NS_NewAtom("treechildren");        kTreeColAtom         = NS_NewAtom("treecol");        kTreeHeadAtom        = NS_NewAtom("treehead");        kTreeIndentationAtom = NS_NewAtom("treeindentation");        kTreeItemAtom        = NS_NewAtom("treeitem");        nsresult rv;        // Register the XUL and RDF namespaces: these'll just retrieve        // the IDs if they've already been registered by someone else.        nsINameSpaceManager* mgr;        if (NS_SUCCEEDED(rv = nsRepository::CreateInstance(kNameSpaceManagerCID,                                                           nsnull,                                                           kINameSpaceManagerIID,                                                           (void**) &mgr))) {// XXX This is sure to change. Copied from mozilla/layout/xul/content/src/nsXULAtoms.cppstatic const char kXULNameSpaceURI[]    = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";static const char kRDFNameSpaceURI[]    = RDF_NAMESPACE_URI;            rv = mgr->RegisterNameSpace(kXULNameSpaceURI, kNameSpaceID_XUL);            NS_ASSERTION(NS_SUCCEEDED(rv), "unable to register XUL namespace");            rv = mgr->RegisterNameSpace(kRDFNameSpaceURI, kNameSpaceID_RDF);            NS_ASSERTION(NS_SUCCEEDED(rv), "unable to register RDF namespace");            NS_RELEASE(mgr);        }        else {            NS_ERROR("couldn't create namepsace manager");        }        // Initialize the global shared reference to the service        // manager and get some shared resource objects.        rv = nsServiceManager::GetService(kRDFServiceCID,                                          kIRDFServiceIID,                                          (nsISupports**) &gRDFService);        if (NS_FAILED(rv)) {            NS_ERROR("couldnt' get RDF service");        }        NS_VERIFY(NS_SUCCEEDED(gRDFService->GetResource(kURINC_Title,  &kNC_Title)),                  "couldn't get resource");        NS_VERIFY(NS_SUCCEEDED(gRDFService->GetResource(kURINC_child,  &kNC_child)),                  "couldn't get resource");        NS_VERIFY(NS_SUCCEEDED(gRDFService->GetResource(kURINC_Column, &kNC_Column)),                  "couldn't get resource");        NS_VERIFY(NS_SUCCEEDED(gRDFService->GetResource(kURINC_Folder,  &kNC_Folder)),                  "couldn't get resource");        NS_VERIFY(NS_SUCCEEDED(gRDFService->GetResource(kURIRDF_child,  &kRDF_child)),                  "couldn't get resource");    }    ++gRefCnt;}