kAllowNegativeAssertionsAtom = NS_NewAtom("allownegativeassertions"); kCoalesceDuplicateArcsAtom   = NS_NewAtom("coalesceduplicatearcs");
RDFXULBuilderImpl::Init(){    nsresult rv;    if (gRefCnt++ == 0) {        rv = nsComponentManager::CreateInstance(kNameSpaceManagerCID,                                                nsnull,                                                nsCOMTypeInfo<nsINameSpaceManager>::GetIID(),                                                (void**) &gNameSpaceManager);        if (NS_FAILED(rv)) return rv;        rv = gNameSpaceManager->RegisterNameSpace(kXULNameSpaceURI, kNameSpaceID_XUL);        NS_ASSERTION(NS_SUCCEEDED(rv), "unable to register XUL namespace");        if (NS_FAILED(rv)) return rv;        rv = gNameSpaceManager->RegisterNameSpace(kRDFNameSpaceURI, kNameSpaceID_RDF);        NS_ASSERTION(NS_SUCCEEDED(rv), "unable to register RDF namespace");        if (NS_FAILED(rv)) return rv;        kDataSourcesAtom          = NS_NewAtom("datasources");        kIdAtom                   = NS_NewAtom("id");        kKeysetAtom               = NS_NewAtom("keyset");        kRefAtom                  = NS_NewAtom("ref");        kTemplateAtom             = NS_NewAtom("template");        kXMLNSAtom                = NS_NewAtom("xmlns");                rv = nsServiceManager::GetService(kRDFServiceCID,                                          kIRDFServiceIID,                                          (nsISupports**) &gRDFService);        NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get RDF service");        if (NS_FAILED(rv)) return rv;        gRDFService->GetResource(RDF_NAMESPACE_URI "instanceOf", &kRDF_instanceOf);        gRDFService->GetResource(RDF_NAMESPACE_URI "nextVal",    &kRDF_nextVal);        gRDFService->GetResource(RDF_NAMESPACE_URI "child",      &kRDF_child);        gRDFService->GetResource(XUL_NAMESPACE_URI "#element",   &kXUL_element);        gRDFService->GetResource(XUL_NAMESPACE_URI "#tag",       &kXUL_tag);        rv = nsServiceManager::GetService(kRDFContainerUtilsCID,                                          nsIRDFContainerUtils::GetIID(),                                          (nsISupports**) &gRDFContainerUtils);        if (NS_FAILED(rv)) return rv;        rv = nsServiceManager::GetService(kXULContentUtilsCID,                                          nsCOMTypeInfo<nsIXULContentUtils>::GetIID(),                                          (nsISupports**) &gXULUtils);        if (NS_FAILED(rv)) return rv;    }    rv = nsComponentManager::CreateInstance(kHTMLElementFactoryCID,                                            nsnull,                                            nsIHTMLElementFactory::GetIID(),                                            getter_AddRefs(mHTMLElementFactory));    if (NS_FAILED(rv)) return rv;#ifdef PR_LOGGING    if (! gLog)        gLog = PR_NewLogModule("nsRDFXULBuilder");#endif    return NS_OK;}