diff options
author | Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> | 2018-11-09 19:46:07 +0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2018-11-09 21:14:57 +0100 |
commit | 9fb9990b3568c973cc41d5600492e0791e44d40a (patch) | |
tree | 1f785629126da84d0974bf244d056b386df31437 /help3xsl/get_bookmark.xsl | |
parent | 3a6e63bbdfc95ab721f56d2486a5d1d9002e2c8c (diff) |
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.xsl | 52 |
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>\]]>
</xsl:text> + <xsl:text disable-output-escaping="yes"><![CDATA["},]]>
</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">"</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"/> |