Hi, all Xerces-C++ supports a number of message loaders ICU Message Loader use ICU resource bundle to load locale-specific message work for most Windows and Unix/Linux platforms Message Catalog Message Loader use system message catalog to load locale-specific message work for most UNIX/Linux platforms In-Memory Message Loader define all message strings as static strings in memory work for most Windows and UNIX/Linux platforms Message File Message Loader special message mechanism for AS/400 only Windows Message Loader use Windows resource Version.rc Windows only
The first two, ICUMsgLoader and MsgCatalogLoader, in fact were broken (See Bugzilla bug 7077 and bug 9407). We have recently fixed them and here is our design: ICUMsgLoader and MsgCatalogLoader ------------------------------------------------------------ Both loaders have the NLS mechanism implemented. Build: -------- To build with either of them, user need to specify "-micu" or " -miconv", respectively, from scripts/packageBinaries.pl (or /src/xercesc/runConfigure). Then locale specific message file(s) will be built into a new folder $XERCESCROOT/msg. The binary package will have a tree like this: $XERCESCROOT /bin - has executables like DOMCount, SAXPrint /doc - has documentation /etc - has link map, config.status or other miscellaneous files /include - has header files /lib - has the library like libxerces-c.so.21 /msg - has the message files, e.g. XercesMessages_xx_XX.<ext> (<==== *** see Notes below) /samples - has the samples Note. <ext> - If built with ICU MessageLoader, XercesMessages_xx_XX.res will be generated; if built with MsgCatalog MessageLoader, XercesMessages_xx_XX.cat will be generated xx_XX - Currently Xerces-C++ only supports messages in locale en_US. So only XercesMessages_en_US.<ext> will be generated at this moment. If in future, there is volunteer effort to translate the messages, then we can have others like XercesMessages_fr_FR.<ext> XercesMessages_ja_JP.<ext> ...etc. Run: ------ In runtime environment, a new environment variable, XERCESC_NLS_HOME, need to be defined to point to the directory $XERCESCROOT/msg or another directory where the message files reside. Application: ------------------ Application can initialize the Xerces-C++ environment with specific locale for the messages. For example: // en_EN is the default, and in fact, is the only supported locale at this moment XMLPlatformUtils::Initialize("en_En"); Then the message loader will use the environment variable XERCESC_NLS_HOME to locate the appropriate message file. Your Comment ---------------------- Currently we use "In-Memroy Message Loader" to build our distributed UNIX/Linux binary package. Since we now have Message Catalog ready, we would like to have your input with regard to which message loader to be built with Xerces-C++ distributed binary package (on UNIX/Linux). In-Memory Message Loader (the one used currently) ------------------------------------------------------------------------------ may have faster message access (since all messages are in memory) but lacks NLS support and has to a lot of static string Message Catalog Message loader ---------------------------------------------------- has NLS support but users need to export the runtime environment variable, XERCES_NLS_HOME and may be a bit slower when loading (?, not sure may be only minor difference depends ....) Which one do u prefer in the distributed binary package? Regards, Peiyong Zhang ____________________________________________ XML Parsers Development, D2-265 IBM Toronto Laboratory , 8200 Warden, Markham Email: [EMAIL PROTECTED] Phone: (905)413-4088 Fax: (905)413-4854; T/L: 778-4088 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]