1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp
" ">]
>
3 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform" version=
"1.0">
5 SWFTools documentation stylesheet.
7 Major portions shamelessly stolen from the gentoo documentation project (www.gentoo.org).
9 This file is distributed under the GPL, see file COPYING for details.
11 <xsl:output encoding=
"iso-8859-15" method=
"html" indent=
"yes" doctype-public=
"-//W3C//DTD HTML 4.01 Transitional//EN"/>
12 <xsl:preserve-space elements=
"code"/>
13 <xsl:template match=
"img">
17 <xsl:template match=
"/guide">
20 <link title=
"new" rel=
"stylesheet" href=
"caiviar.css" type=
"text/css"/>
21 <link REL=
"shortcut icon" HREF=
"/favicon.ico" TYPE=
"image/x-icon"/>
23 <xsl:value-of select=
"title"/>
26 <body style=
"margin-left:0px;margin-top:0px;" bgcolor=
"#ffffff">
30 <font class=
"dochead" align=
"center">
31 <xsl:value-of select=
"title"/>
37 <table cellspacing=
"0" cellpadding=
"0">
39 <xsl:apply-templates select=
"chapter" mode=
"toc"/>
44 <xsl:apply-templates select=
"chapter"/>
47 <table cellspacing=
"0" cellpadding=
"0">
50 <td width=
"100%" align=
"center"><!--SWFC Manual: -->__currentchapter__
</td>
60 <xsl:template match=
"chapter" mode=
"toc">
61 <xsl:variable name=
"chid2"><xsl:number/></xsl:variable>
63 chapterlink
<xsl:value-of select=
"$chid2"/>
65 <td width=
"20"> </td>
68 <xsl:template match=
"chapter">
70 <xsl:text disable-output-escaping =
"yes">
71 <!-- snip:chapter !!!
"</xsl:text><xsl:value-of select="@title
"/><xsl:text disable-output-escaping = "yes
">"!!! --
>
74 <xsl:variable name=
"chid"><xsl:number/></xsl:variable>
77 <font class=
"chapnum">
78 <a name=
"doc_chap{$chid}"><xsl:number/>.
</a>
80 <xsl:value-of select=
"@title"/>
84 <xsl:with-param name=
"chid" select=
"$chid"/>
85 </xsl:apply-templates>
87 <xsl:text disable-output-escaping =
"yes">
88 <!-- snip:/chapter --
>
92 <xsl:template match=
"mail">
93 <a href=
"mailto:{@link}">
94 <xsl:value-of select=
"."/>
99 <xsl:template match=
"section">
100 <xsl:param name=
"chid"/>
101 <xsl:variable name=
"sid"><xsl:number/></xsl:variable>
102 <xsl:if test=
"title">
104 <xsl:value-of select=
"$chid"/>.
<xsl:value-of select=
"$sid"/> 
105 <a name=
""><xsl:value-of select=
"title"/> </a>
108 <xsl:apply-templates>
109 <xsl:with-param name=
"chid" select=
"$chid"/>
110 <xsl:with-param name=
"sid" select=
"$sid"/>
111 </xsl:apply-templates>
114 <xsl:template match=
"subsection">
115 <xsl:param name=
"chid"/>
116 <xsl:param name=
"sid"/>
117 <xsl:variable name=
"ssid"><xsl:number/></xsl:variable>
118 <xsl:if test=
"title">
119 <p class=
"subsecthead">
120 <xsl:value-of select=
"$chid"/>.
<xsl:value-of select=
"$sid"/>.
<xsl:value-of select=
"$ssid"/> 
121 <a name=
""><xsl:value-of select=
"title"/> </a>
124 <xsl:apply-templates>
125 <xsl:with-param name=
"chid" select=
"$chid"/>
126 <xsl:with-param name=
"sid" select=
"$sid"/>
127 <xsl:with-param name=
"ssid" select=
"$ssid"/>
128 </xsl:apply-templates>
131 <xsl:template match=
"subsubsection">
132 <xsl:param name=
"chid"/>
133 <xsl:param name=
"sid"/>
134 <xsl:param name=
"ssid"/>
135 <xsl:variable name=
"sssid"><xsl:number/></xsl:variable>
136 <xsl:if test=
"title">
137 <p class=
"subsubsecthead">
138 <xsl:value-of select=
"$chid"/>.
<xsl:value-of select=
"$sid"/>.
<xsl:value-of select=
"$ssid"/>.
<xsl:value-of select=
"$sssid"/> 
139 <a name=
""><xsl:value-of select=
"title"/> </a>
142 <xsl:apply-templates>
143 <xsl:with-param name=
"chid" select=
"$chid"/>
144 <xsl:with-param name=
"sid" select=
"$sid"/>
145 <xsl:with-param name=
"ssid" select=
"$ssid"/>
146 <xsl:with-param name=
"sssid" select=
"$sssid"/>
147 </xsl:apply-templates>
150 <!--figure without a caption; just a graphical element-->
151 <xsl:template match=
"fig">
154 <xsl:when test=
"@linkto">
156 <img src=
"{@link}" alt=
"{@short}"/>
160 <img src=
"{@link}" alt=
"{@short}"/>
166 <xsl:template match=
"br">
170 <xsl:template match=
"note">
171 <table class=
"ncontent" width=
"100%" border=
"0" cellspacing=
"0" cellpadding=
"0">
173 <td bgcolor=
"#bbffbb">
176 <xsl:apply-templates/>
183 <xsl:template match=
"impo">
184 <table class=
"ncontent" width=
"100%" border=
"0" cellspacing=
"0" cellpadding=
"0">
186 <td bgcolor=
"#ffffbb">
189 <xsl:apply-templates/>
196 <xsl:template match=
"warn">
197 <table class=
"ncontent" width=
"100%" border=
"0" cellspacing=
"0" cellpadding=
"0">
199 <td bgcolor=
"#ffbbbb">
202 <xsl:apply-templates/>
209 <xsl:template match=
"codenote">
210 <font class=
"comment">//
<xsl:value-of select=
"."/></font>
213 <xsl:template match=
"comment">
214 <font class=
"comment">
215 <xsl:apply-templates/>
219 <xsl:template match=
"i">
221 <xsl:apply-templates/>
225 <xsl:template match=
"b">
227 <xsl:apply-templates/>
231 <xsl:template match=
"brite">
234 <xsl:apply-templates/>
239 <xsl:template match=
"c">
241 <xsl:apply-templates/>
245 <xsl:template match=
"box">
247 <xsl:apply-templates/>
251 <xsl:template match=
"shell">
252 <table class=
"ntable" width=
"100%" cellspacing=
"0" cellpadding=
"0" border=
"0">
254 <td bgcolor=
"#f0f0f0">
256 <font><xsl:apply-templates/></font>
264 <xsl:template match=
"property">
265 <table class=
"itable" width=
"100%" cellspacing=
"0" cellpadding=
"0" border=
"0">
266 <tr><td width=
"2%"></td><td></td></tr> <!-- FIXME -->
271 <font><b><xsl:apply-templates/></b></font>
275 <tr><td width=
"2%"></td><td></td></tr> <!-- FIXME -->
279 <xsl:template match=
"code">
280 <xsl:param name=
"chid"/>
281 <xsl:variable name=
"prenum">
282 <xsl:number level=
"any" from=
"chapter" count=
"code"/>
284 <xsl:variable name=
"preid">doc_chap
<xsl:value-of select=
"$chid"/>_pre
<xsl:value-of select=
"$prenum"/></xsl:variable>
286 <table class=
"ntable" width=
"100%" cellspacing=
"0" cellpadding=
"0" border=
"0">
288 <td></td><td width=
"32"></td>
289 <td class=
"infohead" bgcolor=
"#6c6cff">
292 <xsl:when test=
"@caption">
293 Code listing
<xsl:value-of select=
"$chid"/>.
<xsl:value-of select=
"$prenum"/>:
<xsl:value-of select=
"@caption"/>
296 Code listing
<xsl:value-of select=
"$chid"/>.
<xsl:value-of select=
"$prenum"/>
303 <!-- <td> is inserted by perl -->
304 [CALLPERL
<xsl:value-of select=
"@lang"/> left]
305 <xsl:apply-templates/>
307 <!-- </td> is inserted by perl -->
310 <td bgcolor=
"#e0ffff" valign=
"top">
311 [CALLPERL
<xsl:value-of select=
"@lang"/> right]
312 <xsl:apply-templates/>
320 <xsl:template match=
"f">
322 <xsl:value-of select=
"."/>
326 <xsl:template match=
"a">
327 <!-- expand templates to handle things like <a href="http://bar"><c>foo</c></a> -->
329 <xsl:when test=
"@href">
331 <xsl:apply-templates/>
335 <xsl:variable name=
"loc" select=
"."/>
337 <xsl:apply-templates/>
343 <xsl:template match=
"p">
344 <xsl:param name=
"chid"/>
346 <xsl:when test=
"@class">
348 <xsl:apply-templates>
349 <xsl:with-param name=
"chid" select=
"$chid"/>
350 </xsl:apply-templates>
355 <xsl:apply-templates>
356 <xsl:with-param name=
"chid" select=
"$chid"/>
357 </xsl:apply-templates>
363 <xsl:template match=
"title">
366 <xsl:template match=
"e">
367 <font class=
"emphasis">
368 <xsl:apply-templates/>
372 <xsl:template match=
"mail">
373 <a href=
"mailto:{@link}">
374 <xsl:value-of select=
"."/>
378 <xsl:template match=
"table">
379 <table class=
"ntable">
380 <xsl:apply-templates/>
384 <xsl:template match=
"tr">
386 <xsl:apply-templates/>
390 <xsl:template match=
"ti">
391 <td bgcolor=
"#cccccc" class=
"tableinfo">
392 <xsl:apply-templates/>
396 <xsl:template match=
"th">
397 <td bgcolor=
"#6c6cff" class=
"infohead">
399 <xsl:apply-templates/>
404 <xsl:template match=
"ul">
406 <xsl:apply-templates/>
410 <xsl:template match=
"ol">
412 <xsl:apply-templates/>
416 <xsl:template match=
"li">
418 <xsl:apply-templates/>
422 <!-- <xsl:template match="text()">
424 <xsl:value-of select="value()"/>