This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[kai/samba.git] / docs / docbook / xslt / db2latex / block.mod.xsl
1 <?xml version='1.0'?>
2 <!--############################################################################# 
3 |       $Id: block.mod.xsl,v 1.1.2.1 2003/05/01 14:06:14 jelmer Exp $
4 |- #############################################################################
5 |       $Author: jelmer $
6 |                                                                                                               
7 |   PURPOSE:
8 + ############################################################################## -->
9
10 <xsl:stylesheet 
11     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
12     xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
13     exclude-result-prefixes="doc" version='1.0'>
14
15
16     <!--############################################################################# -->
17     <!-- DOCUMENTATION                                                                -->
18     <doc:reference id="block" xmlns="">
19         <referenceinfo>
20             <releaseinfo role="meta">
21                 $Id: block.mod.xsl,v 1.1.2.1 2003/05/01 14:06:14 jelmer Exp $
22             </releaseinfo>
23             <authorgroup>
24                 <author><firstname>Ramon</firstname> <surname>Casellas</surname></author>
25                 <author><firstname>James</firstname> <surname>Devenish</surname></author>
26             </authorgroup>
27             <copyright>
28                 <year>2000</year><year>2001</year><year>2002</year><year>2003</year>
29                 <holder>Ramon Casellas</holder>
30             </copyright>
31         </referenceinfo>
32         <title>Block Objects <filename>block.mod.xsl</filename></title>
33         <partintro>
34             <section><title>Introduction</title>
35                 <para>Sundry block-formatted objects.</para>
36             </section>
37         </partintro>
38     </doc:reference>
39
40
41
42         <doc:template name="block.object" xmlns="">
43         <refpurpose>
44                 Generic handler for block-formatted objects.
45         </refpurpose>
46         <refdescription>
47                 <para>
48                 Calls <xref linkend="template.label.id"/> and then applies templates.
49                 </para>
50         </refdescription>
51         </doc:template>
52
53     <xsl:template name="block.object">
54         <xsl:call-template name="label.id"/>
55         <xsl:apply-templates/>
56     </xsl:template>
57
58         <doc:template match="blockquote" xmlns="">
59         <refpurpose>
60                 A quotation set off from the main text (not inline).
61         </refpurpose>
62         <refdescription>
63                 <para>
64                 Uses the LaTeX <literal>quote</literal> environment.
65                 If an attribution is present, it will be set at the end.
66                 </para>
67         </refdescription>
68         </doc:template>
69
70     <xsl:template match="blockquote">
71         <xsl:text>\begin{quote}</xsl:text>
72         <xsl:apply-templates/>
73         <xsl:apply-templates select="attribution" mode="block.attribution"/>
74         <xsl:text>\end{quote}&#10;</xsl:text>
75     </xsl:template>
76
77         <doc:template match="epigraph" xmlns="">
78         <refpurpose>
79                 A short inscription that occurs at the beginning of a section, chapter, or document.
80         </refpurpose>
81         <refdescription>
82                 <para>
83                 Uses the LaTeX <literal>quote</literal> environment.
84                 If an attribution is present, it will be set at the end.
85                 </para>
86         </refdescription>
87         </doc:template>
88
89     <xsl:template match="epigraph">
90         <xsl:text>\begin{quote}</xsl:text>
91         <xsl:apply-templates/>
92         <xsl:apply-templates select="attribution" mode="block.attribution"/>
93         <xsl:text>\end{quote}&#10;</xsl:text>
94     </xsl:template>
95
96         <doc:template match="attribution" xmlns="">
97         <refpurpose>
98                 This template produces no output.
99         </refpurpose>
100         <refdescription>
101                 <para>
102                 The <sgmltag class="element">attribution</sgmltag> element only occurs within
103                 <xref linkend="template.blockquote"/> and <xref linkend="template.epigraph"/>.
104                 However, the templates for those elements use a <quote>mode</quote> mechanism.
105                 Therefore, this template is intentionally suppressed and a replacement exists.
106                 See <xref linkend="template.attribution-block.attribution"/> instead.
107                 </para>
108         </refdescription>
109         </doc:template>
110
111     <xsl:template match="attribution"/>
112
113         <doc:template match="attribution" mode="block.attribution" xmlns="">
114         <refpurpose>
115                 The source of a block quote or epigraph.
116         </refpurpose>
117         <refdescription>
118                 <para>
119                 Starts a new line with right-aligned text preceded by an em dash.
120                 </para>
121         </refdescription>
122         </doc:template>
123
124     <xsl:template match="attribution" mode="block.attribution">
125         <xsl:text>&#10;\hspace*\fill---</xsl:text>
126         <xsl:apply-templates/>
127     </xsl:template>
128
129         <doc:template match="sidebar" xmlns="">
130         <refpurpose>
131                 A block of text that is isolated from the main flow.
132         </refpurpose>
133         <refdescription>
134                 <para>
135                 This is formatted as a plain block.
136                 </para>
137         </refdescription>
138         </doc:template>
139
140     <xsl:template match="sidebar">
141         <xsl:call-template name="block.object"/>
142     </xsl:template>
143
144         <doc:template match="sidebar/title|blockquote/title" xmlns="">
145         <refpurpose>
146                 Title lines for sundry block elements.
147         </refpurpose>
148         <refdescription>
149                 <para>
150                 This is formatted as a line on its own.
151                 </para>
152         </refdescription>
153         </doc:template>
154
155     <xsl:template match="sidebar/title|blockquote/title">
156         <xsl:apply-templates/>
157         <xsl:text>&#10;</xsl:text>
158     </xsl:template>
159
160         <doc:template match="ackno" xmlns="">
161         <refpurpose>
162                 Acknowledgements in an Article.
163         </refpurpose>
164         <refdescription>
165                 <para>
166                 This is formatted as a plain block.
167                 </para>
168         </refdescription>
169         </doc:template>
170
171     <xsl:template match="ackno">
172         <xsl:apply-templates/>
173     </xsl:template>
174
175
176 </xsl:stylesheet>
177