kDataSourcesAtom = NS_NewAtom("datasources"); kIdAtom          = NS_NewAtom("id"); kKeysetAtom      = NS_NewAtom("keyset"); kOverlayAtom     = NS_NewAtom("overlay"); kPositionAtom    = NS_NewAtom("position"); kRefAtom         = NS_NewAtom("ref"); kScriptAtom      = NS_NewAtom("script"); kTemplateAtom    = NS_NewAtom("template");
kCommandUpdaterAtom = NS_NewAtom("commandupdater"); kDataSourcesAtom    = NS_NewAtom("datasources"); kIdAtom             = NS_NewAtom("id"); kKeysetAtom         = NS_NewAtom("keyset"); kOverlayAtom        = NS_NewAtom("overlay"); kPositionAtom       = NS_NewAtom("position"); kRefAtom            = NS_NewAtom("ref"); kScriptAtom         = NS_NewAtom("script"); kTemplateAtom       = NS_NewAtom("template");
XULContentSinkImpl::XULContentSinkImpl(nsresult& rv)    : mText(nsnull),      mTextLength(0),      mTextSize(0),      mConstrainSize(PR_TRUE),      mInScript(PR_FALSE),      mScriptLineNo(0),      mState(eInProlog),      mParser(nsnull),      mUnprocessedOverlayCount(0),      mCurrentOverlay(0),      mStyleSheetCount(0){    MOZ_COUNT_CTOR(RDF_XULContentSinkImpl);    NS_INIT_REFCNT();    if (gRefCnt++ == 0) {        rv = nsServiceManager::GetService(kRDFServiceCID,                                          NS_GET_IID(nsIRDFService),                                          (nsISupports**) &gRDFService);        if (NS_FAILED(rv)) return;        rv = nsComponentManager::CreateInstance(kHTMLElementFactoryCID,                                                nsnull,                                                NS_GET_IID(nsIHTMLElementFactory),                                                (void**) &gHTMLElementFactory);        if (NS_FAILED(rv)) return;        rv = nsComponentManager::CreateInstance(kXMLElementFactoryCID,                                                nsnull,                                                NS_GET_IID(nsIXMLElementFactory),                                                (void**) &gXMLElementFactory);        if (NS_FAILED(rv)) return;        rv = nsComponentManager::CreateInstance(kNameSpaceManagerCID,                                                nsnull,                                                NS_GET_IID(nsINameSpaceManager),                                                (void**) &gNameSpaceManager);        if (NS_FAILED(rv)) return;        rv = gNameSpaceManager->RegisterNameSpace(kXULNameSpaceURI, kNameSpaceID_XUL);        NS_ASSERTION(NS_SUCCEEDED(rv), "unable to register XUL namespace");        if (NS_FAILED(rv)) return;        kDataSourcesAtom = NS_NewAtom("datasources");        kIdAtom          = NS_NewAtom("id");        kKeysetAtom      = NS_NewAtom("keyset");        kOverlayAtom     = NS_NewAtom("overlay");        kPositionAtom    = NS_NewAtom("position");        kRefAtom         = NS_NewAtom("ref");        kScriptAtom      = NS_NewAtom("script");        kTemplateAtom    = NS_NewAtom("template");    }#ifdef PR_LOGGING    if (! gLog)        gLog = PR_NewLogModule("nsXULContentSink");#endif    rv = NS_OK;}