s3:lib/events: make use of tevent_common_loop_timer_delay()
[Samba/gebeck_regimport.git] / docs-xml / xslt / yodl.xsl
blobd33cdd6b196ed168612358ea022267fb1e5af0bb
1 <?xml version='1.0'?>
2 <!--
3 DocBook to yodl converter
5 Lacks support for a few docbook tags, but pretty much all
6 yodl macros are used
8 (C) Jelmer Vernooij 2004
9 Published under the GNU GPLv3 or later
10 -->
11 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
12 xmlns:exsl="http://exslt.org/common"
13 version="1.1">
15 <xsl:output method="text" encoding="iso-8859-1" standalone="yes" indent="no"/>
16 <xsl:strip-space elements="*"/>
18 <xsl:template match="refentry">
19 <xsl:text>manpage(</xsl:text>
20 <xsl:value-of select="refmeta/refentrytitle"/>
21 <xsl:text>)()(</xsl:text>
22 <xsl:value-of select="refmeta/manvolnum"/>
23 <xsl:text>)(package)()&#10;</xsl:text>
25 <xsl:apply-templates/>
26 </xsl:template>
28 <xsl:template match="article">
29 <xsl:text>article(</xsl:text>
30 <xsl:value-of select="title"/>
31 <xsl:text>)(</xsl:text>
32 <xsl:text>FIXME</xsl:text>
33 <xsl:text>)(</xsl:text>
34 <xsl:value-of select="articleinfo/pubdate"/>
35 <xsl:text>)</xsl:text>
36 <xsl:apply-templates/>
37 </xsl:template>
39 <xsl:template match="report">
40 <xsl:text>report(</xsl:text>
41 <xsl:value-of select="title"/>
42 <xsl:text>)(</xsl:text>
43 <xsl:text>FIXME</xsl:text>
44 <xsl:text>)(</xsl:text>
45 <xsl:value-of select="articleinfo/pubdate"/>
46 <xsl:text>)</xsl:text>
47 <xsl:apply-templates/>
48 </xsl:template>
50 <xsl:template match="book">
51 <xsl:text>book(</xsl:text>
52 <xsl:value-of select="title"/>
53 <xsl:text>)(</xsl:text>
54 <xsl:text>FIXME</xsl:text>
55 <xsl:text>)(</xsl:text>
56 <xsl:value-of select="articleinfo/pubdate"/>
57 <xsl:text>)</xsl:text>
58 <xsl:apply-templates/>
59 </xsl:template>
61 <xsl:template match="chapter">
62 <xsl:choose>
63 <xsl:when test="@id = ''">
64 <xsl:text>chapter(</xsl:text>
65 <xsl:value-of select="title"/>
66 <xsl:text>)&#10;</xsl:text>
67 </xsl:when>
68 <xsl:otherwise>
69 <xsl:text>lchapter(</xsl:text>
70 <xsl:value-of select="@id"/>
71 <xsl:text>)(</xsl:text>
72 <xsl:value-of select="title"/>
73 <xsl:text>)&#10;</xsl:text>
74 </xsl:otherwise>
75 </xsl:choose>
76 <xsl:apply-templates/>
77 </xsl:template>
79 <xsl:template match="citerefentry">
80 <xsl:value-of select="refentrytitle"/>
81 <xsl:text>(</xsl:text>
82 <xsl:value-of select="manvolnum"/>
83 <xsl:text>)</xsl:text>
84 </xsl:template>
86 <xsl:template match="para">
87 <xsl:apply-templates/>
88 <xsl:text>&#10;&#10;</xsl:text>
89 </xsl:template>
91 <xsl:template match="formalpara">
92 <xsl:text>paragraph(</xsl:text>
93 <xsl:value-of select="title"/>
94 <xsl:text>)&#10;</xsl:text>
95 <xsl:apply-templates/>
96 </xsl:template>
98 <xsl:template match="part">
99 <xsl:text>part(</xsl:text>
100 <xsl:value-of select="title"/>
101 <xsl:text>)&#10;</xsl:text>
102 <xsl:apply-templates/>
103 </xsl:template>
105 <xsl:template match="preface">
106 <xsl:text>nchapter(</xsl:text>
107 <xsl:value-of select="title"/>
108 <xsl:text>)&#10;</xsl:text>
109 <xsl:apply-templates/>
110 </xsl:template>
112 <xsl:template match="quote">
113 <xsl:text>"</xsl:text>
114 <xsl:apply-templates/>
115 <xsl:text>"</xsl:text>
116 </xsl:template>
118 <xsl:template match="parameter|filename">
119 <xsl:text>code(</xsl:text>
120 <xsl:apply-templates/>
121 <xsl:text>)</xsl:text>
122 </xsl:template>
124 <xsl:template match="emphasis">
125 <xsl:text>em(</xsl:text>
126 <xsl:apply-templates/>
127 <xsl:text>)</xsl:text>
128 </xsl:template>
130 <xsl:template match="command">
131 <xsl:text>bf(</xsl:text>
132 <xsl:apply-templates/>
133 <xsl:text>)</xsl:text>
134 </xsl:template>
136 <xsl:template match="refnamediv">
137 <xsl:text>manpagename(</xsl:text>
138 <xsl:value-of select="refname"/>
139 <xsl:text>)(</xsl:text>
140 <xsl:value-of select="refpurpose"/>
141 <xsl:text>)&#10;</xsl:text>
142 </xsl:template>
144 <xsl:template match="refsynopsisdiv">
145 <xsl:text>manpagesynopsis()</xsl:text>
146 </xsl:template>
148 <xsl:template match="refsect1|refsect2">
149 <xsl:choose>
150 <xsl:when test="title='DESCRIPTION'">
151 <xsl:text>&#10;manpagedescription()&#10;&#10;</xsl:text>
152 </xsl:when>
153 <xsl:when test="title='OPTIONS'">
154 <xsl:text>&#10;manpageoptions()&#10;&#10;</xsl:text>
155 </xsl:when>
156 <xsl:when test="title='FILES'">
157 <xsl:text>&#10;manpagefiles()&#10;&#10;</xsl:text>
158 </xsl:when>
159 <xsl:when test="title='SEE ALSO'">
160 <xsl:text>&#10;manpageseealso()&#10;&#10;</xsl:text>
161 </xsl:when>
162 <xsl:when test="title='DIAGNOSTICS'">
163 <xsl:text>&#10;manpagediagnostics()&#10;&#10;</xsl:text>
164 </xsl:when>
165 <xsl:when test="title='BUGS'">
166 <xsl:text>&#10;manpagebugs()&#10;&#10;</xsl:text>
167 </xsl:when>
168 <xsl:when test="title='AUTHOR'">
169 <xsl:text>&#10;manpageauthor()&#10;&#10;</xsl:text>
170 </xsl:when>
171 <xsl:otherwise>
172 <xsl:text>&#10;manpagesection(</xsl:text>
173 <xsl:value-of select="title"/>
174 <xsl:text>)&#10;&#10;</xsl:text>
175 </xsl:otherwise>
176 </xsl:choose>
177 <xsl:apply-templates/>
178 </xsl:template>
180 <xsl:template match="orderedlist">
181 <xsl:text>startdit()&#10;</xsl:text>
182 <xsl:for-each select="listitem">
183 <xsl:text>dit() </xsl:text>
184 <xsl:copy>
185 <xsl:apply-templates/>
186 </xsl:copy>
187 <xsl:text>&#10;</xsl:text>
188 </xsl:for-each>
189 <xsl:text>enddit()&#10;</xsl:text>
190 </xsl:template>
192 <xsl:template match="itemizedlist">
193 <xsl:text>startit()&#10;</xsl:text>
194 <xsl:for-each select="listitem">
195 <xsl:text>it() </xsl:text>
196 <xsl:copy>
197 <xsl:apply-templates/>
198 </xsl:copy>
199 <xsl:text>&#10;</xsl:text>
200 </xsl:for-each>
201 <xsl:text>endit()&#10;</xsl:text>
202 </xsl:template>
204 <xsl:template match="variablelist">
205 <xsl:text>startdit()&#10;</xsl:text>
206 <xsl:for-each select="varlistentry">
207 <xsl:text>dit(</xsl:text>
208 <xsl:copy-of select="term">
209 <xsl:apply-templates/>
210 </xsl:copy-of>
211 <xsl:text>) </xsl:text>
212 <xsl:apply-templates select="listitem/para"/>
213 <xsl:text>&#10;</xsl:text>
214 </xsl:for-each>
215 <xsl:text>enddit()&#10;</xsl:text>
216 </xsl:template>
218 <xsl:template match="anchor">
219 <xsl:text>label(</xsl:text>
220 <xsl:value-of select="@id"/>
221 <xsl:text>)&#10;</xsl:text>
222 </xsl:template>
224 <xsl:template match="footnote">
225 <xsl:text>footnote(</xsl:text>
226 <xsl:apply-templates/>
227 <xsl:text>)</xsl:text>
228 </xsl:template>
230 <xsl:template match="toc">
231 <xsl:text>gettocstring()&#10;</xsl:text>
232 </xsl:template>
234 <xsl:template match="ulink">
235 <xsl:text>&#10;</xsl:text>
236 <xsl:text>url(</xsl:text>
237 <xsl:value-of select="url"/>
238 <xsl:text>)(</xsl:text>
239 <xsl:apply-templates/>
240 <xsl:text>)</xsl:text>
241 </xsl:template>
243 <xsl:template match="link">
244 <xsl:text>lref(</xsl:text>
245 <xsl:apply-templates/>
246 <xsl:text>)(</xsl:text>
247 <xsl:value-of select="@linkend"/>
248 <xsl:text>)</xsl:text>
249 </xsl:template>
251 <xsl:template match="index">
252 <xsl:text>printindex()&#10;</xsl:text>
253 </xsl:template>
255 <xsl:template match="sect1">
256 <xsl:choose>
257 <xsl:when test="@id = ''">
258 <xsl:text>sect(</xsl:text>
259 </xsl:when>
260 <xsl:otherwise>
261 <xsl:text>lsect(</xsl:text>
262 <xsl:value-of select="@id"/>
263 <xsl:text>)(</xsl:text>
264 </xsl:otherwise>
265 </xsl:choose>
266 <xsl:value-of select="title"/>
267 <xsl:text>)&#10;</xsl:text>
268 <xsl:apply-templates/>
269 </xsl:template>
271 <xsl:template match="sect2">
272 <xsl:choose>
273 <xsl:when test="@id = ''">
274 <xsl:text>subsect(</xsl:text>
275 </xsl:when>
276 <xsl:otherwise>
277 <xsl:text>lsubsect(</xsl:text>
278 <xsl:value-of select="@id"/>
279 <xsl:text>)(</xsl:text>
280 </xsl:otherwise>
281 </xsl:choose>
282 <xsl:value-of select="title"/>
283 <xsl:text>)&#10;</xsl:text>
284 <xsl:apply-templates/>
285 </xsl:template>
287 <xsl:template match="sect3">
288 <xsl:choose>
289 <xsl:when test="@id = ''">
290 <xsl:text>subsubsect(</xsl:text>
291 </xsl:when>
292 <xsl:otherwise>
293 <xsl:text>lsubsubsect(</xsl:text>
294 <xsl:value-of select="@id"/>
295 <xsl:text>)(</xsl:text>
296 </xsl:otherwise>
297 </xsl:choose>
298 <xsl:value-of select="title"/>
299 <xsl:text>)&#10;</xsl:text>
300 <xsl:apply-templates/>
301 </xsl:template>
303 <xsl:template match="sect4">
304 <xsl:choose>
305 <xsl:when test="@id = ''">
306 <xsl:text>subsubsubsect(</xsl:text>
307 </xsl:when>
308 <xsl:otherwise>
309 <xsl:text>lsubsubsubsect(</xsl:text>
310 <xsl:value-of select="@id"/>
311 <xsl:text>)(</xsl:text>
312 </xsl:otherwise>
313 </xsl:choose>
314 <xsl:value-of select="title"/>
315 <xsl:text>)&#10;</xsl:text>
316 <xsl:apply-templates/>
317 </xsl:template>
319 <xsl:template match="*"/>
321 </xsl:stylesheet>