[ http://issues.apache.org/jira/browse/XERCESC-1327?page=comments#action_57850 ] Jesse Pelton commented on XERCESC-1327: ---------------------------------------
It looks to me like some enums are all caps and some are mixed case. Every uppercase enumeration in Xerces 2.5 that I checked was specified in all caps in the DOM specs. (I looked at the node types (ELEMENT_NODE et al), exception codes (DOMSTRING_SIZE_ERR et al), LSParser actions types (ACTION_APPEND_AS_CHILDREN et al), DOMError severity levels ([DOM_]SEVERITY_WARNING et al), DOMImplementationLS modes (MODE_SYNCHRONOUS, MODE_ASYNCHRONOUS), filter actions (FILTER_ACCEPT et al), range comparison types (START_TO_START et al), and range exceptions (BAD_BOUNDARYPOINTS_ERR and INVALID_NODE_TYPE_ERR) before I got tired of looking.) It seems to me that Xerces must match this casing, since Xerces is an implementation of the spec. (The Xerces 2.5 TREE_POSITION... identifiers appear to map roughly to DOCUMENT_POSITION... identifiers in the spec. I'm not sure why the names differ. Another bug, perhaps.) Whether it makes sense to implement these all caps identifiers as macros rather than enumerations in order to match programming convention is another question. I'd vote against it, because you lose the ability to enforce the correct parameter type in function calls, and this seems more important. Are there any enumerated names that are all caps that are not drawn from the spec? If so, they're candidates for change. Otherwise, I don't think there's much to be done. > Change all enum values from ALLCAPS to MixedCase > ------------------------------------------------ > > Key: XERCESC-1327 > URL: http://issues.apache.org/jira/browse/XERCESC-1327 > Project: Xerces-C++ > Type: Bug > Components: Build > Versions: 2.6.0 > Environment: All > Reporter: Robert Buck > > The enum values in Xerces-C are in ALLCAPS, which violates general > programming practice, which reserves ALLCAPS identifiers for C preprocessor > macros. This is a huge problem for people integrating diverse 3rd-party > libraries and Xerces-C, as the enum values often collide with macro > expressions. The result is thousands of lines of nearly indecipherable errors > being emitted from compilers. > Please change all enum values to "MixedCase". If you happen to be aware of > any other ALLCAPS identifiers in Xerces-C, change those too. > This is very critical. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]