3 Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
5 Distributed under the Boost Software License, Version 1.0.
6 (See accompanying file LICENSE_1_0.txt or copy at
7 http://www.boost.org/LICENSE_1_0.txt)
9 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
12 <!-- Import the HTML chunking stylesheet -->
14 <!-- Watch out that we don't override chunk.xsl -->
17 href="http://docbook.sourceforge.net/release/xsl/current/html/chunk-common.xsl"/> -->
19 <!-- Already included in the main stylesheet -->
20 <!-- <xsl:import href="relative-href.xsl"/> -->
22 <!-- ==================================================================== -->
24 <xsl:template match="*" mode="recursive-chunk-filename">
25 <xsl:param name="recursive" select="false()"/>
27 <xsl:variable name="their">
28 <xsl:apply-imports mode="recursive-chunk-filename" select="."/>
31 <xsl:variable name="basename" select="substring-before( $their, $html.ext )"/>
33 <xsl:when test="not($recursive)">
34 <!-- translate dots into directory separators, and replace illegal file path characters with underscores -->
35 <xsl:value-of select="translate($basename, '.<>\:*?"|,()!+=&', '/_______________' )"/>
36 <xsl:value-of select="$html.ext"/>
39 <xsl:value-of select="$basename"/>
40 <xsl:value-of select="'.'"/>
46 <!-- ==================================================================== -->
48 <xsl:template name="navig.content">
49 <xsl:param name="direction" select="next"/>
50 <xsl:variable name="navtext">
52 <xsl:when test="$direction = 'prev'">
53 <xsl:call-template name="gentext.nav.prev"/>
55 <xsl:when test="$direction = 'next'">
56 <xsl:call-template name="gentext.nav.next"/>
58 <xsl:when test="$direction = 'up'">
59 <xsl:call-template name="gentext.nav.up"/>
61 <xsl:when test="$direction = 'home'">
62 <xsl:call-template name="gentext.nav.home"/>
65 <xsl:text>xxx</xsl:text>
71 <xsl:when test="$navtext = 'xxx'">
72 <xsl:value-of select="$direction"/>
74 <xsl:when test="$navig.graphics != 0">
76 <xsl:attribute name="src">
77 <xsl:call-template name="href.target.relative">
78 <xsl:with-param name="target" select="$navig.graphics.path"/>
80 <xsl:value-of select="$direction"/>
81 <xsl:value-of select="$navig.graphics.extension"/>
83 <xsl:attribute name="alt">
84 <xsl:value-of select="$navtext"/>
89 <xsl:value-of select="$navtext"/>
95 <!-- ====================================================================== -->
97 <xsl:template match="@fileref">
99 <xsl:when test="contains(., ':')">
100 <xsl:value-of select="."/>
103 <xsl:call-template name="href.target.relative">
104 <xsl:with-param name="target" select="."/>
105 <xsl:with-param name="context" select=".."/>
112 <xsl:template match="@url">
114 <xsl:when test="contains(., ':')">
115 <xsl:value-of select="."/>
118 <xsl:text>XXX</xsl:text>
119 <xsl:value-of select="."/>
120 <xsl:text>XXX</xsl:text>