So I’m doing this XML to wordML conversion using XSLT and there is this annoying blank page at the end of my document. My code looks like this:
<w:body>
<wx:sect>
<w:p>
<w:pPr>
<w:sectPr>
<w:type w:val="continuous"/>
</w:sectPr>
</w:pPr>
<w:r>
<w:t>section 1</w:t>
</w:r>
</w:p>
</wx:sect>
<wx:sect>
<w:p>
<w:pPr>
<w:sectPr>
<w:type w:val="continuous"/>
</w:sectPr>
</w:pPr>
<w:r>
<w:t>section 2</w:t>
</w:r>
</w:p>
</wx:sect>
</w:body>
However, all you have to do to avoid the blank page is move the section formatting information from inside the last paragraph of the last section to a sibling node next to the last paragraph node.
<w:body>
<wx:sect>
<w:p>
<w:pPr>
<w:sectPr>
<w:type w:val="continuous"/>
</w:sectPr>
</w:pPr>
<w:r>
<w:t>section 1</w:t>
</w:r>
</w:p>
</wx:sect>
<wx:sect>
<w:p>
<w:pPr>
</w:pPr>
<w:r>
<w:t>section 2</w:t>
</w:r>
</w:p>
<w:sectPr>
<w:type w:val="continuous"/>
</w:sectPr>
</wx:sect>
</w:body>
Tada! Blank page gone and your document still has excellent structure.