Describe the bug
officecli validate reports "invalid child element 'rPr'" for a w:pPrChange whose inner w:pPr contains w:rPr — even when the element order is schema-correct (<w:pStyle/><w:rPr/>). Verified with a hand-crafted document.
To reproduce
Take any docx and manually inject into a paragraph's w:pPr (as its last child):
<w:pPrChange w:author="X" w:date="2026-01-01T00:00:00Z" w:id="99999999">
<w:pPr><w:pStyle w:val="21" /><w:rPr><w:sz w:val="36" /></w:rPr></w:pPr>
</w:pPrChange>
Then run officecli validate.
Expected
Validation passes — this is the exact CT_PPr structure Word itself produces.
Actual
Schema error: "The element has invalid child element 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:rPr'".
Notes
A w:pPrChange with an empty inner <w:pPr/> validates fine. The validator appears to reject rPr inside the pPrChange snapshot specifically — the schema model used for the snapshot w:pPr seems incomplete. This is also why the output of the related bug (rPr-before-pStyle generation) still fails validation even after manually reordering the children.
Describe the bug
officecli validatereports "invalid child element 'rPr'" for aw:pPrChangewhose innerw:pPrcontainsw:rPr— even when the element order is schema-correct (<w:pStyle/><w:rPr/>). Verified with a hand-crafted document.To reproduce
Take any docx and manually inject into a paragraph's
w:pPr(as its last child):Then run
officecli validate.Expected
Validation passes — this is the exact CT_PPr structure Word itself produces.
Actual
Schema error: "The element has invalid child element 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:rPr'".
Notes
A
w:pPrChangewith an empty inner<w:pPr/>validates fine. The validator appears to rejectrPrinside the pPrChange snapshot specifically — the schema model used for the snapshotw:pPrseems incomplete. This is also why the output of the related bug (rPr-before-pStyle generation) still fails validation even after manually reordering the children.