httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject svn commit: r1562299 - /httpd/httpd/trunk/docs/manual/style/latex/html.xsl
Date Tue, 28 Jan 2014 22:56:03 GMT
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>



Mime
View raw message