You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by nd...@apache.org on 2014/01/28 23:56:03 UTC
svn commit: r1562299 - /httpd/httpd/trunk/docs/manual/style/latex/html.xsl
Author: nd
Date: Tue Jan 28 22:56:02 2014
New Revision: 1562299
URL: http://svn.apache.org/r1562299
Log:
fix links relative to the current directory
Modified:
httpd/httpd/trunk/docs/manual/style/latex/html.xsl
Modified: httpd/httpd/trunk/docs/manual/style/latex/html.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/style/latex/html.xsl?rev=1562299&r1=1562298&r2=1562299&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/style/latex/html.xsl (original)
+++ httpd/httpd/trunk/docs/manual/style/latex/html.xsl Tue Jan 28 22:56:02 2014
@@ -286,13 +286,23 @@ interpreted in pre -->
<xsl:if test="@href">
<xsl:variable name="relpath" select="document(/*/@metafile)/metafile/relpath" />
<xsl:variable name="path" select="document(/*/@metafile)/metafile/path" />
+<xsl:variable name="href">
+ <xsl:choose>
+ <xsl:when test="starts-with(@href, './')">
+ <xsl:value-of select="substring(@href, 3)" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@href" />
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:variable>
<xsl:variable name="fileref">
<xsl:choose>
- <xsl:when test="contains(@href, '.html')">
- <xsl:value-of select="substring-before(@href, '.html')"/>
+ <xsl:when test="contains($href, '.html')">
+ <xsl:value-of select="substring-before($href, '.html')"/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="concat(@href, 'index')"/>
+ <xsl:value-of select="concat($href, 'index')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>