summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@libreoffice.org>2020-06-26 10:41:28 -0300
committerOlivier Hallot <olivier.hallot@libreoffice.org>2020-06-29 15:18:59 +0200
commit59200481f126b3cd56ccd1eb231b8c1ee3a61a61 (patch)
treee4d6e60a07be47a12e22db40cd8ba58db24972ee /helpers
parent5ea3a748d1a9d9126da15332df1899e6d17e4f8b (diff)
Add empty colspan/rowspan cleaning
Change-Id: Ibb73313768ad2252e27d6b85757338fabf0ea1d7 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/97414 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'helpers')
-rw-r--r--helpers/refactor.xsl13
1 files changed, 12 insertions, 1 deletions
diff --git a/helpers/refactor.xsl b/helpers/refactor.xsl
index 16341ca35a..5f3c4fc943 100644
--- a/helpers/refactor.xsl
+++ b/helpers/refactor.xsl
@@ -15,6 +15,18 @@
<xsl:apply-templates/>
</xsl:template>
+<!-- remove colspan="" rowspan="" in tablecell -->
+<xsl:template match="//tablecell[@colspan='' and @rowspan='']">
+<tablecell>
+<xsl:if test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:if>
+<xsl:if test="@width"><xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute></xsl:if>
+<xsl:if test="@unit"><xsl:attribute name="unit"><xsl:value-of select="@unit"/></xsl:attribute></xsl:if>
+<xsl:if test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:if>
+<xsl:if test="@localize"><xsl:attribute name="localize"><xsl:value-of select="@localize"/></xsl:attribute></xsl:if>
+<xsl:apply-templates/>
+</tablecell>
+</xsl:template>
+
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
@@ -57,5 +69,4 @@
<xsl:apply-templates />
</xsl:element>
</xsl:template>
-
</xsl:stylesheet>