diff options
Diffstat (limited to 'help3xsl/online_transform.xsl')
-rw-r--r-- | help3xsl/online_transform.xsl | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl index c1755937cd..ee6a5fbf27 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 --> |