source: branches/samba-3.3.x/docs-xml/xslt/db2latex-xsl/xsl/para.mod.xsl

Last change on this file was 217, checked in by Herwig Bauernfeind, 16 years ago

Import Samba 3.3 branch at 3.3.0 level docs-xml (psmedley's port)

File size: 7.4 KB
Line 
1<?xml version='1.0'?>
2<!DOCTYPE xsl:stylesheet [ <!ENTITY % xsldoc.ent SYSTEM "./xsldoc.ent"> %xsldoc.ent; ]>
3<!--#############################################################################
4| $Id: para.mod.xsl,v 1.16 2004/01/13 14:17:45 j-devenish Exp $
5|- #############################################################################
6| $Author: j-devenish $
7|
8| PURPOSE:
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="para" xmlns="">
19 <referenceinfo>
20 <releaseinfo role="meta">
21 $Id: para.mod.xsl,v 1.16 2004/01/13 14:17:45 j-devenish Exp $
22 </releaseinfo>
23 <authorgroup>
24 &ramon;
25 &james;
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 <revhistory>
32 <doc:revision rcasver="1.8">&rev_2003_05;</doc:revision>
33 </revhistory>
34 </referenceinfo>
35 <title>Paragraphs <filename>para.mod.xsl</filename></title>
36 <partintro>
37 <para>The file <filename>para.mod.xsl</filename> contains the
38 XSL template for <doc:db>para</doc:db>, <doc:db>simpara</doc:db> and <doc:db>formalpara</doc:db>.</para>
39 <doc:variables>
40 <itemizedlist>
41 <listitem><simpara><xref linkend="param.latex.use.parskip"/></simpara></listitem>
42 <listitem><simpara><xref linkend="param.latex.formalpara.title.style"/></simpara></listitem>
43 </itemizedlist>
44 </doc:variables>
45 </partintro>
46 </doc:reference>
47
48 <doc:template xmlns="">
49 <refpurpose>Use normal paragraph spacing instead of parskip spacing</refpurpose>
50 <doc:description>
51 <para>
52 Uses <function condition="latex">docbooktolatexnoparskip</function>.
53 </para>
54 </doc:description>
55 <doc:variables>
56 <itemizedlist>
57 <listitem><simpara><xref linkend="param.latex.use.parskip"/></simpara></listitem>
58 </itemizedlist>
59 </doc:variables>
60 <doc:notes>
61 &essential_preamble;
62 </doc:notes>
63 </doc:template>
64 <xsl:template name="latex.noparskip">
65 <xsl:if test="$latex.use.parskip=1">
66 <xsl:text>\docbooktolatexnoparskip&#10;</xsl:text>
67 </xsl:if>
68 </xsl:template>
69
70 <doc:template xmlns="">
71 <refpurpose>Use parkip spacing, if user desires it</refpurpose>
72 <doc:description>
73 <para>
74 Uses <function condition="latex">docbooktolatexrestoreparskip</function>.
75 </para>
76 </doc:description>
77 <doc:variables>
78 <itemizedlist>
79 <listitem><simpara><xref linkend="param.latex.use.parskip"/></simpara></listitem>
80 </itemizedlist>
81 </doc:variables>
82 <doc:notes>
83 &essential_preamble;
84 </doc:notes>
85 </doc:template>
86 <xsl:template name="latex.restoreparskip">
87 <xsl:if test="$latex.use.parskip=1">
88 <xsl:text>\docbooktolatexrestoreparskip&#10;</xsl:text>
89 </xsl:if>
90 </xsl:template>
91
92 <doc:template basename="para" match="para|simpara" xmlns="">
93 <refpurpose>Process <doc:db>para</doc:db> and <doc:db>simpara</doc:db> elements</refpurpose>
94 <doc:description>
95 <para>
96 Starts new lines above and below its contents.
97 Thus, consecutive <doc:db basename="para">paras</doc:db> will have
98 one blank line between them.
99 </para>
100 </doc:description>
101 <doc:variables>
102 <itemizedlist>
103 <listitem><simpara><xref linkend="param.latex.use.parskip"/></simpara></listitem>
104 </itemizedlist>
105 </doc:variables>
106 <doc:notes>
107 <para>In &latex;, there is no distinction between <doc:db>para</doc:db> and <doc:db>simpara</doc:db>.</para>
108 <para>The accuracy of block elements within <sgmltag basename="para">paras</sgmltag> is unknown.</para>
109 <para><doc:todo>The use of <sgmltag>para</sgmltag> within <doc:db basename="footnote">footnotes</doc:db> is unproven.</doc:todo></para>
110 </doc:notes>
111 <doc:samples>
112 <simplelist type='inline'>
113 &test_blocks;
114 </simplelist>
115 </doc:samples>
116 <doc:seealso>
117 <itemizedlist>
118 <listitem><simpara><xref linkend="template.para-noline"/></simpara></listitem>
119 </itemizedlist>
120 </doc:seealso>
121 </doc:template>
122 <xsl:template match="para|simpara">
123 <xsl:text>&#10;</xsl:text>
124 <xsl:apply-templates/>
125 <xsl:text>&#10;</xsl:text>
126 </xsl:template>
127
128 <doc:template match="formalpara" xmlns="">
129 <refpurpose>Process <doc:db>formalpara</doc:db> elements</refpurpose>
130 <doc:description>
131 <para>
132 Starts new lines above and below its contents.
133 </para>
134 </doc:description>
135 <doc:variables>
136 <itemizedlist>
137 <listitem><simpara>The <doc:db>title</doc:db> is typeset using <xref linkend="param.latex.formalpara.title.style"/></simpara></listitem>
138 </itemizedlist>
139 </doc:variables>
140 <doc:notes>
141 <para>The accuracy of block elements within <doc:db basename="formalpara">formalparas</doc:db> is unknown.</para>
142 <para><doc:todo>The use of <sgmltag>formalpara</sgmltag> within <doc:db basename="footnote">footnotes</doc:db> is unproven.</doc:todo></para>
143 <para>Calls <xref linkend="template.generate.formalpara.title.delimiter"/>.</para>
144 </doc:notes>
145 <doc:samples>
146 <simplelist type='inline'>
147 &test_blocks;
148 </simplelist>
149 </doc:samples>
150 </doc:template>
151 <xsl:template match="formalpara">
152 <xsl:text>&#10;{</xsl:text>
153 <xsl:value-of select="$latex.formalpara.title.style"/>
154 <xsl:text>{{</xsl:text>
155 <xsl:apply-templates select="title"/>
156 <xsl:text>}</xsl:text>
157 <xsl:call-template name="generate.formalpara.title.delimiter"/>
158 <xsl:text>}}\ </xsl:text>
159 <xsl:apply-templates select="node()[not(self::title)]"/>
160 <xsl:text>&#10;</xsl:text>
161 </xsl:template>
162
163 <doc:template xmlns="">
164 <refpurpose>Delimite a <doc:db>formalpara</doc:db>'s <doc:db>title</doc:db> from its <doc:db>para</doc:db></refpurpose>
165 <doc:description>
166 <para>
167 Emits a full stop (period).
168 </para>
169 </doc:description>
170 <doc:variables>
171 &no_var;
172 </doc:variables>
173 <doc:notes>
174 <para>
175
176 This template can be used to emit any &LaTeX; sequence that you
177 desire. You can make the appearance be conditional upon some
178 attribute or document location, for instance. However, a
179 'space' will <emphasis>always</emphasis> be generated between
180 this delimiter and the subsequent <doc:db>para</doc:db>
181 contents.
182
183 </para>
184 </doc:notes>
185 </doc:template>
186 <xsl:template name="generate.formalpara.title.delimiter">
187 <xsl:text>.</xsl:text>
188 </xsl:template>
189
190 <doc:template basename="para" xmlns="">
191 <refpurpose>Suppressed paragraphs</refpurpose>
192 <doc:description>
193 <para>
194 These paragraphs are not separated like normal paragraphs.
195 </para>
196 </doc:description>
197 <doc:variables>
198 &no_var;
199 </doc:variables>
200 <doc:notes>
201 <para>This template exists to handle &latex; problems with
202 <function condition="latex">par</function> in certain contexts. <doc:todo>These
203 problems should be periodically reviewed by the &db2latex; team.</doc:todo></para>
204 </doc:notes>
205 <doc:samples>
206 <simplelist type='inline'>
207 &test_blocks;
208 </simplelist>
209 </doc:samples>
210 </doc:template>
211 <xsl:template match="textobject/para|step/para|entry/para|question/para" name="para-noline">
212 <xsl:if test="position()&gt;1">
213 <xsl:text> </xsl:text>
214 </xsl:if>
215 <xsl:apply-templates/>
216 <xsl:if test="position()&lt;last()">
217 <xsl:text> </xsl:text>
218 </xsl:if>
219 </xsl:template>
220
221</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.