]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
fix links relative to the current directory
authorAndre Malo <nd@apache.org>
Tue, 28 Jan 2014 22:56:02 +0000 (22:56 +0000)
committerAndre Malo <nd@apache.org>
Tue, 28 Jan 2014 22:56:02 +0000 (22:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1562299 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/style/latex/html.xsl

index 26f2674b14ca877896e0378db8f23f20d321c4d5..3e566e2ffc88b174bbfd949dc5509a945c8a9875 100644 (file)
@@ -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>