Page 1 of 1

Markup compatibility (AlternateContent) is ignored

PostPosted: Thu Jan 06, 2011 9:14 pm
by jban
Hi,

I have converted an old .doc document to .docx format by Word 2010, and some OLE objects and perhaps other complex content were enclosed in tag "mc:AlternateContent".

Docx4j can parse the docx file, but the AlternateContent tags are ignored, so we are not even able to notice that such content is there. This is a problem for our conversion from docx to another format - we do not want to convert the content of AlternateContent, just to now about its presence so that we can warn about it.

I know support for 2010 is not yet done, but this Markup Compatibility is supported by Word 2007, just it seems that Word 2007 does not create it...
Is there any way how to detect presence of AlternateContent tag? Is support of Markup Compatibility planned soon?

Thank you and best regards,
Jiri

Re: Markup compatibility (AlternateContent) is ignored

PostPosted: Fri Jan 07, 2011 10:55 pm
by jason
jban wrote: we do not want to convert the content of AlternateContent, just to now about its presence so that we can warn about it.


org.docx4j.jaxb.JaxbValidationEventHandler.handleEvent will fire when it is encountered.

You'll need to modify the method to set a flag which you can check.

Feel free to submit a patch if you think you have made a change which will be useful to others.

jban wrote:Is support of Markup Compatibility planned soon?


Yes, I'd like to get onto this. It is near the top of my priority list.

cheers .. Jason