1<?xml version='1.0'?> 2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3 version='1.0' 4 xmlns="http://www.w3.org/TR/xhtml1/transitional" 5 exclude-result-prefixes="#default"> 6 7<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/> 8<xsl:include href="stylesheet-common.xsl" /> 9<xsl:include href="stylesheet-html-common.xsl" /> 10<xsl:include href="stylesheet-speedup-xhtml.xsl" /> 11 12 13<!-- Parameters --> 14<xsl:param name="base.dir" select="'html/'"></xsl:param> 15<xsl:param name="use.id.as.filename" select="'1'"></xsl:param> 16<xsl:param name="generate.legalnotice.link" select="1"></xsl:param> 17<xsl:param name="chunk.first.sections" select="1"/> 18<xsl:param name="chunk.quietly" select="1"></xsl:param> 19<xsl:param name="admon.style"></xsl:param> <!-- handled by CSS stylesheet --> 20 21<xsl:param name="website.stylesheet" select="0"/> 22 23<xsl:param name="html.stylesheet"> 24 <xsl:choose> 25 <xsl:when test="$website.stylesheet = 0">stylesheet.css</xsl:when> 26 <xsl:otherwise>https://www.postgresql.org/media/css/docs.css</xsl:otherwise> 27 </xsl:choose> 28</xsl:param> 29 30 31<!-- strip directory name from image filerefs --> 32<xsl:template match="imagedata/@fileref"> 33 <xsl:value-of select="substring-after(., '/')"/> 34</xsl:template> 35 36 37<!-- 38Customization of header 39- add Up and Home links 40- add tool tips to links 41 42(overrides html/chunk-common.xsl) 43--> 44<xsl:template name="header.navigation"> 45 <xsl:param name="prev" select="/foo"/> 46 <xsl:param name="next" select="/foo"/> 47 <xsl:param name="nav.context"/> 48 49 <xsl:variable name="home" select="/*[1]"/> 50 <xsl:variable name="up" select="parent::*"/> 51 52 <xsl:variable name="row1" select="$navig.showtitles != 0"/> 53 <xsl:variable name="row2" select="count($prev) > 0 54 or (count($up) > 0 55 and generate-id($up) != generate-id($home) 56 and $navig.showtitles != 0) 57 or count($next) > 0"/> 58 59 <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'"> 60 <div class="navheader"> 61 <xsl:if test="$row1 or $row2"> 62 <table width="100%" summary="Navigation header"> 63 <xsl:if test="$row1"> 64 <tr> 65 <th colspan="5" align="center"> 66 <xsl:apply-templates select="." mode="object.title.markup"/> 67 </th> 68 </tr> 69 </xsl:if> 70 71 <xsl:if test="$row2"> 72 <tr> 73 <td width="10%" align="{$direction.align.start}"> 74 <xsl:if test="count($prev)>0"> 75 <a accesskey="p"> 76 <xsl:attribute name="href"> 77 <xsl:call-template name="href.target"> 78 <xsl:with-param name="object" select="$prev"/> 79 </xsl:call-template> 80 </xsl:attribute> 81 <xsl:attribute name="title"> 82 <xsl:apply-templates select="$prev" mode="object.title.markup"/> 83 </xsl:attribute> 84 <xsl:call-template name="navig.content"> 85 <xsl:with-param name="direction" select="'prev'"/> 86 </xsl:call-template> 87 </a> 88 </xsl:if> 89 <xsl:text> </xsl:text> 90 </td> 91 <td width="10%" align="{$direction.align.start}"> 92 <xsl:choose> 93 <xsl:when test="count($up)>0 94 and generate-id($up) != generate-id($home)"> 95 <a accesskey="u"> 96 <xsl:attribute name="href"> 97 <xsl:call-template name="href.target"> 98 <xsl:with-param name="object" select="$up"/> 99 </xsl:call-template> 100 </xsl:attribute> 101 <xsl:attribute name="title"> 102 <xsl:apply-templates select="$up" mode="object.title.markup"/> 103 </xsl:attribute> 104 <xsl:call-template name="navig.content"> 105 <xsl:with-param name="direction" select="'up'"/> 106 </xsl:call-template> 107 </a> 108 </xsl:when> 109 <xsl:otherwise> </xsl:otherwise> 110 </xsl:choose> 111 </td> 112 <th width="60%" align="center"> 113 <xsl:choose> 114 <xsl:when test="count($up) > 0 115 and generate-id($up) != generate-id($home) 116 and $navig.showtitles != 0"> 117 <xsl:apply-templates select="$up" mode="object.title.markup"/> 118 </xsl:when> 119 <xsl:otherwise> </xsl:otherwise> 120 </xsl:choose> 121 </th> 122 <td width="10%" align="{$direction.align.end}"> 123 <xsl:choose> 124 <xsl:when test="$home != . or $nav.context = 'toc'"> 125 <a accesskey="h"> 126 <xsl:attribute name="href"> 127 <xsl:call-template name="href.target"> 128 <xsl:with-param name="object" select="$home"/> 129 </xsl:call-template> 130 </xsl:attribute> 131 <xsl:attribute name="title"> 132 <xsl:apply-templates select="$home" mode="object.title.markup"/> 133 </xsl:attribute> 134 <xsl:call-template name="navig.content"> 135 <xsl:with-param name="direction" select="'home'"/> 136 </xsl:call-template> 137 </a> 138 <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'"> 139 <xsl:text> | </xsl:text> 140 </xsl:if> 141 </xsl:when> 142 <xsl:otherwise> </xsl:otherwise> 143 </xsl:choose> 144 </td> 145 <td width="10%" align="{$direction.align.end}"> 146 <xsl:text> </xsl:text> 147 <xsl:if test="count($next)>0"> 148 <a accesskey="n"> 149 <xsl:attribute name="href"> 150 <xsl:call-template name="href.target"> 151 <xsl:with-param name="object" select="$next"/> 152 </xsl:call-template> 153 </xsl:attribute> 154 <xsl:attribute name="title"> 155 <xsl:apply-templates select="$next" mode="object.title.markup"/> 156 </xsl:attribute> 157 <xsl:call-template name="navig.content"> 158 <xsl:with-param name="direction" select="'next'"/> 159 </xsl:call-template> 160 </a> 161 </xsl:if> 162 </td> 163 </tr> 164 </xsl:if> 165 </table> 166 </xsl:if> 167 <xsl:if test="$header.rule != 0"> 168 <hr/> 169 </xsl:if> 170 </div> 171 </xsl:if> 172</xsl:template> 173 174</xsl:stylesheet> 175