1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
4 SWFTools documentation stylesheet.
6 Major portions shamelessly stolen from the gentoo documentation project (www.gentoo.org).
8 This file is distributed under the GPL, see file COPYING for details.
10 <xsl:output encoding="iso-8859-15" method="html" indent="yes" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
11 <xsl:preserve-space elements="code"/>
12 <xsl:template match="img">
16 <xsl:template match="/guide">
19 <link title="new" rel="stylesheet" href="caiviar.css" type="text/css"/>
20 <link REL="shortcut icon" HREF="/favicon.ico" TYPE="image/x-icon"/>
22 <xsl:value-of select="title"/>
25 <body style="margin-left:0px;margin-top:0px;" bgcolor="#ffffff">
31 <font class="dochead">
32 <xsl:value-of select="title"/>
40 <img src="line.gif" alt="line"/>
44 <td class="alttext"><b>Summary:</b> <xsl:apply-templates select="abstract"/></td>
48 <img src="line.gif" alt="line"/>
53 <xsl:apply-templates select="chapter"/>
58 <xsl:template match="mail">
59 <a href="mailto:{@link}">
60 <xsl:value-of select="."/>
64 <xsl:template match="chapter">
65 <xsl:variable name="chid"><xsl:number/></xsl:variable>
67 <xsl:when test="title">
69 <font class="chapnum">
70 <a name="doc_chap{$chid}"><xsl:number/>.</a>
72 <xsl:value-of select="title"/>
77 <font class="chapnum">
78 <a name="doc_chap{$chid}"><xsl:number/>.</a>
84 <xsl:with-param name="chid" select="$chid"/>
85 </xsl:apply-templates>
88 <xsl:template match="section">
89 <xsl:param name="chid"/>
90 <xsl:variable name="sid"><xsl:number/></xsl:variable>
93 <xsl:value-of select="$chid"/>.<xsl:value-of select="$sid"/> 
94 <a name=""><xsl:value-of select="title"/> </a>
98 <xsl:with-param name="chid" select="$chid"/>
99 <xsl:with-param name="sid" select="$sid"/>
100 </xsl:apply-templates>
103 <xsl:template match="subsection">
104 <xsl:param name="chid"/>
105 <xsl:param name="sid"/>
106 <xsl:variable name="ssid"><xsl:number/></xsl:variable>
107 <xsl:if test="title">
108 <p class="subsecthead">
109 <xsl:value-of select="$chid"/>.<xsl:value-of select="$sid"/>.<xsl:value-of select="$ssid"/> 
110 <a name=""><xsl:value-of select="title"/> </a>
113 <xsl:apply-templates>
114 <xsl:with-param name="chid" select="$chid"/>
115 <xsl:with-param name="sid" select="$sid"/>
116 <xsl:with-param name="ssid" select="$ssid"/>
117 </xsl:apply-templates>
120 <xsl:template match="subsubsection">
121 <xsl:param name="chid"/>
122 <xsl:param name="sid"/>
123 <xsl:param name="ssid"/>
124 <xsl:variable name="sssid"><xsl:number/></xsl:variable>
125 <xsl:if test="title">
126 <p class="subsubsecthead">
127 <xsl:value-of select="$chid"/>.<xsl:value-of select="$sid"/>.<xsl:value-of select="$ssid"/>.<xsl:value-of select="$sssid"/> 
128 <a name=""><xsl:value-of select="title"/> </a>
131 <xsl:apply-templates>
132 <xsl:with-param name="chid" select="$chid"/>
133 <xsl:with-param name="sid" select="$sid"/>
134 <xsl:with-param name="ssid" select="$ssid"/>
135 <xsl:with-param name="sssid" select="$sssid"/>
136 </xsl:apply-templates>
139 <xsl:template match="figure">
140 <xsl:with-param name="chid"/>
141 <xsl:variable name="fignum">
142 <xsl:number level="any" from="chapter" count="figure"/>
144 <xsl:variable name="figid">doc_chap<xsl:value-of select="$chid"/>_fig<xsl:value-of select="$fignum"/></xsl:variable>
147 <table cellspacing="0" cellpadding="0" border="0">
149 <td class="infohead" bgcolor="#7a5ada">
152 <xsl:when test="@caption">
153 Figure <xsl:value-of select="$chid"/>.<xsl:value-of select="$fignum"/>: <xsl:value-of select="@caption"/>
156 Figure <xsl:value-of select="$chid"/>.<xsl:value-of select="$fignum"/>
163 <td align="center" bgcolor="#ddddff">
165 <xsl:when test="@short">
166 <img src="{@link}" alt="Fig. {$fignum}: {@short}"/>
169 <img src="{@link}" alt="Fig. {$fignum}"/>
178 <!--figure without a caption; just a graphical element-->
179 <xsl:template match="fig">
182 <xsl:when test="@linkto">
184 <img src="{@link}" alt="{@short}"/>
188 <img src="{@link}" alt="{@short}"/>
194 <xsl:template match="br">
198 <xsl:template match="note">
199 <table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0">
201 <td bgcolor="#bbffbb">
204 <xsl:apply-templates/>
211 <xsl:template match="impo">
212 <table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0">
214 <td bgcolor="#ffffbb">
217 <xsl:apply-templates/>
224 <xsl:template match="warn">
225 <table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0">
227 <td bgcolor="#ffbbbb">
230 <xsl:apply-templates/>
237 <xsl:template match="codenote">
238 <font class="comment">// <xsl:value-of select="."/></font>
241 <xsl:template match="comment">
242 <font class="comment">
243 <xsl:apply-templates/>
247 <xsl:template match="i">
249 <xsl:apply-templates/>
253 <xsl:template match="b">
255 <xsl:apply-templates/>
259 <xsl:template match="brite">
262 <xsl:apply-templates/>
267 <xsl:template match="c">
269 <xsl:apply-templates/>
273 <xsl:template match="box">
275 <xsl:apply-templates/>
279 <xsl:template match="shell">
280 <table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0">
282 <td bgcolor="#f0f0f0">
284 <font><xsl:apply-templates/></font>
292 <xsl:template match="property">
293 <table class="itable" width="100%" cellspacing="0" cellpadding="0" border="0">
294 <tr><td width="2%"></td><td></td></tr> <!-- FIXME -->
299 <font><b><xsl:apply-templates/></b></font>
303 <tr><td width="2%"></td><td></td></tr> <!-- FIXME -->
307 <xsl:template match="code">
308 <xsl:param name="chid"/>
309 <xsl:variable name="prenum">
310 <xsl:number level="any" from="chapter" count="code"/>
312 <xsl:variable name="preid">doc_chap<xsl:value-of select="$chid"/>_pre<xsl:value-of select="$prenum"/></xsl:variable>
314 <table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0">
316 <td></td><td width="32"></td>
317 <td class="infohead" bgcolor="#6c6cff">
320 <xsl:when test="@caption">
321 Code listing <xsl:value-of select="$chid"/>.<xsl:value-of select="$prenum"/>: <xsl:value-of select="@caption"/>
324 Code listing <xsl:value-of select="$chid"/>.<xsl:value-of select="$prenum"/>
331 <!-- <td> is inserted by perl -->
332 [CALLPERL <xsl:value-of select="@lang"/> left]
333 <xsl:apply-templates/>
335 <!-- </td> is inserted by perl -->
338 <td bgcolor="#e0ffff" valign="top">
339 [CALLPERL <xsl:value-of select="@lang"/> right]
340 <xsl:apply-templates/>
348 <xsl:template match="f">
350 <xsl:value-of select="."/>
354 <xsl:template match="uri">
355 <!-- expand templates to handle things like <uri link="http://bar"><c>foo</c></uri> -->
357 <xsl:when test="@link">
359 <xsl:apply-templates/>
363 <xsl:variable name="loc" select="."/>
365 <xsl:apply-templates/>
371 <xsl:template match="p">
372 <xsl:param name="chid"/>
374 <xsl:when test="@class">
376 <xsl:apply-templates>
377 <xsl:with-param name="chid" select="$chid"/>
378 </xsl:apply-templates>
383 <xsl:apply-templates>
384 <xsl:with-param name="chid" select="$chid"/>
385 </xsl:apply-templates>
391 <xsl:template match="title">
394 <xsl:template match="e">
395 <font class="emphasis">
396 <xsl:apply-templates/>
400 <xsl:template match="mail">
401 <a href="mailto:{@link}">
402 <xsl:value-of select="."/>
406 <xsl:template match="table">
407 <table class="ntable">
408 <xsl:apply-templates/>
412 <xsl:template match="tr">
414 <xsl:apply-templates/>
418 <xsl:template match="ti">
419 <td bgcolor="#cccccc" class="tableinfo">
420 <xsl:apply-templates/>
424 <xsl:template match="th">
425 <td bgcolor="#6c6cff" class="infohead">
427 <xsl:apply-templates/>
432 <xsl:template match="ul">
434 <xsl:apply-templates/>
438 <xsl:template match="ol">
440 <xsl:apply-templates/>
444 <xsl:template match="li">
446 <xsl:apply-templates/>
450 <!-- <xsl:template match="text()">
452 <xsl:value-of select="value()"/>