[PATCH 09/17] XHTML export: Add markup and styles for page-breaks
andrew-libreoffice.org at pileofstuff.org
andrew-libreoffice.org at pileofstuff.org
Thu Aug 14 14:53:49 PDT 2014
From: Andrew Sayers <andrew-libreoffice.org at pileofstuff.org>
---
filter/source/xslt/odf2xhtml/export/common/body.xsl | 2 +-
.../xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl | 6 ++++++
filter/source/xslt/odf2xhtml/export/xhtml/body.xsl | 6 ++++++
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git filter/source/xslt/odf2xhtml/export/common/body.xsl filter/source/xslt/odf2xhtml/export/common/body.xsl
index facc174..cfb464f 100644
--- filter/source/xslt/odf2xhtml/export/common/body.xsl
+++ filter/source/xslt/odf2xhtml/export/common/body.xsl
@@ -417,7 +417,7 @@
<!-- ******************** -->
<!-- ignore / neglect the following elements -->
- <xsl:template match="draw:custom-shape | draw:g | office:forms | text:alphabetical-index-mark | text:alphabetical-index-mark-end | text:alphabetical-index-mark-start | text:bibliography-source | text:number | text:reference-mark-end | text:sequence-decls | text:soft-page-break | text:table-of-content-source | text:tracked-changes | text:user-field-decls"/>
+ <xsl:template match="draw:custom-shape | draw:g | office:forms | text:alphabetical-index-mark | text:alphabetical-index-mark-end | text:alphabetical-index-mark-start | text:bibliography-source | text:number | text:reference-mark-end | text:sequence-decls | text:table-of-content-source | text:tracked-changes | text:user-field-decls"/>
<!-- default template used by purpose-->
<xsl:template match="text:bibliography | text:change-end | text:change-start">
diff --git filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
index b99a781..822ba0b 100644
--- filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
+++ filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
@@ -73,6 +73,12 @@
</xsl:choose>
</xsl:template>
+ <xsl:template match="@fo:break-before">
+ <xsl:text>break-before:</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>; </xsl:text>
+ </xsl:template>
+
<!-- NOTE: Still there have to be placed a <br clear='all' /> to disable the flow!!!!-->
<xsl:template match="@fo:clear">
<xsl:text>clear:both; </xsl:text>
diff --git filter/source/xslt/odf2xhtml/export/xhtml/body.xsl filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
index fdc4e19..46c0a7c 100644
--- filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
+++ filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
@@ -205,6 +205,12 @@
</xsl:call-template>
</xsl:template>
+ <xsl:template match="text:soft-page-break">
+ <xsl:element name="wbr">
+ <xsl:attribute name="style">break-before:page</xsl:attribute>
+ </xsl:element>
+ </xsl:template>
+
<!-- ******************************* -->
<!-- *** User Field Declarations *** -->
<!-- ******************************* -->
--
1.8.5.1
More information about the LibreOffice
mailing list