diff options
author | Olivier Hallot <olivier.hallot@libreoffice.org> | 2022-02-05 06:51:12 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2022-02-05 15:31:37 +0100 |
commit | c4c67afc5f5ac8ada17f82a248eba33c8bd0c520 (patch) | |
tree | d20665de10ff96d73033bd73bf56b41ac4af0445 /help3xsl/online_transform.xsl | |
parent | 819edf7e03678c292f2c4226572bde4d8727d093 (diff) |
Drop last 00/00000004.xhp#wie and simplify XSLT
Change-Id: I85d2da067db208f806b78020a9ca95889444ce0d
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/129519
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl/online_transform.xsl')
-rw-r--r-- | help3xsl/online_transform.xsl | 39 |
1 files changed, 12 insertions, 27 deletions
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl index 4f75de400e..a6ce8255bf 100644 --- a/help3xsl/online_transform.xsl +++ b/help3xsl/online_transform.xsl @@ -419,11 +419,6 @@ <xsl:when test="(concat('/',@href) = /helpdocument/meta/topic/filename) or (@href = /helpdocument/meta/topic/filename)"> <xsl:apply-templates /> </xsl:when> - <xsl:when test="contains(child::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links --> - <xsl:call-template name="insert_howtoget"> - <xsl:with-param name="linkhref" select="@href"/> - </xsl:call-template> - </xsl:when> <xsl:otherwise> <xsl:call-template name="createlink" /> </xsl:otherwise> @@ -481,10 +476,6 @@ </xsl:call-template> </xsl:when> - <xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links --> - <xsl:apply-templates /> - </xsl:when> - <xsl:when test="@role='bascode' or @role='pycode'"> <xsl:call-template name="brand"> <xsl:with-param name="string" select="."/> @@ -528,10 +519,6 @@ </xsl:call-template> </xsl:when> - <xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links --> - <xsl:apply-templates /> - </xsl:when> - <xsl:when test="@role='bascode' or @role='pycode'"> <xsl:call-template name="brand"> <xsl:with-param name="string" select="."/> @@ -1437,20 +1424,18 @@ </xsl:template> <xsl:template name="resolveembedvar"> - <xsl:if test="not(@href='text/shared/00/00000004.xhp#wie')"> <!-- special treatment if howtoget links --> - <xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable> - <xsl:variable name="href"><xsl:value-of select="concat($urlpre,substring-before(@href,'#'))"/></xsl:variable> - <xsl:variable name="anchor"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable> - <xsl:variable name="doc" select="document($href)"/> - <xsl:choose> - <xsl:when test="$doc//variable[@id=$anchor]"> <!-- test for a variable of that name --> - <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/> - </xsl:when> - <xsl:otherwise> <!-- or give up --> - <span class="bug">[<xsl:value-of select="@href"/> not found].</span> - </xsl:otherwise> - </xsl:choose> - </xsl:if> + <xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable> + <xsl:variable name="href"><xsl:value-of select="concat($urlpre,substring-before(@href,'#'))"/></xsl:variable> + <xsl:variable name="anchor"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable> + <xsl:variable name="doc" select="document($href)"/> + <xsl:choose> + <xsl:when test="$doc//variable[@id=$anchor]"> <!-- test for a variable of that name --> + <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/> + </xsl:when> + <xsl:otherwise> <!-- or give up --> + <span class="bug">[<xsl:value-of select="@href"/> not found].</span> + </xsl:otherwise> + </xsl:choose> </xsl:template> <!-- Apply --> |