Hello,
I have a XML part of a DOCX which in fact is a w:hdr. It contains a w:drawing with a wp:anchor. Nested in this anchor element I have several subelements: wp:simplePo, wp:positionH, wp:positionV, wp:extent, wp:effectExtent, wp:wrapTight, wp:docPr, wp:cNvGraphicFramePr, a:graphic (so far everything is fine), wp14:sizeRelH and wp14:sizeRelV.
The "Office Drawing Extensions to Office Open XML Structure Sepcification" - I found a version dated June 8, 2011 - suggests this structure being valid. Older sources (http://www.schemacentral.com/sc/ooxml/e-wp_anchor.html) suggest an error here.
docx4j 2.7.1 complains when parsing the XML part (text reformatted):
WARN (JaxbValidationEventHandler.java:80) - [ERROR] : unexpected element (uri:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing", local:"sizeRelH").
Expected elements are
<{http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing}wrapTopAndBottom>,
<{http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing}docPr>,
<{http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing}wrapNone>,
<{http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing}wrapTight>,
<{http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing}simplePos>,
<{http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing}wrapThrough>,
<{http://schemas.openxmlformats.org/drawingml/2006/main}graphic>,
<{http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing}wrapSquare>,
<{http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing}extent>,
<{http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing}effectExtent>,
<{http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing}positionH>,
<{http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing}positionV>,
<{http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing}cNvGraphicFramePr>
I wonder whether docx4j 2.7.1 supports wp14:sizeRelH and wp14:sizeRelV after a:graphic within a wp:anchor. Can you give me some piece of advice how to cope with this situation?
Thank you,
Roland