diff options
author | Olivier Hallot <olivier.hallot@libreoffice.org> | 2017-06-27 14:28:44 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@edx.srv.br> | 2017-07-02 17:52:33 +0200 |
commit | 9eb3382fc24e5d2a4a2a1024f0b4f61f9ed4c035 (patch) | |
tree | eaefac72a13a22bc8a6243a68ed000e6be29d4a2 /help3xsl/get_bookmark.xsl | |
parent | bfe42f086848d11c59a40f9a4dd0523df6996b42 (diff) |
Help-in-browser (vi): more improvements
Improvement:
* image search & screeshots
* inserted TechArticle schema elements from http://schema.org
* new script for usage of helpex in a build
* results in https://helponline.libreoffice.org
Change-Id: I62d1c46f260c8bd5e287df382e8db086112c4d2a
Reviewed-on: https://gerrit.libreoffice.org/39452
Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
Diffstat (limited to 'help3xsl/get_bookmark.xsl')
-rw-r--r-- | help3xsl/get_bookmark.xsl | 130 |
1 files changed, 65 insertions, 65 deletions
diff --git a/help3xsl/get_bookmark.xsl b/help3xsl/get_bookmark.xsl index 724fcc73ce..80dfa2c025 100644 --- a/help3xsl/get_bookmark.xsl +++ b/help3xsl/get_bookmark.xsl @@ -51,25 +51,25 @@ xsltproc get_bookmark.xsl <file.xhp> <!-- Extract the bookmarks--> <xsl:template match="/"> - <xsl:for-each select="//bookmark[@branch='index']"> - <xsl:variable name="hrefhtml" select="substring-before($filename,'xhp')"/> - <xsl:variable name="href" select="concat($productversion,'/',$Language,'/',$hrefhtml,'html?DbPAR=',$app,'#',@id)"/> - <xsl:for-each select="bookmark_value"> - <xsl:variable name="here1"> - <xsl:text disable-output-escaping="yes"><![CDATA[<li><a target="_top" href="]]></xsl:text> - <xsl:value-of select="$href"/> - <xsl:text disable-output-escaping="yes"><![CDATA["</a>]]></xsl:text> - <xsl:call-template name="apostrophe"><xsl:with-param name="string"> - <xsl:value-of select="."/> - </xsl:with-param></xsl:call-template> - </xsl:variable> - - <xsl:call-template name="brand"><xsl:with-param name="string"> - <xsl:value-of select="$here1"/> - </xsl:with-param></xsl:call-template> - <xsl:text disable-output-escaping="yes"><![CDATA[</li>\]]>
</xsl:text> - </xsl:for-each> - </xsl:for-each> + <xsl:for-each select="//bookmark[@branch='index']"> + <xsl:variable name="hrefhtml" select="substring-before($filename,'xhp')"/> + <xsl:variable name="href" select="concat($productversion,'/',$Language,'/',$hrefhtml,'html?DbPAR=',$app,'#',@id)"/> + <xsl:for-each select="bookmark_value"> + <xsl:variable name="here1"> + <xsl:text disable-output-escaping="yes"><![CDATA[<li><a target="_top" href="]]></xsl:text> + <xsl:value-of select="$href"/> + <xsl:text disable-output-escaping="yes"><![CDATA["</a>]]></xsl:text> + <xsl:call-template name="apostrophe"><xsl:with-param name="string"> + <xsl:value-of select="."/> + </xsl:with-param></xsl:call-template> + </xsl:variable> + + <xsl:call-template name="brand"><xsl:with-param name="string"> + <xsl:value-of select="$here1"/> + </xsl:with-param></xsl:call-template> + <xsl:text disable-output-escaping="yes"><![CDATA[</li>\]]>
</xsl:text> + </xsl:for-each> + </xsl:for-each> </xsl:template> <!-- weird characters inside bookmarks, replace by HTML entities--> @@ -77,86 +77,86 @@ xsltproc get_bookmark.xsl <file.xhp> <xsl:param name="string"/> <xsl:variable name="apost">'</xsl:variable><!-- apostrophe --> <xsl:choose> - <xsl:when test="contains($string,$apost)"> - <xsl:variable name="newstr"> + <xsl:when test="contains($string,$apost)"> + <xsl:variable name="newstr"> <xsl:value-of select="substring-before($string,$apost)"/> - <xsl:text disable-output-escaping="yes"><![CDATA[&]]>#39;</xsl:text> + <xsl:text disable-output-escaping="yes"><![CDATA[&]]>#39;</xsl:text> <xsl:value-of select="substring-after($string,$apost)"/> - </xsl:variable> - <xsl:call-template name="apostrophe"> + </xsl:variable> + <xsl:call-template name="apostrophe"> <xsl:with-param name="string" select="$newstr"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$string"/> - </xsl:otherwise> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$string"/> + </xsl:otherwise> </xsl:choose> </xsl:template> <!-- Branding --> <xsl:template match="text()"> - <xsl:call-template name="brand"> - <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param> - </xsl:call-template> - <xsl:call-template name="apostrophe"> - <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param> - </xsl:call-template> + <xsl:call-template name="brand"> + <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param> + </xsl:call-template> + <xsl:call-template name="apostrophe"> + <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param> + </xsl:call-template> </xsl:template> <xsl:template name="brand" > - <xsl:param name="string"/> + <xsl:param name="string"/> <xsl:choose> <xsl:when test="contains($string,$brand1)"> - <xsl:variable name="newstr"> + <xsl:variable name="newstr"> <xsl:value-of select="substring-before($string,$brand1)"/> <xsl:value-of select="$productname"/> <xsl:value-of select="substring-after($string,$brand1)"/> - </xsl:variable> - <xsl:call-template name="brand"> - <xsl:with-param name="string" select="$newstr"/> - </xsl:call-template> + </xsl:variable> + <xsl:call-template name="brand"> + <xsl:with-param name="string" select="$newstr"/> + </xsl:call-template> </xsl:when> - <xsl:when test="contains($string,$brand2)"> - <xsl:variable name="newstr"> + <xsl:when test="contains($string,$brand2)"> + <xsl:variable name="newstr"> <xsl:value-of select="substring-before($string,$brand2)"/> <xsl:value-of select="$pversion"/> <xsl:value-of select="substring-after($string,$brand2)"/> - </xsl:variable> - <xsl:call-template name="brand"> - <xsl:with-param name="string" select="$newstr"/> - </xsl:call-template> - </xsl:when> - - <xsl:when test="contains($string,$brand3)"> - <xsl:variable name="newstr"> + </xsl:variable> + <xsl:call-template name="brand"> + <xsl:with-param name="string" select="$newstr"/> + </xsl:call-template> + </xsl:when> + + <xsl:when test="contains($string,$brand3)"> + <xsl:variable name="newstr"> <xsl:value-of select="substring-before($string,$brand3)"/> <xsl:value-of select="$productname"/> <xsl:value-of select="substring-after($string,$brand3)"/> - </xsl:variable> - <xsl:call-template name="brand"> - <xsl:with-param name="string" select="$newstr"/> - </xsl:call-template> - </xsl:when> + </xsl:variable> + <xsl:call-template name="brand"> + <xsl:with-param name="string" select="$newstr"/> + </xsl:call-template> + </xsl:when> <xsl:when test="contains($string,$brand4)"> - <xsl:variable name="newstr"> + <xsl:variable name="newstr"> <xsl:value-of select="substring-before($string,$brand4)"/> <xsl:value-of select="$pversion"/> <xsl:value-of select="substring-after($string,$brand4)"/> - </xsl:variable> - <xsl:call-template name="brand"> - <xsl:with-param name="string" select="$newstr"/> - </xsl:call-template> - </xsl:when> + </xsl:variable> + <xsl:call-template name="brand"> + <xsl:with-param name="string" select="$newstr"/> + </xsl:call-template> + </xsl:when> <xsl:otherwise> - <xsl:value-of select="$string"/> - </xsl:otherwise> - </xsl:choose> + <xsl:value-of select="$string"/> + </xsl:otherwise> + </xsl:choose> </xsl:template> |