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 - Question and Answer Sets
26
:Requires: db-chunk db2html-division gettext
28
REMARK: Describe this module
32
<!--**==========================================================================
34
Outputs CSS that controls the appearance of question and answer elements
36
REMARK: Describe this template
38
<xsl:template name="db2html.qanda.css">
40
dt.question { margin-left: 0em; }
41
dt.question div.label { float: left; }
42
dd + dt.question { margin-top: 1em; }
48
dd.answer div.label { float: left; }
53
<!-- == Matched Templates == -->
56
<xsl:template match="answer | db:answer">
59
<xsl:when test="@lang or @xml:lang">
60
<xsl:attribute name="dir">
61
<xsl:call-template name="l10n.direction">
62
<xsl:with-param name="lang" select="@lang | @xml:lang"/>
66
<xsl:when test="../@lang or ../@xml:lang">
67
<xsl:attribute name="dir">
68
<xsl:call-template name="l10n.direction">
69
<xsl:with-param name="lang" select="../@lang | ../@xml:lang"/>
74
<xsl:apply-templates/>
79
<xsl:template match="qandadiv | db:qandadiv">
80
<xsl:param name="depth_in_chunk">
81
<xsl:call-template name="db.chunk.depth-in-chunk"/>
83
<xsl:param name="depth_of_chunk">
84
<xsl:call-template name="db.chunk.depth-of-chunk"/>
86
<xsl:call-template name="db2html.division.div">
87
<xsl:with-param name="info" select="blockinfo | db:info"/>
88
<xsl:with-param name="entries" select="qandaentry | db:qandaentry"/>
89
<xsl:with-param name="divisions" select="qandadiv | db:qandadiv"/>
90
<xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
91
<xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
92
<xsl:with-param name="chunk_divisions" select="false()"/>
93
<xsl:with-param name="chunk_info" select="false()"/>
94
<xsl:with-param name="autotoc_divisions" select="false()"/>
98
<!-- = qandaentry = -->
99
<xsl:template match="qandaentry | db:qandaentry">
100
<xsl:apply-templates/>
103
<!-- = qandaset = -->
104
<xsl:template match="qandaset | db:qandaset">
105
<xsl:param name="depth_in_chunk">
106
<xsl:call-template name="db.chunk.depth-in-chunk"/>
108
<xsl:param name="depth_of_chunk">
109
<xsl:call-template name="db.chunk.depth-of-chunk"/>
111
<xsl:call-template name="db2html.division.div">
112
<xsl:with-param name="info" select="blockinfo | db:info"/>
113
<xsl:with-param name="entries" select="qandaentry | db:qandaentry"/>
114
<xsl:with-param name="divisions" select="qandadiv | db:qandadiv"/>
115
<xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
116
<xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
117
<xsl:with-param name="chunk_divisions" select="false()"/>
118
<xsl:with-param name="chunk_info" select="false()"/>
119
<xsl:with-param name="autotoc_divisions" select="true()"/>
123
<!-- = question = -->
124
<xsl:template match="question | db:question">
125
<!-- FIXME: dt-first -->
126
<dt class="question">
128
<xsl:when test="@lang | @xml:lang">
129
<xsl:attribute name="dir">
130
<xsl:call-template name="l10n.direction">
131
<xsl:with-param name="lang" select="@lang | @xml:lang"/>
135
<xsl:when test="../@lang or ../@xml:lang">
136
<xsl:attribute name="dir">
137
<xsl:call-template name="l10n.direction">
138
<xsl:with-param name="lang" select="../@lang | ../@xml:lang"/>
143
<xsl:apply-templates/>