Hello Jason, thanks for your reply
I checked the style.xml, it locates at the right place. And following is the fragment:
- Code: Select all
<w:latentStyles w:defLockedState="0" w:defUIPriority="99" w:defSemiHidden="1" w:defUnhideWhenUsed="1" w:defQFormat="0" w:count="267">
<w:lsdException w:name="Normal" w:semiHidden="0" w:uiPriority="0" w:unhideWhenUsed="0" w:qFormat="1"/>
<w:lsdException w:name="heading 1" w:semiHidden="0" w:uiPriority="9" w:unhideWhenUsed="0" w:qFormat="1"/>
<w:lsdException w:name="heading 2" w:uiPriority="9" w:qFormat="1"/>
<w:lsdException w:name="heading 3" w:uiPriority="9" w:qFormat="1"/>
<w:lsdException w:name="heading 4" w:uiPriority="9" w:qFormat="1"/>
<w:lsdException w:name="heading 5" w:uiPriority="9" w:qFormat="1"/>
<w:lsdException w:name="heading 6" w:uiPriority="9" w:qFormat="1"/>
****and more****
</w:latentStyles>
This style.xml is the part of a default docx directly created in MS-Word 2007, I have uploaded this docx file in the attachment. If I convert e.g. <html><h1>1</h1><h2>2</h2>3</html> into this docx, only bold style can be converted. I compared the style.xml created by Docx4j (e.g. WordprocessingMLPackage.createPackage()), there are less <w:lsdException> entries, I'm not sure whether this is the reason that docx4j-ImportXHTML can't transform those heading styles.