We are working on the support of the new versions of the CIS scoring tools, which use XCCDF
format to store test results. Writing a mapping instead of just another parser seems the obvious thing to do, even if for the time being we don’t plan to use the whole information contained in the reports.
After reading this post it also seems that implementing such a map should be feasible. Instead of XmlBeans we are trying to use Castor for generating the object model, as we really need just data binding, not fiddling with the document itself.
Nevertheless it seems that the XCCDF schema (here) has a sneaky bit
Now, these two attributes will cause Castor to complain like this when generating the object model:
duplicate name found: _id
I have yet to see if there is a way around this, as I’m not really into Castor. I suppose that I need to specify a custom mapping through XPath…
p.s: Castor needs also imported definitions to be present locally. In this case I needed to fetch these files:
- XML definitions: XmlSchema.dtd , xml.xsd, datatypes.dtd
- simpledc20021212.xsd
- platform-0.2.3.xsd