What happened?
After importing a nested Markdown list and exporting it as DOCX, SuperDoc writes w:numPr children as:
<w:numPr>
<w:numId w:val="3"/>
<w:ilvl w:val="0"/>
</w:numPr>
ECMA-376 requires w:ilvl before w:numId. Part 1 §17.3.1.19 shows that order. CT_NumPr is defined identically in Part 1 Annex A.1 (Strict) and in the Transitional wml.xsd shipped with Part 4:
<xsd:complexType name="CT_NumPr">
<xsd:sequence>
<xsd:element name="ilvl" type="CT_DecimalNumber" minOccurs="0"/>
<xsd:element name="numId" type="CT_DecimalNumber" minOccurs="0"/>
<xsd:element name="numberingChange" type="CT_TrackChangeNumbering" minOccurs="0"/>
<xsd:element name="ins" type="CT_TrackChange" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
Because this is an xsd:sequence, the exported order is schema-invalid. The use of different numId values for nested levels is a separate concern and is not the subject of this report.
Steps to reproduce
- Import Markdown containing a nested list, for example:
- Export the document as DOCX.
- Inspect the result:
unzip -p exported.docx word/document.xml | xmllint --format -
- Observe that each
w:numPr contains w:numId before w:ilvl.
Expected behavior
SuperDoc should serialize w:numPr in schema order:
<w:numPr>
<w:ilvl w:val="0"/>
<w:numId w:val="3"/>
</w:numPr>
SuperDoc version
1.45.2
Additional context
What happened?
After importing a nested Markdown list and exporting it as DOCX, SuperDoc writes
w:numPrchildren as:ECMA-376 requires
w:ilvlbeforew:numId. Part 1 §17.3.1.19 shows that order.CT_NumPris defined identically in Part 1 Annex A.1 (Strict) and in the Transitionalwml.xsdshipped with Part 4:Because this is an
xsd:sequence, the exported order is schema-invalid. The use of differentnumIdvalues for nested levels is a separate concern and is not the subject of this report.Steps to reproduce
unzip -p exported.docx word/document.xml | xmllint --format -w:numPrcontainsw:numIdbeforew:ilvl.Expected behavior
SuperDoc should serialize
w:numPrin schema order:SuperDoc version
1.45.2
Additional context
wml.xsd,CT_NumPr