Commit 1e5cc0f68ebbbfa0343d817f065eb1874d553863

Authored by Colomban Wendling
1 parent 1e41a60b
Exists in python

Remove duplicate empty paragraphs

Showing 1 changed file with 7 additions and 0 deletions   Show diff stats
strip-frames.xsl
... ... @@ -32,6 +32,13 @@
32 32 </xsl:copy>
33 33 </xsl:template>
34 34  
  35 +<!-- strip empty paragraphs that are likely here only to account for some
  36 + frame sizes and will increase the page contents size for no good reason
  37 + once the frames are stripped -->
  38 +<xsl:template match="text:p[count(*) = 0][count(preceding-sibling::*) > 0]">
  39 + <xsl:comment>Stripped empty &lt;text:p text:style-name="<xsl:value-of select="@text:style-name"/>"&gt;</xsl:comment>
  40 +</xsl:template>
  41 +
35 42 <!--
36 43 <xsl:template match="text:p[count(draw:frame/draw:text-box) > 0]">
37 44 -->
... ...