[Libreoffice-commits] help.git: help3xsl/online_transform.xsl
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Nov 16 13:03:15 UTC 2018
help3xsl/online_transform.xsl | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
New commits:
commit 121bc8154cd8b1d515a11b02e0ed88b528602acb
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
AuthorDate: Thu Nov 15 20:24:30 2018 -0200
Commit: Olivier Hallot <olivier.hallot at libreoffice.org>
CommitDate: Fri Nov 16 14:02:55 2018 +0100
Honor asc/desc in XHP sorting
Change-Id: I11cc206e3f8771fc19387cd2a9c02697982251dc
Reviewed-on: https://gerrit.libreoffice.org/63445
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index c1755937c..ee6a5fbf2 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -622,10 +622,22 @@
<!-- SORT -->
<xsl:template match="sort" >
- <xsl:apply-templates><xsl:sort select="descendant::paragraph"/></xsl:apply-templates>
+ <xsl:variable name="order1">
+ <xsl:choose>
+ <xsl:when test="string-length(@order) = 0"><xsl:value-of select="'ascending'"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="concat(@order,'ending')"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:apply-templates><xsl:sort order="{$order1}" select="descendant::paragraph"/></xsl:apply-templates>
</xsl:template>
<xsl:template match="sort" mode="embedded">
- <xsl:apply-templates><xsl:sort select="descendant::paragraph"/></xsl:apply-templates>
+ <xsl:variable name="order1">
+ <xsl:choose>
+ <xsl:when test="string-length(@order) = 0"><xsl:value-of select="'ascending'"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="concat(@order,'ending')"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:apply-templates><xsl:sort order="{$order1}" select="descendant::paragraph"/></xsl:apply-templates>
</xsl:template>
<!-- SWITCH -->
More information about the Libreoffice-commits
mailing list