replacements for tmXsd and tmTable
In an effort to reduce code complexity and to ease schema evolution of XML menus this issue proposes following module replacements.
Motivation
- pugixml is easy to use and highly available (even on lxplus nodes)
- Code Synthesis XSDC++ is not available on all build environments (hence auto generated bindings are part of the code repository)
- Xerces-C is not available on all build environments
- Additional benefit would be to get rid of the XSD side files required to load an XML menu.
- Module
tmXsd
currently counts about 114k lines of XSD code and about 27k lines of C++ code (23.5k are auto generated by XSDC++) that could be reduced to less than 1k lines of C++ code when using pugixml. - Currently basic data integrity checks are implemented by relying on XSD specification, but should be an integral part of the menu data container. The XML interface should only provide means for loading and saving a menu data tree to XML formatted text. In parallel other interfaces (JSON etc.) could be implemented alongside if required.
Propsed changes
- replace
tmXsd
by new moduletmXml
providing a simplified XML interface using pugixml instead of XSDC++ and Xerces-C. This approach does not require to generate bindings by additional tools. - replace
tmTable
by new moduletmMenu
to provide a straight forward and typed tree representation of a menu (tmTable
provides only string maps and forces lexical casts whenever accessing numeric data). - use
tmMenu
data tree to initializetmEventSetup
data tree while preserving API/ABI compatibility for the offline world.