As of today we have three OOXML versions/flavours:
- OOXML ECMA-376 1st Edition, 2006 (this is Word 2007) – as of today, Aspose.Words supports only this.
- ISO/IEC 29500:2008 Transitional (Word 2010) – we have code ready for the upcoming release that will support this.
- ISO/IEC 29500:2008 Strict – Aspose.Words will support this some time in the future.
The question I have to all of the customers of Aspose.Words is:
What is the best way to represent the different OOXML versions in the Aspose.Words API?
The general requirements I have:
- It should be easy to use and look natural and consistent.
- It should follow the accepted .NET framework coding guidelines.
The two scenarios we are currently considering are:
- Add the OoxmlCompliance enum and add the SaveOptions.OoxmlCompliance property.
- Add new values to the SaveFormat enum.
I will quickly discuss both of the scenarios below and I am looking for your feedback and new ideas as well.
Scenario 1: Add the OoxmlCompliance enum and a new option to SaveOptions
Saving a document in the new ISO 29500 format will look like this:
/// Allows to specify which OOXML specification will be used for the output DOCX file.
public enum OoxmlCompliance
/// ECMA-376 1st Edition, 2006.
/// ISO/IEC 29500:2008 Transitional compliance level.
/// <p>ISO/IEC 29500:2008 specification is sometimes referred to as as ECMA-376 2nd Edition.</p>
What I don’t like:
- It requires an extra line of code to select the OOXML version/flavour.
- The names of the enum values are quite ugly and don’t follow .NET guidelines, but I want the names to be informative. Tried other variants and did not like them.
Scenario 2: Add more values to the SaveFormat enum.
Saving a document in OOXML could look like this:
What I don’t like:
We have SaveFormat.Docx, SaveFormat.Docm, we probably should have SaveFormat.Dotx and SaveFormat.Dotm and if we want to add ISO29500 Transitional and Strict and also explicit name for ECMA-376 we could end up with 4 x 4 = 16 enum values like SaveFormat.Docm_Iso29500_2008_Transitional, SaveFormat.Docx_Iso29500_2008_Transitional etc. Too noisy.