summaryrefslogtreecommitdiffstats
path: root/help3xsl/get_bookmark.xsl
diff options
context:
space:
mode:
authorIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2018-11-09 19:46:07 +0200
committerOlivier Hallot <olivier.hallot@libreoffice.org>2018-11-09 21:14:57 +0100
commit9fb9990b3568c973cc41d5600492e0791e44d40a (patch)
tree1f785629126da84d0974bf244d056b386df31437 /help3xsl/get_bookmark.xsl
parentRelated: tdf#121134: Changing http to https where possible (diff)
downloadhelp-9fb9990b3568c973cc41d5600492e0791e44d40a.tar.gz
help-9fb9990b3568c973cc41d5600492e0791e44d40a.zip
tdf#119415 change from fuse.js to fuzzysort.js
Tied the index listing to the current module. Fuzzysort.js is MIT licensed. Change-Id: I5d95cc1870a1856089217846ed0af572abc882d7 Reviewed-on: https://gerrit.libreoffice.org/63203 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl/get_bookmark.xsl')
-rw-r--r--help3xsl/get_bookmark.xsl52
1 files changed, 38 insertions, 14 deletions
diff --git a/help3xsl/get_bookmark.xsl b/help3xsl/get_bookmark.xsl
index b3e0ab48bb..692ded0ffe 100644
--- a/help3xsl/get_bookmark.xsl
+++ b/help3xsl/get_bookmark.xsl
@@ -63,13 +63,13 @@ xsltproc get_bookmark.xsl <file.xhp>
<xsl:variable name="hrefhtml" select="substring-before($filename,'xhp')"/>
<xsl:variable name="href" select="concat($target,$Language,'/',$hrefhtml,'html?DbPAR=',$app,'#',@id)"/>
<xsl:for-each select="bookmark_value">
- <xsl:text disable-output-escaping="yes"><![CDATA[<a target="_top" href="]]></xsl:text>
+ <xsl:text disable-output-escaping="yes"><![CDATA[{url:"]]></xsl:text>
<xsl:value-of select="$href"/>
- <xsl:text disable-output-escaping="yes"><![CDATA[" class="fuseshown ]]></xsl:text>
+ <xsl:text disable-output-escaping="yes"><![CDATA[", app:"]]></xsl:text>
<xsl:value-of select="$app"/>
- <xsl:text disable-output-escaping="yes"><![CDATA[">]]></xsl:text>
+ <xsl:text disable-output-escaping="yes"><![CDATA[", text:"]]></xsl:text>
<xsl:call-template name="replace"><xsl:with-param name="text" select="."/></xsl:call-template>
- <xsl:text disable-output-escaping="yes"><![CDATA[</a>\]]>&#xA;</xsl:text>
+ <xsl:text disable-output-escaping="yes"><![CDATA["},]]>&#xA;</xsl:text>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
@@ -80,16 +80,20 @@ xsltproc get_bookmark.xsl <file.xhp>
<xsl:with-param name="string">
<xsl:call-template name="apostrophe">
<xsl:with-param name="string">
- <xsl:choose>
- <xsl:when test="contains($text,';')">
- <xsl:value-of select="substring-before($text,';')"/>
- <xsl:text disable-output-escaping="yes"><![CDATA[ -- ]]></xsl:text>
- <xsl:value-of select="substring-after($text,';')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$text"/>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:call-template name="doublequote">
+ <xsl:with-param name="string">
+ <xsl:choose>
+ <xsl:when test="contains($text,';')">
+ <xsl:value-of select="substring-before($text,';')"/>
+ <xsl:text disable-output-escaping="yes"><![CDATA[ -- ]]></xsl:text>
+ <xsl:value-of select="substring-after($text,';')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$text"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:with-param>
@@ -117,6 +121,26 @@ xsltproc get_bookmark.xsl <file.xhp>
</xsl:choose>
</xsl:template>
+<xsl:template name="doublequote">
+ <xsl:param name="string"/>
+ <xsl:variable name="dq">&quot;</xsl:variable><!-- double quote -->
+ <xsl:choose>
+ <xsl:when test="contains($string,$dq)">
+ <xsl:variable name="newstr">
+ <xsl:value-of select="substring-before($string,$dq)"/>
+ <xsl:text disable-output-escaping="yes"><![CDATA[&]]>#34;</xsl:text>
+ <xsl:value-of select="substring-after($string,$dq)"/>
+ </xsl:variable>
+ <xsl:call-template name="doublequote">
+ <xsl:with-param name="string" select="$newstr"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$string"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
<xsl:template name="brand" >
<xsl:param name="string"/>