Page 1 of 1

ECMA-376 Second Edition

PostPosted: Thu Aug 13, 2009 2:02 pm
by holgerschlegel
Hi,

I've just started using/testing the docx4j library and it looks very useable so far. Due to the fact that the documentation of the (generated) classes represending the document content is very poor, I opened the ECMA standard definition to find out the meaning of the available properties.
During that I noticed that 2 editions of the standard exists. Microsoft Office 2007 currently implements the 1st edition and Office 2010 is stated to use the 2nd edition (which is the standardized one). Both edition are slightly different. Once example:
The "pPr" element "jc" in the 1st edition supports the values "left" and "right". In the 2nd edition, those are replaced by the values "start" and "end" with a different meaning (respecting the bidi property of the paragraph).
Are there any ideas / plans to support both editions in future versions of the docx4j library? If not, it may become unusable for documents created by Office 2010.

In addition to that question I have once suggestion to increase the self-documentation of the parts classes: Add a generic parameter for the "jaxbElement" property to the base class "JaxbXmlPart". Each subclass specifies the concrete class used by it in the extends clause. That would safe some casts accessing parts jaxb element and would automatically document the type of the returned object.

Regards
Holger

Re: ECMA-376 Second Edition

PostPosted: Fri Aug 14, 2009 10:55 am
by jason
holgerschlegel wrote:I've just started using/testing the docx4j library and it looks very useable so far. Due to the fact that the documentation of the (generated) classes represending the document content is very poor, I opened the ECMA standard definition to find out the meaning of the available properties.
During that I noticed that 2 editions of the standard exists. Microsoft Office 2007 currently implements the 1st edition and Office 2010 is stated to use the 2nd edition (which is the standardized one). Both edition are slightly different. Once example:
The "pPr" element "jc" in the 1st edition supports the values "left" and "right". In the 2nd edition, those are replaced by the values "start" and "end" with a different meaning (respecting the bidi property of the paragraph).
Are there any ideas / plans to support both editions in future versions of the docx4j library? If not, it may become unusable for documents created by Office 2010.


Agreed, docx4j will need to support documents created by Office 2010. I haven't yet given any thought to exactly how this might be done.

Related to this, see http://blogs.msdn.com/dmahugh/archive/2009/07/21/dii-workshop-mce-deep-dive-redmond.aspx - we also need to support MCE (Markup Compatibility and Extensibility).

holgerschlegel wrote:In addition to that question I have once suggestion to increase the self-documentation of the parts classes: Add a generic parameter for the "jaxbElement" property to the base class "JaxbXmlPart". Each subclass specifies the concrete class used by it in the extends clause. That would safe some casts accessing parts jaxb element and would automatically document the type of the returned object.


Sounds like a good idea. Thanks.

Re: ECMA-376 Second Edition

PostPosted: Mon Sep 07, 2009 6:36 am
by jason