Describe the bug
When creating a tracked format revision on a Word paragraph via set --prop revision.type=format, the generated w:pPrChange snapshot has w:rPr before w:pStyle inside the inner w:pPr, which violates the CT_PPr element order (pStyle first, rPr near-last). officecli validate then reports a schema error on the document.
To reproduce
OfficeCLI v1.0.143, Windows x64:
officecli create t.docx
officecli add t.docx /body --type paragraph --prop text="Hello"
officecli set t.docx "/body/p[1]" --prop style=31 --prop revision.type=format --prop revision.author=T
officecli validate t.docx
Generated XML:
<w:pPrChange w:author="T" w:date="..." w:id="...">
<w:pPr><w:rPr><w:sz w:val="36" /></w:rPr><w:pStyle w:val="21" /></w:pPr>
</w:pPrChange>
Expected
w:pPr children in schema order (<w:pStyle/> first, <w:rPr/> last); validate passes.
Actual
Schema error: "The element has invalid child element 'rPr'. List of possible elements expected: ."
Notes
Manually reordering to <w:pStyle/><w:rPr/> fixes this schema error (see companion issue: validate false-positive on pPrChange with rPr).
Describe the bug
When creating a tracked format revision on a Word paragraph via
set --prop revision.type=format, the generatedw:pPrChangesnapshot hasw:rPrbeforew:pStyleinside the innerw:pPr, which violates the CT_PPr element order (pStyle first, rPr near-last).officecli validatethen reports a schema error on the document.To reproduce
OfficeCLI v1.0.143, Windows x64:
Generated XML:
Expected
w:pPrchildren in schema order (<w:pStyle/>first,<w:rPr/>last); validate passes.Actual
Schema error: "The element has invalid child element 'rPr'. List of possible elements expected: ."
Notes
Manually reordering to
<w:pStyle/><w:rPr/>fixes this schema error (see companion issue: validate false-positive on pPrChange with rPr).