Wednesday, January 11, 2012

Define.xml - an extension or a subset of ODM?

In my second-last post, I wrote about the discussion within the define.xml team (that is currently working on define.xml v.2) whether ODM elements not explicitely mentioned in the define.xml specification should be allowed or not. The majority of the team finds that it should not (i.e. they should be forbidden). The people that work on end-to-end insist that they should be allowed.
A typical example is "MeasurementUnitRef" and "MeasurementUnitDef".

As define.xml has been developed as a "vendor extension" to the ODM, I looked into the ODM specification about what it says about vendor extensions.

Section 2.4 of the ODM specification (1.3.1) which is about vendor extensions states:

  • The extension may add new XML elements and attributes, but may not render any standard ODM elements or attributes obsolete
  • Removing all vendor extensions from an extended ODM file must result in a meaningful and accurate standard ODM file
and last but not least:

  • Applications that use extended ODM files must also accept standard ODM files
The latter means for me that if I do have a define.xml file containing "MeasurementUnitRef" elements and "MeasurementUnitDef" elements, an application that reads such files would not be allow to reject these elements (or mark them as error, warning or "not part of the standard". They should just accept them.
Whether they then do something with the information is another case.

So for me it is clear that the define.xml team is not allowed to forbid the use of ODM elements that are not explicitely mentioned in the define.xml spec, nor state that such elements "are not part of the standard".

If they do so, they break the rules of the ODM standard on which they base their extension.