summaryrefslogtreecommitdiff
path: root/source/get_bookmark.xsl
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2016-11-07 13:17:11 +0100
committerJan Holesovsky <kendy@collabora.com>2016-11-07 13:17:11 +0100
commit433c4c0477c6dfcde68ed5b1eb98f1811095f050 (patch)
tree32cf005bfe85673b9c104f0b2d17d24c6047436e /source/get_bookmark.xsl
parent677759f9f3b94cc73b78f4fd21d10e36a96fc59b (diff)
Change '/text' to just 'text' on many places.
With this, the pages start appearing even locally with just pointing the browser to file:///.../help_git_repo/source/index.html
Diffstat (limited to 'source/get_bookmark.xsl')
-rw-r--r--source/get_bookmark.xsl12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/get_bookmark.xsl b/source/get_bookmark.xsl
index b3e65ebfe3..3b1be23b0f 100644
--- a/source/get_bookmark.xsl
+++ b/source/get_bookmark.xsl
@@ -23,7 +23,17 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
# Variables and Parameters #
############################
//-->
-<xsl:variable name="filename" select="/helpdocument/meta/topic/filename"/>
+<xsl:variable name="fname" select="/helpdocument/meta/topic/filename"/>
+<xsl:variable name="filename">
+ <xsl:choose>
+ <xsl:when test="starts-with($fname, '/')">
+ <xsl:value-of select="substring($fname, 2)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$fname"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:variable>
<!-- Product brand variables used in the help files -->
<xsl:variable name="brand1" select="'$[officename]'"/>
<xsl:variable name="brand2" select="'$[officeversion]'"/>