040489cec96a921396896961cef480d7543e567e
[working/Evergreen.git] / stylesheets / evergreen_docbook_files / evergreen_xhtml.xsl
1 <?xml version='1.0'?>\r
2 <xsl:stylesheet  \r
3     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">\r
4 \r
5 <xsl:import href="docbook-xsl/xhtml/chunk.xsl"/>\r
6 <xsl:import href="evergreen_xhtml_graphics.xsl"/> \r
7 \r
8 <xsl:param name="img.src.path" select="''"/>\r
9 <xsl:param name="default.image.width" select="'900px'"/>\r
10 <xsl:param name="keep.relative.image.uris" select="0"/>\r
11 <xsl:param name="use.role.for.media.object" select="1"/>\r
12 <xsl:param name="html.stylesheet" select="'../evergreen_doc.css'"/>\r
13 <xsl:param name="para.propagates.style" select="1"/> <!-- applies "role" attribute as html class, for tracking changes in draft -->\r
14 <xsl:param name="generate.revhistory.link" select="1"/>\r
15 <xsl:param name="glossary.sort" select="1"/> <!-- sort glossterms aphabetically regardless of order in xml docs -->\r
16 <xsl:param name="glossterm.separation" select="'0.1in'"/> <!-- vertical space between term and definition paragraph -->\r
17 <xsl:param name="callout.graphics" select="1" />\r
18 <xsl:param name="callout.graphics.extension" select="'.png'" />\r
19 <xsl:param name="callout.graphics.path" select="'media/'" />\r
20 <xsl:param name="use.id.as.filename" select="1"></xsl:param> \r
21 <!-- customized header, to add home link -->\r
22     \r
23     <xsl:template name="header.navigation">\r
24         <xsl:param name="prev" select="/d:foo"/>\r
25         <xsl:param name="next" select="/d:foo"/>\r
26         <xsl:param name="nav.context"/>\r
27         \r
28         <xsl:variable name="home" select="/*[1]"/>\r
29         <xsl:variable name="up" select="parent::*"/>\r
30         \r
31         <xsl:variable name="row1" select="$navig.showtitles != 0"/>\r
32         <xsl:variable name="row2" select="count($prev) &gt; 0                                     or (count($up) &gt; 0                                          and generate-id($up) != generate-id($home)                                         and $navig.showtitles != 0)                                     or count($next) &gt; 0"/>\r
33         \r
34         <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'">\r
35             <div class="navheader">\r
36                 <xsl:if test="$row1 or $row2">\r
37                     <table width="100%" summary="Navigation header">\r
38                         <xsl:if test="$row1">\r
39                             <tr>\r
40                                 <th colspan="3" align="center">\r
41                                     <xsl:apply-templates select="." mode="object.title.markup"/>\r
42                                 </th>\r
43                             </tr>\r
44                         </xsl:if>\r
45                         \r
46                         <xsl:if test="$row2">\r
47                             <tr>\r
48                                 <td width="20%" align="{$direction.align.start}">\r
49                                     <xsl:if test="count($prev)&gt;0">\r
50                                         \r
51                                <!-- the next line is custom, adds Home link to HTML pages -->         \r
52                                         \r
53                                         <a style="margin-right: 10px;" href="index.html">Home</a>\r
54                                         <a accesskey="p">\r
55                                             <xsl:attribute name="href">\r
56                                                 <xsl:call-template name="href.target">\r
57                                                     <xsl:with-param name="object" select="$prev"/>\r
58                                                 </xsl:call-template>\r
59                                             </xsl:attribute>\r
60                                             <xsl:call-template name="navig.content">\r
61                                                 <xsl:with-param name="direction" select="'prev'"/>\r
62                                             </xsl:call-template>\r
63                                         </a>\r
64                                     </xsl:if>\r
65                                     <xsl:text>&#160;</xsl:text>\r
66                                 </td>\r
67                                 <th width="60%" align="center">\r
68                                     <xsl:choose>\r
69                                         <xsl:when test="count($up) &gt; 0                                   and generate-id($up) != generate-id($home)                                   and $navig.showtitles != 0">\r
70                                             <xsl:apply-templates select="$up" mode="object.title.markup"/>\r
71                                         </xsl:when>\r
72                                         <xsl:otherwise>&#160;</xsl:otherwise>\r
73                                     </xsl:choose>\r
74                                 </th>\r
75                                 <td width="20%" align="{$direction.align.end}">\r
76                                     <xsl:text>&#160;</xsl:text>\r
77                                     <xsl:if test="count($next)&gt;0">\r
78                                         <a accesskey="n">\r
79                                             <xsl:attribute name="href">\r
80                                                 <xsl:call-template name="href.target">\r
81                                                     <xsl:with-param name="object" select="$next"/>\r
82                                                 </xsl:call-template>\r
83                                             </xsl:attribute>\r
84                                             <xsl:call-template name="navig.content">\r
85                                                 <xsl:with-param name="direction" select="'next'"/>\r
86                                             </xsl:call-template>\r
87                                         </a>\r
88                                     </xsl:if>\r
89                                 </td>\r
90                             </tr>\r
91                         </xsl:if>\r
92                     </table>\r
93                 </xsl:if>\r
94                 <xsl:if test="$header.rule != 0">\r
95                     <hr/>\r
96                 </xsl:if>\r
97             </div>\r
98         </xsl:if>\r
99     </xsl:template>\r
100    \r
101   <!-- custom footer for Evergreen copyright --> \r
102    \r
103     <xsl:template name="user.footer.navigation">\r
104         \r
105        <div style="float: left;"> <p style="font-style: italic; font-size: .8em;">Documentation for Evergreen version 1.6 <br/>Copyright © 2010, Evergreen Community\r
106         </p><p><a href="http://creativecommons.org/licenses/by-sa/3.0/" title="Creative Commons license">\r
107             <img src="http://i.creativecommons.org/l/by-sa/3.0/80x15.png"/></a></p></div>\r
108         <div style="float: right;"> <a href="../pdf/Evergreen_Documentation.pdf" title="also availabe in PDF"><img src="../media/pdf_icon.gif"/></a></div>\r
109                 \r
110     </xsl:template>\r
111     \r
112 \r
113 \r
114 </xsl:stylesheet>\r
115 \r