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
19
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
20
xmlns:db="http://docbook.org/ns/docbook"
21
xmlns="http://www.w3.org/1999/xhtml"
24
<!--!!==========================================================================
25
DocBook to HTML - Callouts
27
REMARK: Describe this module
30
<!--@@==========================================================================
32
The text color for callout dingbats
34
REMARK: Describe this param
36
<xsl:param name="db2html.co.color" select="'#FFFFFF'"/>
38
<!--@@==========================================================================
39
db2html.co.background_color
40
The background color for callout dingbats
42
REMARK: Describe this param
44
<xsl:param name="db2html.co.background_color" select="'#000000'"/>
46
<!--@@==========================================================================
47
db2html.co.border_color
48
The border color for callout dingbats
50
REMARK: Describe this param
52
<xsl:param name="db2html.co.border_color" select="'#000000'"/>
54
<!--@@==========================================================================
55
db2html.co.color.hover
56
The text color for callout dingbats when hovering
58
REMARK: Describe this param
60
<xsl:param name="db2html.co.color.hover" select="'#FFFFFF'"/>
62
<!--@@==========================================================================
63
db2html.co.background_color.hover
64
The background color for callout dingbats when hovering
66
REMARK: Describe this param
68
<xsl:param name="db2html.co.background_color.hover" select="'#333333'"/>
70
<!--@@==========================================================================
71
db2html.co.border_color.hover
72
The border color for callout dingbats when hovering.
74
REMARK: Describe this param
76
<xsl:param name="db2html.co.border_color.hover" select="'#333333'"/>
79
<!--**==========================================================================
81
Creates a callout dingbat for a #{co} element
82
$co: The #{co} element to create a callout dingbat for
84
REMARK: Describe this template
86
<xsl:template name="db2html.co.dingbat">
87
<xsl:param name="co" select="."/>
89
<xsl:value-of select="count(preceding::co) + count(preceding::db:co) + 1"/>
94
<!--**==========================================================================
96
Renders a callout dingbat for each #{co} referenced in ${arearefs}
97
$arearefs: A space-separated list of #{co} elements
99
REMARK: Describe this template
101
<xsl:template name="db2html.co.dingbats">
102
<xsl:param name="arearefs" select="@arearefs"/>
107
<!--**==========================================================================
109
Outputs CSS that controls the appearance of callouts
111
REMARK: Describe this template
113
<xsl:template name="db2html.callout.css">
116
margin-left: 0.2em; margin-right: 0.2em;
117
padding-left: 0.4em; padding-right: 0.4em;
118
border: solid 1px </xsl:text>
119
<xsl:value-of select="$db2html.co.border_color"/><xsl:text>;
120
-moz-border-radius: 8px;
121
background-color: </xsl:text>
122
<xsl:value-of select="$db2html.co.background_color"/><xsl:text>;
124
<xsl:value-of select="$db2html.co.color"/><xsl:text>;
128
border-color: </xsl:text>
129
<xsl:value-of select="$db2html.co.border_color.hover"/><xsl:text>;
130
background-color: </xsl:text>
131
<xsl:value-of select="$db2html.co.background_color.hover"/><xsl:text>;
133
<xsl:value-of select="$db2html.co.color.hover"/><xsl:text>;
135
span.co a { text-decoration: none; }
136
span.co a:hover { text-decoration: none; }
141
<!-- == Matched Templates == -->
144
<xsl:template match="co | db:co">
145
<xsl:call-template name="db2html.co.dingbat"/>