1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443
|
<?xml version="1.0" encoding="utf-8"?>
<!-- This file is part of the gimp-help project and is
(C) 2002-2012 Daniel Egger, RĂ³man Joost
You may use this file in accordance to the GNU General Public License
Version 2 which is available from http://www.gnu.org.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:import href="@STYLEBASE@/xhtml/chunk.xsl" />
<xsl:import href="languageMenu.xsl" />
<xsl:import href="float-images.xsl" />
<xsl:include href="htmlalternate.xsl" />
<xsl:param name="admon.graphics" select="1" />
<xsl:param name="admon.graphics.path">images/</xsl:param>
<xsl:param name="callout.graphics.path">images/callouts/</xsl:param>
<xsl:param name="collect.xref.targets" select="'yes'" />
<xsl:param name="chunk.section.depth" select="2" />
<!-- doesn't work correctly currently
<xsl:param name="chunk.tocs.and.lots" select="1" />
<xsl:param name="chunk.seperate.lots" select="1" />
-->
<xsl:param name="chunker.output.indent" select="'yes'" />
<xsl:param name="generate.index">1</xsl:param>
<xsl:param name="generate.toc">
appendix toc,title
article/appendix nop
article toc,title
book toc,title
chapter toc,title
part toc,title
preface toc,title
qandadiv toc
qandaset toc
reference toc,title
sect1 toc
sect2 toc
sect3 toc
sect4 toc
sect5 toc
section toc
set toc,title
</xsl:param>
<xsl:param name="html.stylesheet">
gimp-help-plain.css gimp-help-screen.css gimp-help-custom.css
</xsl:param>
<xsl:param name="html.stylesheet.alternate">
gimp22.css
</xsl:param>
<xsl:param name="id.warnings" select="0" />
<xsl:param name="make.valid.html" select="1" />
<xsl:param name="segmentedlist.as.table" select="1" />
<xsl:param name="glossary.sort" select="1" />
<xsl:param name="navig.showtitles" select="1" />
<xsl:param name="navig.graphics" select="1" />
<xsl:param name="navig.graphics.extension">.png</xsl:param>
<xsl:param name="navig.graphics.path">images/</xsl:param>
<xsl:param name="section.autolabel" select="1" />
<xsl:param name="targets.filename" select="'gimp-xrefs.xml'" />
<xsl:param name="toc.section.depth" select="2" />
<xsl:param name="use.id.as.filename">1</xsl:param>
<xsl:param name="gimp.help.languageselector">0</xsl:param>
<xsl:param name="gimp.help.all_linguas">@ALL_LINGUAS@</xsl:param>
<!-- Quick access to report bugs in our Bugzilla Bug: 711318 -->
<xsl:param name="gimphelp.reportbug" select="//ulink[@id='reportbug']" />
<xsl:param name="gimp.reportbug.url" select="'https://gitlab.gnome.org/GNOME/gimp/issues'" />
<xsl:param name="gimp.reportbug.text" select="'Report a bug in GIMP'" />
<!-- Add NotInToc role to simplesect, which is using in fdl.xml to
deal with FDL-In-TOC issue.
also omit title 'image' if the links in header and footer
pointing to the images
-->
<xsl:template match="simplesect[@role = 'NotInToc']" mode="toc"/>
<!-- suppress all elements which have the 'tex' role, because we don't
want to process elements which are obviously for PDF generation
-->
<xsl:template match="*[@role='tex']" />
<!-- ==================================================================== -->
<!-- This is a customized version of the docbook-xsl-1.75.2 template -->
<xsl:template name="header.navigation">
<xsl:param name="prev" select="/foo"/>
<xsl:param name="next" select="/foo"/>
<xsl:param name="nav.context"/>
<xsl:variable name="home" select="/*[1]"/>
<xsl:variable name="up" select="parent::*"/>
<!--XXX: workaround for a weird runtime error ("unregistered variable")-->
<xsl:variable name="direction.align.start">left</xsl:variable>
<xsl:variable name="row1" select="$navig.showtitles != 0"/>
<xsl:variable name="row2" select="count($prev) > 0
or (count($up) > 0
and generate-id($up) != generate-id($home)
and $navig.showtitles != 0)
or count($next) > 0"/>
<xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'">
<div class="navheader">
<xsl:if test="$row1 or $row2">
<table width="100%" summary="Navigation header">
<xsl:if test="$row1">
<tr>
<th colspan="3" align="center">
<xsl:apply-templates select="." mode="object.title.markup"/>
</th>
</tr>
</xsl:if>
<xsl:if test="$row2">
<tr>
<td width="20%" align="{$direction.align.start}">
<xsl:choose>
<xsl:when test="count($prev)>0">
<a accesskey="p">
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="$prev"/>
</xsl:call-template>
</xsl:attribute>
<xsl:call-template name="navig.content">
<xsl:with-param name="direction" select="'prev'"/>
</xsl:call-template>
</a>
</xsl:when>
<!-- PATCH: if prev is empty, add a link to www.gimp.org -->
<xsl:otherwise>
<a>
<xsl:attribute name="href">https://www.gimp.org</xsl:attribute>
<img>
<xsl:attribute name="src">
<xsl:value-of select="$navig.graphics.path"/>
<xsl:value-of select="'gimp-org'"/>
<xsl:value-of select="$navig.graphics.extension"/>
</xsl:attribute>
<xsl:attribute name="alt">gimp.org</xsl:attribute>
</img>
</a>
</xsl:otherwise>
</xsl:choose>
</td>
<th width="60%" align="center">
<xsl:choose>
<xsl:when test="count($up) > 0
and generate-id($up) != generate-id($home)
and $navig.showtitles != 0">
<xsl:apply-templates select="$up" mode="object.title.markup"/>
</xsl:when>
<xsl:otherwise> </xsl:otherwise>
</xsl:choose>
</th>
<td width="20%" align="{$direction.align.end}">
<xsl:text> </xsl:text>
<xsl:if test="count($next)>0">
<a accesskey="n">
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="$next"/>
</xsl:call-template>
</xsl:attribute>
<xsl:call-template name="navig.content">
<xsl:with-param name="direction" select="'next'"/>
</xsl:call-template>
</a>
</xsl:if>
</td>
</tr>
</xsl:if>
</table>
</xsl:if>
<xsl:if test="$header.rule != 0">
<hr/>
</xsl:if>
<xsl:if test="$gimp.help.languageselector != 0">
<div class="show_other_language">
<xsl:variable name="filename">
<xsl:call-template name="href.target" />
</xsl:variable>
<xsl:call-template name="gimp.help.linguas.tokenize">
<xsl:with-param name="linguas" select="normalize-space($gimp.help.all_linguas)"/>
<xsl:with-param name="filename" select="$filename" />
</xsl:call-template>
</div>
</xsl:if>
</div>
</xsl:if>
</xsl:template>
<xsl:template name="footer.navigation">
<xsl:param name="prev" select="/foo"/>
<xsl:param name="next" select="/foo"/>
<xsl:param name="nav.context"/>
<xsl:variable name="home" select="/*[1]"/>
<xsl:variable name="up" select="parent::*"/>
<xsl:variable name="row1" select="count($prev) > 0 or count($up) > 0
or count($next) > 0"/>
<xsl:variable name="row2" select="($prev and $navig.showtitles != 0)
or (generate-id($home) != generate-id(.)
or $nav.context = 'toc')
or ($chunk.tocs.and.lots != 0
and $nav.context != 'toc')
or ($next and $navig.showtitles != 0)"/>
<xsl:if test="$suppress.navigation = '0' and $suppress.footer.navigation = '0'">
<div class="navfooter">
<xsl:if test="$footer.rule != 0">
<hr/>
</xsl:if>
<xsl:if test="$row1 or $row2">
<table width="100%" summary="Navigation footer">
<xsl:if test="$row1">
<tr>
<td width="40%" align="left">
<xsl:if test="count($prev)>0">
<a accesskey="p">
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="$prev"/>
</xsl:call-template>
</xsl:attribute>
<xsl:call-template name="navig.content">
<xsl:with-param name="direction" select="'prev'"/>
</xsl:call-template>
</a>
</xsl:if>
<xsl:text> </xsl:text>
</td>
<td width="20%" align="center">
<xsl:choose>
<xsl:when test="count($up)>0 and generate-id($up) != generate-id($home)">
<a accesskey="u">
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="$up"/>
</xsl:call-template>
</xsl:attribute>
<xsl:call-template name="navig.content">
<xsl:with-param name="direction" select="'up'"/>
</xsl:call-template>
</a>
</xsl:when>
<xsl:otherwise> </xsl:otherwise>
</xsl:choose>
</td>
<td width="40%" align="right">
<xsl:text> </xsl:text>
<xsl:if test="count($next)>0">
<a accesskey="n">
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="$next"/>
</xsl:call-template>
</xsl:attribute>
<xsl:call-template name="navig.content">
<xsl:with-param name="direction" select="'next'"/>
</xsl:call-template>
</a>
</xsl:if>
</td>
</tr>
</xsl:if>
<xsl:if test="$row2">
<tr>
<td width="40%" align="left" valign="top">
<xsl:if test="$navig.showtitles != 0 and count($prev)>0">
<a accesskey="p">
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="$prev"/>
</xsl:call-template>
</xsl:attribute>
<xsl:apply-templates select="$prev" mode="object.title.markup"/>
</a>
</xsl:if>
<xsl:text> </xsl:text>
</td>
<td width="20%" align="center">
<xsl:choose>
<xsl:when test="$home != . or $nav.context = 'toc'">
<a accesskey="h">
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="$home"/>
</xsl:call-template>
</xsl:attribute>
<xsl:call-template name="navig.content">
<xsl:with-param name="direction" select="'home'"/>
</xsl:call-template>
</a>
<xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
<xsl:text> | </xsl:text>
</xsl:if>
</xsl:when>
<xsl:otherwise> </xsl:otherwise>
</xsl:choose>
<xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
<a accesskey="t">
<xsl:attribute name="href">
<xsl:apply-templates select="/*[1]" mode="recursive-chunk-filename"/>
<xsl:text>-toc</xsl:text>
<xsl:value-of select="$html.ext"/>
</xsl:attribute>
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="'nav-toc'"/>
</xsl:call-template>
</a>
</xsl:if>
</td>
<td width="40%" align="right" valign="top">
<xsl:text> </xsl:text>
<xsl:if test="$navig.showtitles != 0 and count($next) > 0">
<a accesskey="n">
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="$next"/>
</xsl:call-template>
</xsl:attribute>
<xsl:apply-templates select="$next" mode="object.title.markup"/>
</a>
</xsl:if>
</td>
</tr>
</xsl:if>
</table>
</xsl:if>
<a>
<xsl:attribute name="href">
<xsl:value-of select="$gimp.reportbug.url"/>
</xsl:attribute>
<xsl:attribute name="class">
<xsl:value-of select="$gimphelp.reportbug/@id"/>
</xsl:attribute>
<xsl:value-of select="$gimp.reportbug.text" />
</a>
<a>
<xsl:attribute name="href">
<xsl:value-of select="$gimphelp.reportbug/@url"/>
</xsl:attribute>
<xsl:attribute name="class">
<xsl:value-of select="$gimphelp.reportbug/@id"/>
</xsl:attribute>
<xsl:value-of select="$gimphelp.reportbug" />
</a>
</div>
</xsl:if>
</xsl:template>
<!-- ==================================================================== -->
<!-- For unknown reasons the original version of the template starting
from August 2004 would unwind the path of the sourcecode several
times into the processing of the fileref thus prepending the path
a few times into the src attribute of the img tag -->
<xsl:template name="mediaobject.filename">
<xsl:param name="object"></xsl:param>
<xsl:variable name="data" select="$object/videodata
|$object/imagedata
|$object/audiodata
|$object"/>
<xsl:variable name="filename">
<xsl:choose>
<xsl:when test="$data[@fileref]">
<xsl:value-of select="$data/@fileref"/>
</xsl:when>
<xsl:when test="$data[@entityref]">
<xsl:value-of select="unparsed-entity-uri($data/@entityref)"/>
</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="real.ext">
<xsl:call-template name="filename-extension">
<xsl:with-param name="filename" select="$filename"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="ext">
<xsl:choose>
<xsl:when test="$real.ext != ''">
<xsl:value-of select="$real.ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$graphic.default.extension"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="graphic.ext">
<xsl:call-template name="is.graphic.extension">
<xsl:with-param name="ext" select="$ext"/>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="$real.ext = ''">
<xsl:choose>
<xsl:when test="$ext != ''">
<xsl:value-of select="$filename"/>
<xsl:text>.</xsl:text>
<xsl:value-of select="$ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$filename"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="not($graphic.ext)">
<xsl:choose>
<xsl:when test="$graphic.default.extension != ''">
<xsl:value-of select="$filename"/>
<xsl:text>.</xsl:text>
<xsl:value-of select="$graphic.default.extension"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$filename"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$filename"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
|