Sauter les rangées vides

This commit is contained in:
Philippe Tourigny 2023-05-27 14:49:33 +09:00
parent f071761ef3
commit 0557ec5dc3
1 changed files with 7 additions and 1 deletions

View File

@ -11,6 +11,8 @@
XML file. -->
<!-- Philippe Tourigny, modified 23-4-2023, version 0.96
Refactor code to use templates correctly and clean up comments. -->
<!-- Philippe Tourigny, modified 27-5-2023, version 0.97
Skip empty rows to avoid creating empty `<tuv>` elements. -->
<!-- Copyright 2013, 2020 Dominique Meeùs, and 2022 Philippe Tourigny@.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
@ -53,7 +55,7 @@
are not recognized if entered directly in attributes. -->
<header>
<xsl:attribute name="creationtool">TMX-export for LibreOffice</xsl:attribute>
<xsl:attribute name="creationtoolversion">0.96</xsl:attribute>
<xsl:attribute name="creationtoolversion">0.97</xsl:attribute>
<xsl:attribute name="segtype">sentence</xsl:attribute>
<xsl:attribute name="o-tmf">application/vnd.oasis.opendocument.spreadsheet</xsl:attribute>
<xsl:attribute name="adminlang">
@ -76,9 +78,13 @@
<!-- Populate the <tu> elements starting at the second row. -->
<xsl:template match="table:table-row[position()>1]">
<!-- Skip empty rows -->
<xsl:if test="table:table-cell/text:p">
<tu>
<xsl:apply-templates select="table:table-cell"/>
</tu>
</xsl:if>
</xsl:template>
<!-- Populate the <tuv> elements. -->