Ticket #1166: relative-href.xsl.patch

File relative-href.xsl.patch, 1.1 KB (added by Steven Watanabe, 15 years ago)
  • relative-href.xsl

     
    1111
    1212<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/lib/lib.xsl"/>
    1313
     14<xsl:param name="boost.root" select="../.."/>
     15
    1416<!-- ==================================================================== -->
    1517
    1618<!-- Check if path is absolute
     
    4850
    4951    <xsl:choose>
    5052        <xsl:when test="$isabsoluteuri='1'">
    51             <xsl:value-of select="$target"/>
     53            <xsl:choose>
     54                <xsl:when test="substring-before($target, '://') = 'boost'">
     55                    <xsl:value-of select="$boost.root"/>
     56                    <xsl:text>/</xsl:text>
     57                    <xsl:value-of select="substring-after($target, '://')"/>
     58                </xsl:when>
     59                <xsl:otherwise>
     60                    <xsl:value-of select="$target"/>
     61                </xsl:otherwise>
     62            </xsl:choose>
    5263        </xsl:when>
    5364
    5465        <xsl:otherwise>