In JaxbXmlPart, the methods which marshal to a Node and to an OutputStream both invoke setMceIgnorable.
That method needs to be suitably overridden in subclasses.
See further comments at
https://github.com/plutext/docx4j/blob/ ... .java#L775MainDocumentPart, HeaderPart and FooterPart all do this.
You still need to set the actual value in object corresponding to underlying XML. The setMceIgnorable method will then ensure the relevant namespace declarations are present.
roded wrote:The sizeRelH/V attributes are added to a w:drawing's wp:anchor tag.
Using java Syntax Highlighting
org.
docx4j.
dml.
wordprocessingDrawing.
ObjectFactory factory
= new org.
docx4j.
dml.
wordprocessingDrawing.
ObjectFactory();
System.
out.
println(XmlUtils.
marshaltoString(factory.
createAnchor(new Anchor
())));
Parsed in 0.013 seconds, using
GeSHi 1.0.8.4
gives:
Using xml Syntax Highlighting
<wp:anchor relativeHeight="0" behindDoc="false" locked="false" layoutInCell="false" allowOverlap="false" />
Parsed in 0.000 seconds, using
GeSHi 1.0.8.4
so creating an Anchor object is not enough to introduce the wp14 attributes.
And if you are reading a docx into docx4j which contains them, that should be ok.
Are you adding them perhaps by unmarshalling XML snippets which contain wp14 attributes?