1
<?xml version='1.0' encoding='utf-8'?><!-- -*- indent-tabs-mode: nil -*- -->
1
<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
3
This program is free software; you can redistribute it and/or modify it under
4
the terms of the GNU Lesser General Public License as published by the Free
5
Software Foundation; either version 2 of the License, or (at your option) any
8
This program is distributed in the hope that it will be useful, but WITHOUT
9
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13
You should have received a copy of the GNU Lesser General Public License
14
along with this program; see the file COPYING.LGPL. If not, write to the
15
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3
19
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4
20
xmlns:doc="http://www.gnome.org/~shaunm/xsldoc"
21
xmlns:msg="http://www.gnome.org/~shaunm/gnome-doc-utils/l10n"
5
22
xmlns="http://www.w3.org/1999/xhtml"
6
23
exclude-result-prefixes="doc"
75
98
<xsl:template name="db2html.block">
99
<xsl:param name="indent" select="false()"/>
76
100
<xsl:param name="verbatim" select="false()"/>
78
<div class="{local-name(.)}">
102
<xsl:attribute name="class">
103
<xsl:value-of select="local-name(.)"/>
104
<xsl:if test="$indent">
105
<xsl:text> block-indent</xsl:text>
107
<xsl:if test="$verbatim">
108
<xsl:text> block-verbatim</xsl:text>
79
111
<xsl:call-template name="db2html.anchor"/>
81
<xsl:when test="$verbatim">
82
<xsl:variable name="style">
83
<xsl:if test="$verbatim">
84
<xsl:text>white-space: pre; </xsl:text>
87
<xsl:attribute name="style">
88
<xsl:value-of select="$style"/>
90
<xsl:apply-templates/>
93
<xsl:apply-templates/>
112
<xsl:apply-templates/>
109
126
<xsl:template name="db2html.blockquote">
110
<div class="{local-name(.)}">
127
<div class="{local-name(.)} block-indent">
111
128
<xsl:apply-templates select="title"/>
112
129
<blockquote class="{local-name(.)}">
113
130
<xsl:apply-templates
153
177
@startinglinenumber
155
<div class="{local-name(.)}">
180
<xsl:attribute name="class">
181
<xsl:value-of select="local-name(.)"/>
182
<xsl:if test="$indent">
183
<xsl:text> block-indent</xsl:text>
156
186
<xsl:call-template name="db2html.anchor"/>
157
187
<xsl:if test="@linenumbering = 'numbered'">
158
188
<pre class="linenumbering" style="float: left; text-align: right;"><xsl:call-template name="db.linenumbering"/></pre>
200
230
<xsl:template name="db2html.block.css">
202
div[class~="figure"] { margin-left: 2em; margin-right: 1em; }
232
*[class~="block-indent"] {
236
*[class~="block-indent"] *[class~="block-indent"] {
240
*[class~="block-verbatim"] {
203
243
pre[class~="programlisting"] {
207
245
-moz-border-radius: 8px;
208
246
overflow: auto;</xsl:text>
237
273
pre[class~="synopsis"] {
242
276
pre[class~="linenumbering"] {
243
277
<!-- This margin is important to get the line numbering
244
278
to line up vertically with the content. -->
281
-moz-border-radius: 8px;
282
border: solid 1px black;
247
285
background-color: black;
249
287
-moz-opacity: .3;
250
288
padding-right: 0.4em;
251
289
padding-left: 0.4em;
253
blockquote[class~="blockquote"] { margin-left: 2em; margin-right: 1em; }
254
291
dt[class~="glossterm"] { margin-left: 0em; }
255
dd + dt[class~="glossterm"] { margin-top: 1em; }
256
dd[class~="glossdef"] { margin-top: 0.5em; margin-left: 2em; margin-right: 1em; }
257
dd[class~="glosssee"] { margin-top: 0.5em; margin-left: 2em; margin-right: 1em; }
258
dd[class~="glossseealso"] { margin-top: 0.5em; margin-left: 2em; margin-right: 1em; }
292
dd + dt[class~="glossterm"] { margin-top: 2em; }
293
dd[class~="glossdef"]
294
{ margin-top: 1em; margin-left: 2em; margin-right: 1em; }
295
dd[class~="glosssee"]
296
{ margin-top: 1em; margin-left: 2em; margin-right: 1em; }
297
dd[class~="glossseealso"]
298
{ margin-top: 1em; margin-left: 2em; margin-right: 1em; }
307
347
<!-- = example = -->
308
348
<xsl:template match="example">
309
<xsl:call-template name="db2html.block"/>
349
<xsl:call-template name="db2html.block">
350
<xsl:with-param name="indent" select="true()"/>
312
354
<!-- = figure = -->
313
355
<xsl:template match="figure">
356
<xsl:call-template name="db2html.block">
357
<xsl:with-param name="indent" select="true()"/>
361
<!-- = formalpara = -->
362
<xsl:template match="formalpara">
314
363
<xsl:call-template name="db2html.block"/>
327
376
<dt class="glossterm">
328
377
<xsl:apply-templates select="glossterm"/>
330
<xsl:apply-templates select="glossdef | glosssee"/>
379
<xsl:apply-templates select="glossdef | glosssee[1]"/>
333
382
<!-- = glosssee = -->
334
<xsl:template match="glosssee">
335
<!-- FIXME: this i18n sucks badly -->
336
<dd class="glosssee">
383
<xsl:template match="glosssee | glossseealso">
384
<dd class="{local-name(.)}">
338
<xsl:call-template name="gettext">
339
<xsl:with-param name="msgid" select="'See'"/>
386
<xsl:call-template name="l10n.gettext">
387
<xsl:with-param name="msgid" select="concat(local-name(.), '.format')"/>
388
<xsl:with-param name="node" select="."/>
389
<xsl:with-param name="format" select="true()"/>
340
390
</xsl:call-template>
341
<xsl:text> </xsl:text>
343
<xsl:when test="@otherterm">
344
<xsl:call-template name="db2html.xref">
345
<xsl:with-param name="linkend" select="@otherterm"/>
349
<xsl:apply-templates/>
352
<xsl:text>.</xsl:text>
395
<xsl:template mode="l10n.format.mode" match="msg:glosssee">
396
<xsl:param name="node"/>
397
<xsl:for-each select="$node |
398
$node/following-sibling::*[name(.) = name($node)]">
399
<xsl:if test="position() != 1">
400
<xsl:call-template name="l10n.gettext">
401
<xsl:with-param name="msgid" select="', '"/>
405
<xsl:when test="@otherterm">
407
<xsl:attribute name="href">
408
<xsl:call-template name="db.xref.target">
409
<xsl:with-param name="linkend" select="@otherterm"/>
412
<xsl:attribute name="title">
413
<xsl:call-template name="db.xref.tooltip">
414
<xsl:with-param name="linkend" select="@otherterm"/>
419
<xsl:when test="normalize-space(.) != ''">
420
<xsl:apply-templates/>
423
<xsl:call-template name="db.xref.content">
424
<xsl:with-param name="linkend" select="@otherterm"/>
425
<xsl:with-param name="role" select="'glosssee'"/>
431
<xsl:apply-templates/>
357
437
<!-- = highlights = -->
358
438
<xsl:template match="highlights">
359
439
<xsl:call-template name="db2html.block"/>
364
444
<xsl:call-template name="db2html.block"/>
447
<!-- = informalexample = -->
448
<xsl:template match="informalexample">
449
<xsl:call-template name="db2html.block"/>
367
452
<!-- = literallayout = -->
368
453
<xsl:template match="literallayout">
369
454
<xsl:call-template name="db2html.block">
379
464
<!-- = programlisting = -->
380
465
<xsl:template match="programlisting">
381
<xsl:call-template name="db2html.pre"/>
466
<xsl:call-template name="db2html.pre">
467
<xsl:with-param name="indent" select="true()"/>
384
471
<!-- = screen = -->
385
472
<xsl:template match="screen">
386
<xsl:call-template name="db2html.pre"/>
473
<xsl:call-template name="db2html.pre">
474
<xsl:with-param name="indent" select="true()"/>
479
<xsl:template match="simpara">
480
<xsl:call-template name="db2html.para"/>
389
483
<!-- = synopsis = -->
390
484
<xsl:template match="synopsis">
391
<xsl:call-template name="db2html.pre"/>
485
<xsl:call-template name="db2html.pre">
486
<xsl:with-param name="indent" select="true()"/>
394
490
</xsl:stylesheet>