forwarded from the Xalan list. -Rob
----------------------------- Jack Donohue wrote: When working with Xalan-c on Linux, I found that even if the XMLPlatformUtils::Initialize() method is called directly from the main program, there is still the possibility of making calls to getDOMConverter when creating statically initialized variables, long before main starts execution. I managed to get around this by adding a call to XMLPlatformUtils::Initialize() in the getDOMConverter method in DOMString.cpp: XMLLCPTranscoder* getDomConverter() { static XMLLCPTranscoder* gDomConverter = 0; if (!gDomConverter) { // Make sure we've been initialized XMLPlatformUtils::Initialize(); XMLLCPTranscoder* transcoder = XMLPlatformUtils::fgTransService->makeNewLCPTranscoder(); if (!transcoder) XMLPlatformUtils::panic(XMLPlatformUtils::Panic_NoDefTranscoder ); if (XMLPlatformUtils::compareAndSwap((void **)&gDomConverter, transcoder, 0) != 0) delete gDomConverter; } return gDomConverter; }; If the DOM converter has already been called, then this code will not be executed again, and if the Initialize method had already been called, it just returns, so this has minimal overhead. I'd like to suggest that this patch be incorporated into Xerces. Jack Donohue