summaryrefslogtreecommitdiffstats
path: root/help3xsl/get_tree.xsl
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-01-31 16:07:28 +0300
committerOlivier Hallot <olivier.hallot@libreoffice.org>2020-02-10 02:34:34 +0100
commit96f1ee8417e4d6c7134e13ab86ac55e52f1bc841 (patch)
treea83046f8a02d0511eac775c566b7817a338ddc38 /help3xsl/get_tree.xsl
parentupdate help page on Creating Page Style from current page (diff)
downloadhelp-96f1ee8417e4d6c7134e13ab86ac55e52f1bc841.tar.gz
help-96f1ee8417e4d6c7134e13ab86ac55e52f1bc841.zip
Don't hardcode version in links in online help
... so that when current page URL is like https://help.libreoffice.org/latest/en-US/text/shared/05/new_help.html links from it will lead to other pages under 'latest', not to https://help.libreoffice.org/6.3/... The problem reason was that in online help, HTML referred to resources with relative URLs starting with version number, like 'href="6.3/media/navigation/favicon.ico"'. The links didn't include the version level in local help: 'href="media/navigation/favicon.ico"'. This was naturally accompanied by <base href="../../../../../"> (online) and '<base href="../../../../">' (local), coming from "tokenize" in help3xsl/online_transform.xsl. This unifies online help behaviour with that of local help. Change-Id: I486cbfbd680d52d00ef99ade9af5ecac2967c115 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/87768 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl/get_tree.xsl')
-rw-r--r--help3xsl/get_tree.xsl10
1 files changed, 1 insertions, 9 deletions
diff --git a/help3xsl/get_tree.xsl b/help3xsl/get_tree.xsl
index d1cf965e12..df264d1b57 100644
--- a/help3xsl/get_tree.xsl
+++ b/help3xsl/get_tree.xsl
@@ -30,14 +30,6 @@ xsltproc get_tree.xsl <file.tree>
<xsl:variable name="brand3" select="'%PRODUCTNAME'"/>
<xsl:variable name="brand4" select="'%PRODUCTVERSION'"/>
-<xsl:variable name="online" select="$local!='yes'"/>
-<xsl:variable name="target">
- <xsl:choose>
- <xsl:when test="$online"><xsl:value-of select="concat($productversion,'/')"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="''"/></xsl:otherwise>
- </xsl:choose>
-</xsl:variable>
-
<!--
#############
# Templates #
@@ -57,7 +49,7 @@ xsltproc get_tree.xsl <file.tree>
<xsl:template match="topic">
<xsl:variable name="htmlpage">
- <xsl:value-of select="concat($target,$lang,'/',substring-before(substring-after(@id,'/'),'.xhp'),'.html','?DbPAR=',$module)" />
+ <xsl:value-of select="concat($lang,'/',substring-before(substring-after(@id,'/'),'.xhp'),'.html','?DbPAR=',$module)" />
</xsl:variable>
<![CDATA[<li><a target="_top" href="]]><xsl:value-of select="$htmlpage"/><![CDATA[">]]><xsl:call-template name="replace"><xsl:with-param name="text"><xsl:value-of select="."/></xsl:with-param></xsl:call-template><![CDATA[</a></li>\]]>
</xsl:template>