At update of non-LP_NORMAL TID, fail instead of corrupting page header.
[pgsql.git] / doc / src / sgml / stylesheet.xsl
blob363cc93e6b0e792de3ce1a4e8327e01efdc6427c
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/1999/xhtml">
6 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
7 <xsl:include href="stylesheet-common.xsl" />
8 <xsl:include href="stylesheet-html-common.xsl" />
9 <xsl:include href="stylesheet-speedup-xhtml.xsl" />
12 <!-- Parameters -->
13 <xsl:param name="base.dir" select="'html/'"></xsl:param>
14 <xsl:param name="use.id.as.filename" select="'1'"></xsl:param>
15 <xsl:param name="generate.legalnotice.link" select="1"></xsl:param>
16 <xsl:param name="chunk.first.sections" select="1"/>
17 <xsl:param name="chunk.quietly" select="1"></xsl:param>
18 <xsl:param name="admon.style"></xsl:param> <!-- handled by CSS stylesheet -->
21 <!-- copy images to the output directory, so the output is self contained -->
22 <xsl:template match="imageobject">
23 <xsl:call-template name="write-image"/>
24 <xsl:apply-templates select="imagedata"/>
25 </xsl:template>
27 <!-- strip directory name from image filerefs -->
28 <xsl:template match="imagedata/@fileref">
29 <xsl:value-of select="substring-after(., '/')"/>
30 </xsl:template>
33 <!--
34 Customization of header
35 - add Up and Home links
36 - add tool tips to links
38 (overrides html/chunk-common.xsl)
39 -->
40 <xsl:template name="header.navigation">
41 <xsl:param name="prev" select="/foo"/>
42 <xsl:param name="next" select="/foo"/>
43 <xsl:param name="nav.context"/>
45 <xsl:variable name="home" select="/*[1]"/>
46 <xsl:variable name="up" select="parent::*"/>
48 <xsl:variable name="row1" select="$navig.showtitles != 0"/>
49 <xsl:variable name="row2" select="count($prev) &gt; 0
50 or (count($up) &gt; 0
51 and $navig.showtitles != 0)
52 or count($next) &gt; 0"/>
54 <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'">
55 <div class="navheader">
56 <xsl:if test="$row1 or $row2">
57 <table width="100%" summary="Navigation header">
58 <xsl:if test="$row1">
59 <tr>
60 <th colspan="5" align="center">
61 <xsl:apply-templates select="." mode="object.title.markup"/>
62 </th>
63 </tr>
64 </xsl:if>
66 <xsl:if test="$row2">
67 <tr>
68 <td width="10%" align="{$direction.align.start}">
69 <xsl:if test="count($prev)>0">
70 <a accesskey="p">
71 <xsl:attribute name="href">
72 <xsl:call-template name="href.target">
73 <xsl:with-param name="object" select="$prev"/>
74 </xsl:call-template>
75 </xsl:attribute>
76 <xsl:attribute name="title">
77 <xsl:apply-templates select="$prev" mode="object.title.markup"/>
78 </xsl:attribute>
79 <xsl:call-template name="navig.content">
80 <xsl:with-param name="direction" select="'prev'"/>
81 </xsl:call-template>
82 </a>
83 </xsl:if>
84 <xsl:text>&#160;</xsl:text>
85 </td>
86 <td width="10%" align="{$direction.align.start}">
87 <xsl:choose>
88 <xsl:when test="count($up)&gt;0">
89 <a accesskey="u">
90 <xsl:attribute name="href">
91 <xsl:call-template name="href.target">
92 <xsl:with-param name="object" select="$up"/>
93 </xsl:call-template>
94 </xsl:attribute>
95 <xsl:attribute name="title">
96 <xsl:apply-templates select="$up" mode="object.title.markup"/>
97 </xsl:attribute>
98 <xsl:call-template name="navig.content">
99 <xsl:with-param name="direction" select="'up'"/>
100 </xsl:call-template>
101 </a>
102 </xsl:when>
103 <xsl:otherwise>&#160;</xsl:otherwise>
104 </xsl:choose>
105 </td>
106 <th width="60%" align="center">
107 <xsl:choose>
108 <xsl:when test="count($up) > 0
109 and $navig.showtitles != 0">
110 <xsl:apply-templates select="$up" mode="object.title.markup"/>
111 </xsl:when>
112 <xsl:otherwise>&#160;</xsl:otherwise>
113 </xsl:choose>
114 </th>
115 <td width="10%" align="{$direction.align.end}">
116 <xsl:choose>
117 <xsl:when test="$home != . or $nav.context = 'toc'">
118 <a accesskey="h">
119 <xsl:attribute name="href">
120 <xsl:call-template name="href.target">
121 <xsl:with-param name="object" select="$home"/>
122 </xsl:call-template>
123 </xsl:attribute>
124 <xsl:attribute name="title">
125 <xsl:apply-templates select="$home" mode="object.title.markup"/>
126 </xsl:attribute>
127 <xsl:call-template name="navig.content">
128 <xsl:with-param name="direction" select="'home'"/>
129 </xsl:call-template>
130 </a>
131 <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
132 <xsl:text>&#160;|&#160;</xsl:text>
133 </xsl:if>
134 </xsl:when>
135 <xsl:otherwise>&#160;</xsl:otherwise>
136 </xsl:choose>
137 </td>
138 <td width="10%" align="{$direction.align.end}">
139 <xsl:text>&#160;</xsl:text>
140 <xsl:if test="count($next)>0">
141 <a accesskey="n">
142 <xsl:attribute name="href">
143 <xsl:call-template name="href.target">
144 <xsl:with-param name="object" select="$next"/>
145 </xsl:call-template>
146 </xsl:attribute>
147 <xsl:attribute name="title">
148 <xsl:apply-templates select="$next" mode="object.title.markup"/>
149 </xsl:attribute>
150 <xsl:call-template name="navig.content">
151 <xsl:with-param name="direction" select="'next'"/>
152 </xsl:call-template>
153 </a>
154 </xsl:if>
155 </td>
156 </tr>
157 </xsl:if>
158 </table>
159 </xsl:if>
160 <xsl:if test="$header.rule != 0">
161 <hr/>
162 </xsl:if>
163 </div>
164 </xsl:if>
165 </xsl:template>
168 <!--
169 Customization of footer
170 - don't hide redundant Up link
171 - add tool tips to links
173 (overrides html/chunk-common.xsl)
175 <xsl:template name="footer.navigation">
176 <xsl:param name="prev" select="/foo"/>
177 <xsl:param name="next" select="/foo"/>
178 <xsl:param name="nav.context"/>
180 <xsl:variable name="home" select="/*[1]"/>
181 <xsl:variable name="up" select="parent::*"/>
183 <xsl:variable name="row1" select="count($prev) &gt; 0
184 or count($up) &gt; 0
185 or count($next) &gt; 0"/>
187 <xsl:variable name="row2" select="($prev and $navig.showtitles != 0)
188 or (generate-id($home) != generate-id(.)
189 or $nav.context = 'toc')
190 or ($chunk.tocs.and.lots != 0
191 and $nav.context != 'toc')
192 or ($next and $navig.showtitles != 0)"/>
194 <xsl:if test="$suppress.navigation = '0' and $suppress.footer.navigation = '0'">
195 <div class="navfooter">
196 <xsl:if test="$footer.rule != 0">
197 <hr/>
198 </xsl:if>
200 <xsl:if test="$row1 or $row2">
201 <table width="100%" summary="Navigation footer">
202 <xsl:if test="$row1">
203 <tr>
204 <td width="40%" align="{$direction.align.start}">
205 <xsl:if test="count($prev)>0">
206 <a accesskey="p">
207 <xsl:attribute name="href">
208 <xsl:call-template name="href.target">
209 <xsl:with-param name="object" select="$prev"/>
210 </xsl:call-template>
211 </xsl:attribute>
212 <xsl:attribute name="title">
213 <xsl:apply-templates select="$prev" mode="object.title.markup"/>
214 </xsl:attribute>
215 <xsl:call-template name="navig.content">
216 <xsl:with-param name="direction" select="'prev'"/>
217 </xsl:call-template>
218 </a>
219 </xsl:if>
220 <xsl:text>&#160;</xsl:text>
221 </td>
222 <td width="20%" align="center">
223 <xsl:choose>
224 <xsl:when test="count($up)&gt;0">
225 <a accesskey="u">
226 <xsl:attribute name="href">
227 <xsl:call-template name="href.target">
228 <xsl:with-param name="object" select="$up"/>
229 </xsl:call-template>
230 </xsl:attribute>
231 <xsl:attribute name="title">
232 <xsl:apply-templates select="$up" mode="object.title.markup"/>
233 </xsl:attribute>
234 <xsl:call-template name="navig.content">
235 <xsl:with-param name="direction" select="'up'"/>
236 </xsl:call-template>
237 </a>
238 </xsl:when>
239 <xsl:otherwise>&#160;</xsl:otherwise>
240 </xsl:choose>
241 </td>
242 <td width="40%" align="{$direction.align.end}">
243 <xsl:text>&#160;</xsl:text>
244 <xsl:if test="count($next)>0">
245 <a accesskey="n">
246 <xsl:attribute name="href">
247 <xsl:call-template name="href.target">
248 <xsl:with-param name="object" select="$next"/>
249 </xsl:call-template>
250 </xsl:attribute>
251 <xsl:attribute name="title">
252 <xsl:apply-templates select="$next" mode="object.title.markup"/>
253 </xsl:attribute>
254 <xsl:call-template name="navig.content">
255 <xsl:with-param name="direction" select="'next'"/>
256 </xsl:call-template>
257 </a>
258 </xsl:if>
259 </td>
260 </tr>
261 </xsl:if>
263 <xsl:if test="$row2">
264 <tr>
265 <td width="40%" align="{$direction.align.start}" valign="top">
266 <xsl:if test="$navig.showtitles != 0">
267 <xsl:apply-templates select="$prev" mode="object.title.markup"/>
268 </xsl:if>
269 <xsl:text>&#160;</xsl:text>
270 </td>
271 <td width="20%" align="center">
272 <xsl:choose>
273 <xsl:when test="$home != . or $nav.context = 'toc'">
274 <a accesskey="h">
275 <xsl:attribute name="href">
276 <xsl:call-template name="href.target">
277 <xsl:with-param name="object" select="$home"/>
278 </xsl:call-template>
279 </xsl:attribute>
280 <xsl:attribute name="title">
281 <xsl:apply-templates select="$home" mode="object.title.markup"/>
282 </xsl:attribute>
283 <xsl:call-template name="navig.content">
284 <xsl:with-param name="direction" select="'home'"/>
285 </xsl:call-template>
286 </a>
287 <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
288 <xsl:text>&#160;|&#160;</xsl:text>
289 </xsl:if>
290 </xsl:when>
291 <xsl:otherwise>&#160;</xsl:otherwise>
292 </xsl:choose>
294 <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
295 <a accesskey="t">
296 <xsl:attribute name="href">
297 <xsl:value-of select="$chunked.filename.prefix"/>
298 <xsl:apply-templates select="/*[1]"
299 mode="recursive-chunk-filename">
300 <xsl:with-param name="recursive" select="true()"/>
301 </xsl:apply-templates>
302 <xsl:text>-toc</xsl:text>
303 <xsl:value-of select="$html.ext"/>
304 </xsl:attribute>
305 <xsl:call-template name="gentext">
306 <xsl:with-param name="key" select="'nav-toc'"/>
307 </xsl:call-template>
308 </a>
309 </xsl:if>
310 </td>
311 <td width="40%" align="{$direction.align.end}" valign="top">
312 <xsl:text>&#160;</xsl:text>
313 <xsl:if test="$navig.showtitles != 0">
314 <xsl:apply-templates select="$next" mode="object.title.markup"/>
315 </xsl:if>
316 </td>
317 </tr>
318 </xsl:if>
319 </table>
320 </xsl:if>
321 </div>
322 </xsl:if>
323 </xsl:template>
325 </xsl:stylesheet>