~ubuntu-branches/ubuntu/vivid/yelp-xsl/vivid-proposed

« back to all changes in this revision

Viewing changes to xslt/docbook/html/db2html-callout.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2010-11-29 10:00:13 UTC
  • Revision ID: james.westby@ubuntu.com-20101129100013-1fxze8fm1fegxl8w
Tags: upstream-2.31.6
ImportĀ upstreamĀ versionĀ 2.31.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
 
2
<!--
 
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
 
6
later version.
 
7
 
 
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
 
11
details.
 
12
 
 
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
 
16
02111-1307, USA.
 
17
-->
 
18
 
 
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"
 
22
                version="1.0">
 
23
 
 
24
<!--!!==========================================================================
 
25
DocBook to HTML - Callouts
 
26
 
 
27
REMARK: Describe this module
 
28
-->
 
29
 
 
30
<!--@@==========================================================================
 
31
db2html.co.color
 
32
The text color for callout dingbats
 
33
 
 
34
REMARK: Describe this param
 
35
-->
 
36
<xsl:param name="db2html.co.color" select="'#FFFFFF'"/>
 
37
 
 
38
<!--@@==========================================================================
 
39
db2html.co.background_color
 
40
The background color for callout dingbats
 
41
 
 
42
REMARK: Describe this param
 
43
-->
 
44
<xsl:param name="db2html.co.background_color" select="'#000000'"/>
 
45
 
 
46
<!--@@==========================================================================
 
47
db2html.co.border_color
 
48
The border color for callout dingbats
 
49
 
 
50
REMARK: Describe this param
 
51
-->
 
52
<xsl:param name="db2html.co.border_color" select="'#000000'"/>
 
53
 
 
54
<!--@@==========================================================================
 
55
db2html.co.color.hover
 
56
The text color for callout dingbats when hovering
 
57
 
 
58
REMARK: Describe this param
 
59
-->
 
60
<xsl:param name="db2html.co.color.hover" select="'#FFFFFF'"/>
 
61
 
 
62
<!--@@==========================================================================
 
63
db2html.co.background_color.hover
 
64
The background color for callout dingbats when hovering
 
65
 
 
66
REMARK: Describe this param
 
67
-->
 
68
<xsl:param name="db2html.co.background_color.hover" select="'#333333'"/>
 
69
 
 
70
<!--@@==========================================================================
 
71
db2html.co.border_color.hover
 
72
The border color for callout dingbats when hovering.
 
73
 
 
74
REMARK: Describe this param
 
75
-->
 
76
<xsl:param name="db2html.co.border_color.hover" select="'#333333'"/>
 
77
 
 
78
 
 
79
<!--**==========================================================================
 
80
db2html.co.dingbat
 
81
Creates a callout dingbat for a #{co} element
 
82
$co: The #{co} element to create a callout dingbat for
 
83
 
 
84
REMARK: Describe this template
 
85
-->
 
86
<xsl:template name="db2html.co.dingbat">
 
87
  <xsl:param name="co" select="."/>
 
88
  <span class="co">
 
89
    <xsl:value-of select="count(preceding::co) + count(preceding::db:co) + 1"/>
 
90
  </span>
 
91
</xsl:template>
 
92
 
 
93
 
 
94
<!--**==========================================================================
 
95
db2html.co.dingbats
 
96
Renders a callout dingbat for each #{co} referenced in ${arearefs}
 
97
$arearefs: A space-separated list of #{co} elements
 
98
 
 
99
REMARK: Describe this template
 
100
-->
 
101
<xsl:template name="db2html.co.dingbats">
 
102
  <xsl:param name="arearefs" select="@arearefs"/>
 
103
  <!-- FIXME -->
 
104
</xsl:template>
 
105
 
 
106
 
 
107
<!--**==========================================================================
 
108
db2html.callout.css
 
109
Outputs CSS that controls the appearance of callouts
 
110
 
 
111
REMARK: Describe this template
 
112
-->
 
113
<xsl:template name="db2html.callout.css">
 
114
<xsl:text>
 
115
span.co {
 
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>;
 
123
  color: </xsl:text>
 
124
  <xsl:value-of select="$db2html.co.color"/><xsl:text>;
 
125
  font-size: 8px;
 
126
}
 
127
span.co:hover {
 
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>;
 
132
  color: </xsl:text>
 
133
  <xsl:value-of select="$db2html.co.color.hover"/><xsl:text>;
 
134
}
 
135
span.co a { text-decoration: none; }
 
136
span.co a:hover { text-decoration: none; }
 
137
</xsl:text>
 
138
</xsl:template>
 
139
 
 
140
 
 
141
<!-- == Matched Templates == -->
 
142
 
 
143
<!-- = co = -->
 
144
<xsl:template match="co | db:co">
 
145
  <xsl:call-template name="db2html.co.dingbat"/>
 
146
</xsl:template>
 
147
 
 
148
</xsl:stylesheet>