/[gentoo]/xml/htdocs/xsl/guide.xsl
Gentoo

Diff of /xml/htdocs/xsl/guide.xsl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.66 Revision 1.177
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
3 xmlns:exslt="http://exslt.org/common"
4 xmlns:func="http://exslt.org/functions"
5 extension-element-prefixes="exslt func" >
6
3 <xsl:output encoding="UTF-8" method="html" indent="yes" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/> 7<xsl:output encoding="UTF-8" method="html" indent="yes" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>
8
9<!-- Include external stylesheets -->
10<xsl:include href="content.xsl" />
11<xsl:include href="handbook.xsl" />
12<xsl:include href="inserts.xsl" />
13
14<!-- When using <pre>, whitespaces should be preserved -->
4 <xsl:preserve-space elements="pre"/> 15<xsl:preserve-space elements="pre"/>
16
17<!-- Global definition of style parameter -->
18<xsl:param name="style">0</xsl:param>
19<xsl:param name="newsitemcount">6</xsl:param>
20
21<!-- Category from metadoc -->
22<xsl:param name="catid">0</xsl:param>
23
24<!-- img tag -->
5 <xsl:template match="img"> 25<xsl:template match="img">
6 <img src="{@src}"/> 26 <img src="{@src}" alt=""/>
7 </xsl:template> 27</xsl:template>
8 <xsl:template match="/guide">
9 <html>
10 <head>
11<link title="new" rel="stylesheet" href="/css/main.css" type="text/css"/>
12 <link REL="shortcut icon" HREF="http://www.gentoo.org/favicon.ico" TYPE="image/x-icon"/>
13 <title>Gentoo Linux
14 <xsl:choose><xsl:when test="/guide/@type='project'">
15 Projects
16 </xsl:when><xsl:when test="/guide/@type='newsletter'">
17 Newsletter
18 </xsl:when><xsl:otherwise>
19 Documentation
20 </xsl:otherwise></xsl:choose>
21--
22 <xsl:choose><xsl:when test="subtitle"><xsl:if test="/guide/@type!='newsletter'"><xsl:value-of select="title"/>:</xsl:if> <xsl:value-of select="subtitle"/></xsl:when><xsl:otherwise><xsl:value-of select="title"/></xsl:otherwise></xsl:choose></title>
23 </head>
24 <body style="margin-left:0px;margin-top:0px;" bgcolor="#ffffff">
25 <!--<table border="0" width="100%" cellspacing="0" cellpadding="0">-->
26 <table width="100%" border="0" cellspacing="0" cellpadding="0">
27 <tr>
28 <td valign="top" height="125" bgcolor="#45347b">
29 <table cellspacing="0" cellpadding="0" border="0" width="193">
30 <tr>
31 <td class="logobg" valign="top" align="center" height="88">
32 <a href="/">
33 <img border="0" src="/images/gtop-s.jpg" alt="Gentoo Logo"/>
34 </a>
35 </td>
36 </tr>
37 <tr>
38 <td class="logobg" valign="top" align="center" height="36">
39 <a href="/">
40 <img border="0" src="/images/gbot-s.gif" alt="Gentoo Logo Side"/>
41 </a>
42 </td>
43</tr>
44 </table>
45
46
47 </td>
48</tr>
49 <tr>
50 <td valign="top" align="right" colspan="1" bgcolor="#ffffff">
51<!--content begin-->
52<!--Netscape 4.7 hack table start-->
53<!--<table border="0" cellspacing="5" cellpadding="0" height="100%" width="100%">-->
54 <table border="0" cellspacing="0" cellpadding="0" width="100%">
55 <tr>
56 <td width="99%" class="content" valign="top" align="left">
57 <br/>
58 <p class="dochead">
59 <xsl:choose>
60 <xsl:when test="/guide/subtitle"><xsl:value-of select="/guide/title"/>: <xsl:value-of select="/guide/subtitle"/></xsl:when>
61 <xsl:otherwise>
62 <xsl:value-of select="/guide/title"/>
63 </xsl:otherwise>
64 </xsl:choose>
65 </p>
66<!-- <p>
67 <xsl:apply-templates select="author"/>
68 28
69 </p> --> 29<xsl:template name="show-disclaimer">
70 <form name="contents" action="http://www.gentoo.org"><b>Contents</b>: 30 <!-- Disclaimer stuff -->
71 <select name="url" size="1" OnChange="location.href=form.url.options[form.url.selectedIndex].value" style="font-family:Arial,Helvetica, sans-serif; font-size:10"><xsl:for-each select="chapter"><xsl:variable name="chapid">doc_chap<xsl:number/></xsl:variable><option value="#{$chapid}"><xsl:number/>. <xsl:value-of select="title"/></option> 31 <xsl:if test="/*[1][@disclaimer] or /*[1][@redirect]">
72 32 <table class="ncontent" align="center" width="90%" border="2px" cellspacing="0" cellpadding="4px">
73 </xsl:for-each></select></form> 33 <xsl:if test="/*[1]/@disclaimer='obsolete'">
74 <xsl:apply-templates select="chapter"/> 34 <xsl:attribute name="style">margin-top:40px;margin-bottom:30px</xsl:attribute>
75 <br/> 35 </xsl:if>
76 <xsl:if test="/guide/license">
77 <xsl:apply-templates select="license" />
78 </xsl:if>
79 <br/>
80<!--content end-->
81 </td>
82 <td width="1%" bgcolor="#dddaec" valign="top">
83 <table border="0" cellspacing="5" cellpadding="0">
84 <tr>
85 <td>
86 <img src="/images/line.gif" alt="line"/>
87 </td>
88 </tr>
89 <tr>
90 <td align="center" class="alttext">
91 Updated <xsl:value-of select="/guide/date"/>
92 </td>
93 </tr>
94 <tr>
95 <td>
96 <img src="/images/line.gif" alt="line"/>
97 </td>
98 </tr>
99 <tr>
100 <td class="alttext">
101 <xsl:apply-templates select="/guide/author"/>
102 </td>
103 </tr>
104 <tr>
105 <td>
106 <img src="/images/line.gif" alt="line"/>
107 </td>
108 </tr>
109 <tr>
110 <td class="alttext"><b>Summary:</b>&#160;<xsl:apply-templates select="abstract"/></td>
111 </tr>
112 <tr>
113 <td>
114 <img src="/images/line.gif" alt="line"/>
115 </td>
116 </tr>
117 <tr>
118 <td align="center">
119<!-- Begin PayPal Logo -->
120 <p class="alttext"><b>Donate</b> to support our development efforts.</p>
121 <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
122 <input type="hidden" name="cmd" value="_xclick"/>
123 <input type="hidden" name="business" value="drobbins@gentoo.org"/>
124 <input type="hidden" name="item_name" value="Gentoo Linux Support"/>
125 <input type="hidden" name="item_number" value="1000"/>
126 <input type="hidden" name="image_url" value="/images/paypal.png"/>
127 <input type="hidden" name="no_shipping" value="1"/>
128 <input type="hidden" name="return" value="http://www.gentoo.org"/>
129 <input type="hidden" name="cancel_return" value="http://www.gentoo.org"/>
130 <input type="image" src="http://images.paypal.com/images/x-click-but21.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"/>
131 </form>
132 </td>
133 </tr>
134 <tr>
135 <td>
136 <img src="/images/line.gif" alt="line"/>
137 </td>
138 </tr>
139 <tr>
140 <td align="center">
141 <a href="http://store.gentoo.org">
142 <img src="/images/store.png" alt="The Gentoo Linux Store" border="0"/>
143 </a>
144 </td>
145 </tr>
146 <tr>
147 <td>
148 <img src="/images/line.gif" alt="line"/>
149 </td>
150 </tr><tr>
151 <td align="center">
152 <p class="alttext">Win4Lin from <b>NeTraverse</b> lets you run Windows applications under Gentoo Linux at native speeds.</p>
153 <a href="http://www.netraverse.com/gentoo.htm" target="_top">
154 <img src="/images/netraverse-gentoo.gif" width="125" height="102" alt="Win4Lin at NeTraverse" border="0"/>
155 </a>
156 <p class="alttext"><a href="http://www.netraverse.com/gentoo.htm">Purchase Win4Lin "Gentoo Edition"</a> and you'll also get a special Gentoo discount. Every sale also helps support Gentoo Linux development :)</p>
157 </td>
158 </tr>
159 <tr>
160 <td>
161 <img src="/images/line.gif" alt="line"/>
162 </td>
163 </tr>
164 <tr>
165 <td align="center">
166 <a href="http://www.qksrv.net/click-477620-5032687" target="_top">
167 <img src="http://www.qksrv.net/image-477620-5032687" width="125" height="125" alt="DDR Memory at Crucial.com" border="0"/>
168 </a>
169 <p class="alttext">Purchase RAM from <b>Crucial.com</b> and a percentage of your sale will go towards further Gentoo Linux development.</p>
170 </td>
171 </tr>
172 <tr>
173 <td>
174 <img src="/images/line.gif" alt="line"/>
175 </td>
176 </tr>
177 <tr>
178 <td align="center">
179 <a href="http://www.tek.net" target="_top">
180 <img src="/images/tek-gentoo.gif" width="125" height="125" alt="Tek Alchemy" border="0"/>
181 </a>
182 <p class="alttext">Tek Alchemy offers dedicated servers and other hosting solutions running Gentoo Linux.</p>
183 </td>
184 </tr>
185 <tr>
186 <td>
187 <img src="/images/line.gif" alt="line"/>
188 </td>
189 </tr>
190 </table>
191 </td>
192 </tr>
193 </table>
194<!--Netscape 4.7 hack end-->
195 </td>
196 </tr>
197 <tr>
198 <td colspan="2" align="right" class="infohead" width="100%" bgcolor="#7a5ada">
199 Copyright 2001-2003 Gentoo Technologies, Inc. Questions, Comments, Corrections? Email <a class="highlight" href="mailto:www@gentoo.org">www@gentoo.org</a>.
200 </td>
201 </tr>
202 </table>
203 </body>
204 </html>
205 </xsl:template>
206 <xsl:template match="/mainpage | /news | /email">
207 <html>
208 <head>
209 <link title="new" rel="stylesheet" href="/css/main.css" type="text/css"/>
210 <link REL="shortcut icon" HREF="/favicon.ico" TYPE="image/x-icon"/>
211 <xsl:if test="/mainpage/@id='news'"><link rel="alternate" type="application/rss+xml" title="Gentoo Linux News RDF" href="http://www.gentoo.org/rdf/en/gentoo-news.rdf" /></xsl:if>
212 <xsl:choose>
213 <xsl:when test="/mainpage | /news">
214 <title>Gentoo Linux -- <xsl:value-of select="title"/></title>
215 </xsl:when>
216 <xsl:when test="/email">
217 <title><xsl:value-of select="subject"/></title>
218 </xsl:when>
219 </xsl:choose>
220 </head>
221 <body style="margin-left:0px;margin-top:0px;" bgcolor="#000000">
222<!--<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">-->
223 <table border="0" width="100%" cellspacing="0" cellpadding="0">
224 <tr>
225 <td valign="top" height="125" width="1%" bgcolor="#45347b">
226 <table cellspacing="0" cellpadding="0" border="0" width="100%">
227 <tr>
228 <td class="logobg" valign="top" align="center" height="88">
229 <a href="/">
230 <img border="0" src="/images/gtop-s.jpg" alt="Gentoo Logo"/>
231 </a>
232 </td>
233 </tr>
234 <tr>
235 <td class="logobg" valign="top" align="center" height="36">
236 <a href="/">
237 <img border="0" src="/images/gbot-s.gif" alt="Gentoo Logo Side"/>
238 </a>
239 </td>
240 </tr>
241 </table>
242 </td>
243 <td valign="bottom" align="left" bgcolor="#000000" colspan="2">
244 <p class="menu">
245 <xsl:choose>
246 <xsl:when test="/mainpage/@id='news'">
247 <a class="highlight" href="/">News</a> |
248 </xsl:when>
249 <xsl:otherwise>
250 <a class="menulink" href="/">News</a> |
251 </xsl:otherwise>
252 </xsl:choose>
253 <xsl:choose>
254 <xsl:when test="/mainpage/@id='about'">
255 <a class="highlight" href="/main/en/about.xml">About</a> |
256 </xsl:when>
257 <xsl:otherwise>
258 <a class="menulink" href="/main/en/about.xml">About</a> |
259 </xsl:otherwise>
260 </xsl:choose>
261 <xsl:choose>
262 <xsl:when test="/mainpage/@id='contract'">
263 <a class="highlight" href="/main/en/contract.xml">Social Contract</a> |
264 </xsl:when>
265 <xsl:otherwise>
266 <a class="menulink" href="/main/en/contract.xml">Social Contract</a> |
267 </xsl:otherwise>
268 </xsl:choose>
269 <xsl:choose>
270 <xsl:when test="/mainpage/@id='docs'">
271 <a class="highlight" href="/main/en/docs.xml">Docs</a> |
272 </xsl:when>
273 <xsl:otherwise>
274 <a class="menulink" href="/main/en/docs.xml">Docs</a> |
275 </xsl:otherwise>
276 </xsl:choose>
277<a class="menulink" href="http://forums.gentoo.org">Forums</a> |
278 <xsl:choose>
279 <xsl:when test="/mainpage/@id='lists'">
280 <a class="highlight" href="/main/en/lists.xml">Lists</a> |
281 </xsl:when>
282 <xsl:otherwise>
283 <a class="menulink" href="/main/en/lists.xml">Lists</a> |
284 </xsl:otherwise>
285 </xsl:choose>
286<a class="menulink" href="/main/en/shots.xml">ScreenShots</a> |
287 <a class="menulink" href="http://bugs.gentoo.org">Bugs</a> |
288 <a class="menulink" href="http://store.gentoo.org">Store</a> |
289 <xsl:choose>
290 <xsl:when test="/mainpage/@id='newsletter'">
291 <a class="highlight" href="/news/en/gwn/gwn.xml"> GWN</a> |
292 </xsl:when>
293 <xsl:otherwise>
294 <a class="menulink" href="/news/en/gwn/gwn.xml"> GWN</a> |
295 </xsl:otherwise>
296 </xsl:choose>
297 <xsl:choose>
298 <xsl:when test="/mainpage/@id='where'">
299 <a class="highlight" href="/main/en/where.xml">Get Gentoo!</a> |
300 </xsl:when>
301 <xsl:otherwise>
302 <a class="menulink" href="/main/en/where.xml">Get Gentoo!</a> |
303 </xsl:otherwise>
304 </xsl:choose>
305 <xsl:choose>
306 <xsl:when test="/mainpage/@id='sponsors'">
307 <a class="highlight" href="/main/en/sponsors.xml">Sponsors</a>
308 </xsl:when>
309 <xsl:otherwise>
310 <a class="menulink" href="/main/en/sponsors.xml">Sponsors</a>
311 </xsl:otherwise>
312 </xsl:choose>
313 </p>
314 </td>
315
316
317 </tr>
318 <tr>
319 <td valign="top" align="right" width="1%" bgcolor="#dddaec">
320 <table width="100%" cellspacing="0" cellpadding="0" border="0">
321 <tr>
322 <td height="1%" valign="top" align="right">
323 <img src="/images/gridtest.gif" alt="Gentoo Spaceship"/>
324 </td>
325 </tr>
326 <tr>
327 <td height="99%" valign="top" align="right">
328<!--info goes here-->
329 <table cellspacing="0" cellpadding="5" border="0">
330 <tr>
331 <td valign="top">
332 <p class="altmenu">
333 <!-- disable search for now
334 Search gentoo.org:<table border="0" cellspacing="0" cellpadding="0"><tr><td>
335 <form method="get" action="http://www.gentoo.org/cgi-bin/perlfect/search/search.pl">
336 <input type="hidden" name="p" value="1"/>
337 <input type="hidden" name="lang" value="en"/>
338 <input type="hidden" name="include" value=""/>
339 <input type="hidden" name="exclude" value=""/>
340 <input type="hidden" name="penalty" value="0"/>
341 <input type="hidden" name="mode" value="all"/>
342 <input type="text" name="q"/>
343 </form>
344 </td></tr></table>
345 <br/>
346 -->
347 Documentation:
348 <br/>
349 <a class="altlink" href="/main/en/about.xml">About Gentoo Linux</a>
350 <br/>
351 <a class="altlink" href="/main/en/docs.xml#top">User Docs</a>
352 <br/>
353 <a class="altlink" href="/main/en/docs.xml#doc_chap2_sect1">Developer Docs</a>
354 <br/>
355 <a class="altlink" href="/main/en/docs.xml#doc_chap3">Other Docs/Translations</a>
356 <br/>
357 <a class="altlink" href="/main/en/contract.xml">Social Contract</a>
358 <br/><br/>
359 Installation:
360 <br/>
361 <a class="altlink" href="/doc/en/gentoo-x86-install.xml">Gentoo Linux/x86</a>
362 <br/>
363 <a class="altlink" href="/doc/en/gentoo-ppc-install.xml">Gentoo Linux/PowerPC</a>
364 <br/>
365 <a class="altlink" href="/doc/en/gentoo-sparc-install.xml">Gentoo Linux/Sparc</a>
366 <br/>
367 <a class="altlink" href="/doc/en/gentoo-hppa-install.xml">Gentoo Linux/HPPA</a>
368 <br/><br/>
369 Resources:
370 <br/>
371 <a class="altlink" href="/main/en/lists.xml">Mailing lists</a>
372 <br/>
373 <a class="altlink" href="http://forums.gentoo.org">Discussion forums</a>
374 <br/>
375 <a class="hotlink" href="/dyn/index-cvs.xml">Daily CVS ChangeLog</a>
376 <br/>
377 <a class="altlink" href="/main/en/devlist.xml">Developer List</a>
378 <br/>
379 <a class="altlink" href="http://bugs.gentoo.org">Bugzilla bug tracker</a>
380 <br/>
381 <a class="altlink" href="/main/en/mirrors.xml">Download Mirrors</a>
382 <br/>
383 <a class="altlink" href="/main/en/irc.xml">Official Gentoo IRC channels</a>
384 <br/>
385 <a class="altlink" href="/dyn/pkgs/index.xml">Online package database</a>
386 <br/>
387 <a class="altlink" href="http://www.gentoo.org/cgi-bin/viewcvs.cgi">View our CVS via the web</a>
388 <br/>
389 <a class="altlink" href="http://stats.gentoo.org">Gentoo Usage Statistics</a>
390 <br/>
391 <a class="altlink" href="http://stable.gentoo.org">Gentoo Stable Project</a>
392 <!--<br/>
393 <a class="altlink" href="/main/en/devlist.xml">Gentoo Linux developer list</a>-->
394 <br/><br/>
395 Graphics:
396 <br/>
397 <a class="altlink" href="/main/en/graphics.xml">Logos and themes</a>
398 <br/>
399 <a class="altlink" href="/dyn/icons.xml">Icons</a>
400 <br/>
401 <a class="altlink" href="/main/en/shots.xml">ScreenShots</a>
402 <br/><br/>
403 Miscellaneous Resources:
404 <br/>
405 <a class="altlink" href="http://store.gentoo.org">Gentoo Linux Store</a>
406 <br/>
407 <a class="altlink" href="/main/en/projects.xml">Gentoo-hosted projects</a>
408 <br/>
409 <a class="altlink" href="/main/en/articles.xml">IBM dW/Intel article archive</a>
410
411 <xsl:if test="/mainpage/@id='news'">
412 <br/><br/>
413 Older News:<br/>
414 <xsl:for-each select="document('/dyn/news-index.xml')/uris/uri[position()&gt;=7][position()&lt;20]/text()">
415 <xsl:variable name="newsuri" select="."/>
416 <a class="altlink" href="{$newsuri}"><xsl:value-of select="document(.)/news/title"/></a><br/>
417 </xsl:for-each>
418 </xsl:if>
419 </p>
420 <br/><br />
421 </td>
422 </tr>
423 </table>
424 </td>
425 </tr>
426 </table>
427 </td>
428 <td valign="top" align="right" bgcolor="#ffffff">
429 <table border="0" cellspacing="5" cellpadding="0" width="100%">
430 <tr>
431 <td valign="top" align="left">
432 <xsl:choose>
433 <xsl:when test="/mainpage/@id='news'">
434 <table class="content" cellpadding="4" width="100%" border="0">
435 <tr>
436 <td valign="top">
437 <img src="/images/gentoo-new.gif" alt="new"/>
438 </td>
439 <!--
440 <td valign="middle">
441 We produce Gentoo Linux, a special flavor of Linux that can be automatically
442 optimized and customized for just about any application or need. Extreme
443 performance, configurability and a top-notch user and developer community are
444 all hallmarks of the Gentoo experience.
445 To learn more, <b><a href="/main/en/about.xml">click here</a></b>.
446 </td>
447 -->
448 <td valign="middle"><b>We encourage our european friends to make up their mind on a <a href="http://swpat.ffii.org/">proposed software patents legislation</a> in the European Union which will be voted on September 22nd 2003 in the European Parliament.</b></td>
449 </tr>
450 </table>
451 <br/>
452 <xsl:for-each select="document('/dyn/news-index.xml')/uris/uri[position()&lt;7]/text()">
453 <table class="content" cellpadding="4" width="100%" border="0">
454 <tr>
455 <td colspan="2" bgcolor="#7a5ada">
456 <font color="#ffffff">
457 <b>
458 <xsl:value-of select="document(.)/news/title"/>
459 </b>
460 <br/>
461 <font size="-3">Posted on <xsl:value-of select="document(.)/news/date"/> by <xsl:value-of select="document(.)/news/poster"/></font>
462 </font>
463 </td>
464 </tr>
465 <tr>
466 <td width="100" align="center" valign="middle">
467 <xsl:choose>
468 <xsl:when test="document(.)/news/@category='alpha'">
469 <img src="/images/icon-alpha.gif" alt="AlphaServer GS160"/>
470 </xsl:when>
471 <xsl:when test="document(.)/news/@category='kde'">
472 <img src="/images/icon-kde.png" alt="KDE"/>
473 </xsl:when>
474 <xsl:when test="document(.)/news/@category='gentoo'">
475 <img src="/images/icon-gentoo.png" alt="gentoo"/>
476 </xsl:when>
477 <xsl:when test="document(.)/news/@category='main'">
478 <img src="/images/icon-stick.png" alt="stick man"/>
479 </xsl:when>
480 <xsl:when test="document(.)/news/@category='ibm'">
481 <img src="/images/icon-ibm.gif" alt="ibm"/>
482 </xsl:when>
483 <xsl:when test="document(.)/news/@category='linux'">
484 <img src="/images/icon-penguin.png" alt="tux"/>
485 </xsl:when>
486 <xsl:when test="document(.)/news/@category='moo'">
487 <img src="/images/icon-cow.png" alt="Larry the Cow"/>
488 </xsl:when>
489 <xsl:when
490 test="document(.)/news/@category='plans'">
491 <img src="/images/icon-clock.png" alt="Clock"/>
492 </xsl:when>
493 <xsl:when test="document(.)/news/@category='nvidia'">
494 <img src="/images/icon-nvidia.png" alt="Nvidia"/>
495 </xsl:when>
496 </xsl:choose>
497 </td>
498 <td valign="top">
499 <xsl:choose>
500 <xsl:when test="document(.)/news/summary">
501 <xsl:apply-templates select="document(.)/news/summary"/>
502 <br/>
503 <a href="{@external}">
504 <b>(full story)</b>
505 </a>
506 </xsl:when>
507 <xsl:otherwise>
508 <xsl:apply-templates select="document(.)/news/body"/>
509 </xsl:otherwise>
510 </xsl:choose>
511 </td>
512 </tr>
513 </table>
514 <br/>
515 </xsl:for-each>
516 </xsl:when>
517 <xsl:when test="/news">
518 <table class="content" cellpadding="4" width="100%" border="0">
519 <tr>
520 <td colspan="2" bgcolor="#7a5ada">
521 <font color="#ffffff">
522 <b>
523 <xsl:value-of select="title"/>
524 </b>
525 <br/>
526 <font size="-3">Posted on <xsl:value-of select="date"/> by <xsl:value-of select="poster"/></font>
527 </font>
528 </td>
529 </tr>
530 <tr>
531 <td width="100" align="center" valign="top">
532 <xsl:choose>
533 <xsl:when test="@category='alpha'">
534 <img src="/images/icon-alpha.gif" alt="AlphaServer GS160"/>
535 </xsl:when>
536 <xsl:when test="@category='kde'">
537 <img src="/images/icon-kde.png" alt="KDE"/>
538 </xsl:when>
539 <xsl:when test="@category='gentoo'">
540 <img src="/images/icon-gentoo.png" alt="gentoo"/>
541 </xsl:when>
542 <xsl:when test="@category='main'">
543 <img src="/images/icon-stick.png" alt="stick man"/>
544 </xsl:when>
545 <xsl:when test="@category='ibm'">
546 <img src="/images/icon-ibm.gif" alt="IBM"/>
547 </xsl:when>
548 <xsl:when test="@category='linux'">
549 <img src="/images/icon-penguin.png" alt="Tux the Penguin"/>
550 </xsl:when>
551 <xsl:when test="@category='moo'">
552 <img src="/images/icon-cow.png" alt="Larry the Cow"/>
553 </xsl:when>
554 <xsl:when test="@category='nvidia'">
555 <img src="/images/icon-nvidia.png" alt="nvidia"/>
556 </xsl:when>
557 </xsl:choose>
558 </td>
559 <td valign="top">
560 <xsl:choose>
561 <xsl:when test="body">
562 <xsl:apply-templates select="body"/>
563 </xsl:when>
564 <xsl:when test="section">
565 <xsl:apply-templates select="section"/>
566 </xsl:when>
567 </xsl:choose>
568 </td>
569 </tr>
570 </table>
571 </xsl:when>
572 <xsl:when test="/email">
573 <xsl:apply-templates select="/email/body"/>
574 </xsl:when>
575 <xsl:otherwise>
576 <br/>
577 <table border="0" class="content">
578 <tr>
579 <td>
580 <xsl:apply-templates select="chapter"/>
581 </td>
582 </tr>
583 </table>
584 <br/>
585 <br/>
586 <br/>
587 </xsl:otherwise>
588 </xsl:choose>
589<!--content end-->
590 </td>
591 </tr>
592 </table>
593 </td>
594 <td width="1%" bgcolor="#dddaec" valign="top">
595 <table border="0" cellspacing="5" cellpadding="0">
596 <tr>
597 <td>
598 <img src="/images/line.gif" alt="line"/>
599 </td>
600 </tr>
601 <xsl:choose>
602 <xsl:when test="/mainpage/date">
603 <tr><td align="center" class="alttext">
604 Updated <xsl:value-of select="/mainpage/date"/>
605 </td></tr>
606 <tr>
607 <td>
608 <img src="/images/line.gif" alt="line"/>
609 </td>
610 </tr>
611 </xsl:when>
612 <xsl:when test="/news/date">
613 <tr><td align="center" class="alttext">
614 Updated <xsl:value-of select="/news/date"/>
615 </td></tr>
616 <tr>
617 <td>
618 <img src="/images/line.gif" alt="line"/>
619 </td>
620 </tr>
621 </xsl:when>
622 </xsl:choose>
623 <tr>
624 <td align="center">
625<!-- Begin PayPal Logo -->
626 <p class="alttext"><b>Donate</b> to support our development efforts.</p>
627 <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
628 <input type="hidden" name="cmd" value="_xclick"/>
629 <input type="hidden" name="business" value="drobbins@gentoo.org"/>
630 <input type="hidden" name="item_name" value="Gentoo Linux Support"/>
631 <input type="hidden" name="item_number" value="1000"/>
632 <input type="hidden" name="image_url" value="/images/paypal.png"/>
633 <input type="hidden" name="no_shipping" value="1"/>
634 <input type="hidden" name="return" value="http://www.gentoo.org"/>
635 <input type="hidden" name="cancel_return" value="http://www.gentoo.org"/>
636 <input type="image" src="http://images.paypal.com/images/x-click-but21.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"/>
637 </form>
638 </td>
639 </tr>
640 <tr>
641 <td>
642 <img src="/images/line.gif" alt="line"/>
643 </td>
644 </tr>
645 <tr>
646 <td align="center">
647 <a href="http://store.gentoo.org">
648 <img src="/images/store.png" alt="The Gentoo Linux Store" border="0"/>
649 </a>
650 </td>
651 </tr>
652 <tr>
653 <td>
654 <img src="/images/line.gif" alt="line"/>
655 </td>
656 </tr><tr>
657 <td align="center">
658 <p class="alttext">Win4Lin from <b>NeTraverse</b> lets you run Windows applications under Gentoo Linux at native speeds.</p>
659 <a href="http://www.netraverse.com/gentoo.htm" target="_top">
660 <img src="/images/netraverse-gentoo.gif" width="125" height="102" alt="Win4Lin at NeTraverse" border="0"/>
661 </a>
662 <p class="alttext"><a href="http://www.netraverse.com/gentoo.htm">Purchase Win4Lin "Gentoo Edition"</a> and you'll also get a special Gentoo discount. Every sale also helps support Gentoo Linux development :)</p>
663 </td>
664 </tr>
665 <tr>
666 <td>
667 <img src="/images/line.gif" alt="line"/>
668 </td>
669 </tr>
670 <tr>
671 <td align="center">
672 <a href="http://www.qksrv.net/click-477620-5032687" target="_top">
673 <img src="http://www.qksrv.net/image-477620-5032687" width="125" height="125" alt="DDR Memory at Crucial.com" border="0"/>
674 </a>
675 <p class="alttext">Purchase RAM from <b>Crucial.com</b> and a percentage of your sale will go towards further Gentoo Linux development.</p>
676 </td>
677 </tr>
678 <tr>
679 <td>
680 <img src="/images/line.gif" alt="line"/>
681 </td>
682 </tr>
683 <tr>
684 <td align="center">
685 <a href="http://www.tek.net" target="_top">
686 <img src="/images/tek-gentoo.gif" width="125" height="125" alt="Tek Alchemy" border="0"/>
687 </a>
688 <p class="alttext">Tek Alchemy offers dedicated servers and other hosting solutions running Gentoo Linux.</p>
689 </td>
690 </tr>
691 <tr>
692 <td>
693 <img src="/images/line.gif" alt="line"/>
694 </td>
695 </tr>
696</table>
697 </td>
698<!--
699 <td width="15%" class="infotext" valign="top" align="left" bgcolor="#ddddff">
700 <table border="0" cellspacing="5" cellpadding="0" width="100%">
701 <tr>
702 <td>
703 <br/>
704 </td>
705 </tr>
706 </table>
707 </td>
708 -->
709 </tr>
710 <tr>
711 <td align="right" class="infohead" width="100%" colspan="3" bgcolor="#7a5ada">
712 Copyright 2001-2003 Gentoo
713 Technologies, Inc. Questions, Comments, Corrections? Email <a class="highlight" href="mailto:www@gentoo.org">www@gentoo.org</a>.
714 </td>
715 </tr>
716 </table>
717 </body>
718 </html>
719 </xsl:template>
720 <xsl:template match="newsitems">
721 <xsl:apply-templates select="news"/>
722 </xsl:template>
723 <xsl:template match="news">
724 <table width="100%" border="0" cellspacing="5" cellpadding="0">
725 <tr> 36 <tr>
726 <td colspan="2" class="ncontent" bgcolor="#bbffbb"> 37 <td bgcolor="#ddddff">
727 <p class="note"> 38 <p class="note">
728 <font color="#7a5ada"> 39 <xsl:if test="/*[1][@disclaimer]">
729 <b> 40 <xsl:if test="/*[1]/@disclaimer='obsolete'">
730 <xsl:value-of select="title"/> 41 <xsl:attribute name="style">font-size:1.3em</xsl:attribute>
731 </b> 42 </xsl:if>
732 </font> 43 <b><xsl:value-of select="func:gettext('disclaimer')"/>: </b>
733 </p> 44 <xsl:apply-templates select="func:gettext(/*[1]/@disclaimer)"/>
734 </td>
735 </tr>
736 <tr>
737 <xsl:choose>
738 <xsl:when test="@align='left'">
739 <td rowspan="2" valign="top" width="1">
740 <img src="{@graphic}"/>
741 </td>
742 <td class="alttext">
743 <font color="#808080">Posted by <xsl:value-of select="poster"/> on <xsl:value-of select="date"/></font>
744 </td>
745 </xsl:when>
746 <xsl:otherwise>
747 <td class="alttext">
748 <font color="#808080">Posted by <xsl:value-of select="poster"/> on <xsl:value-of select="date"/></font>
749 </td>
750 <td rowspan="2" valign="top" width="1">
751 <img src="{@graphic}"/>
752 </td>
753 </xsl:otherwise>
754 </xsl:choose>
755 </tr>
756 <tr>
757 <td class="content" valign="top">
758 <xsl:apply-templates select="body"/>
759 </td>
760 </tr>
761 </table>
762 <br/>
763 <table width="100%">
764 <tr>
765 <td height="1" bgcolor="#c0c0c0"/>
766 </tr>
767 </table>
768 <br/>
769 </xsl:template>
770 <xsl:template match="mail">
771 <a href="mailto:{@link}">
772 <xsl:value-of select="."/>
773 </a>
774 </xsl:template>
775 <xsl:template match="author/mail">
776 <b>
777 <a class="altlink" href="mailto:{@link}">
778 <xsl:value-of select="."/>
779 </a>
780 </b>
781 </xsl:template>
782 <xsl:template match="author">
783 <xsl:apply-templates/>
784 <xsl:if test="@title">
785 <br/>
786 <i>
787 <xsl:value-of select="@title"/>
788 </i>
789 </xsl:if>
790 <br/>
791 <br/>
792 </xsl:template>
793 <xsl:template match="chapter">
794 <xsl:variable name="chid"><xsl:number/></xsl:variable>
795 <xsl:choose>
796 <xsl:when test="title">
797 <p class="chaphead">
798 <span class="chapnum">
799 <a name="doc_chap{$chid}"><xsl:number/>. </a>
800 </span>
801 <xsl:value-of select="title"/>
802 </p>
803 </xsl:when>
804 <xsl:otherwise>
805 <xsl:if test="/guide">
806 <p class="chaphead">
807 <span class="chapnum">
808 <a name="doc_chap{$chid}"><xsl:number/>.</a>
809 </span>
810 </p>
811 </xsl:if> 45 </xsl:if>
812 </xsl:otherwise> 46 <xsl:if test="/*[1][@redirect]">
813 </xsl:choose> 47 <xsl:apply-templates select="func:gettext('redirect')">
814 <xsl:apply-templates select="body"> 48 <xsl:with-param name="paramlink" select="/*[1]/@redirect"/>
815 <xsl:with-param name="chid" select="$chid"/>
816 </xsl:apply-templates>
817 <xsl:apply-templates select="section">
818 <xsl:with-param name="chid" select="$chid"/>
819 </xsl:apply-templates>
820 </xsl:template>
821 <xsl:template match="section">
822 <xsl:param name="chid"/>
823 <xsl:if test="title">
824 <xsl:variable name="sectid">doc_chap<xsl:value-of select="$chid"/>_sect<xsl:number/></xsl:variable>
825 <p class="secthead">
826 <a name="{$sectid}"><xsl:value-of select="title"/>&#160;</a>
827 </p>
828 </xsl:if>
829 <xsl:apply-templates select="body">
830 <xsl:with-param name="chid" select="$chid"/>
831 </xsl:apply-templates>
832 </xsl:template>
833<!--
834 <xsl:template match="subsection">
835 <xsl:param name="chapid"/>
836 <xsl:if test="title">
837 <xsl:variable name="subsectid"><xsl:value-of select="$chapid"/>_subsect<xsl:number/></xsl:variable>
838 <p class="subsecthead">
839 <a name="{$subsectid}"><xsl:value-of select="title"/>&#160;</a>
840 </p>
841 </xsl:if>
842 <xsl:apply-templates select="body"/>
843 </xsl:template>
844-->
845 <xsl:template match="figure">
846 <xsl:param name="chid"/>
847 <xsl:variable name="fignum">
848 <xsl:number level="any" from="chapter" count="figure"/>
849 </xsl:variable>
850 <xsl:variable name="figid">doc_chap<xsl:value-of select="$chid"/>_fig<xsl:value-of select="$fignum"/></xsl:variable>
851 <br/>
852 <a name="{$figid}"/>
853 <table cellspacing="0" cellpadding="0" border="0">
854 <tr>
855 <td class="infohead" bgcolor="#7a5ada">
856 <p class="caption">
857 <xsl:choose>
858 <xsl:when test="@caption">
859 Figure <xsl:value-of select="$chid"/>.<xsl:value-of select="$fignum"/>: <xsl:value-of select="@caption"/>
860 </xsl:when>
861 <xsl:otherwise>
862 Figure <xsl:value-of select="$chid"/>.<xsl:value-of select="$fignum"/>
863 </xsl:otherwise>
864 </xsl:choose>
865 </p>
866 </td>
867 </tr>
868 <tr>
869 <td align="center" bgcolor="#ddddff">
870 <xsl:choose>
871 <xsl:when test="@short">
872 <img src="{@link}" alt="Fig. {$fignum}: {@short}"/>
873 </xsl:when>
874 <xsl:otherwise>
875 <img src="{@link}" alt="Fig. {$fignum}"/>
876 </xsl:otherwise>
877 </xsl:choose>
878 </td>
879 </tr>
880 </table>
881 <br/>
882 </xsl:template>
883<!--figure without a caption; just a graphical element-->
884 <xsl:template match="fig">
885 <center>
886 <xsl:choose>
887 <xsl:when test="@linkto">
888 <a href="{@linkto}">
889 <img src="{@link}" alt="{@short}"/>
890 </a>
891 </xsl:when>
892 <xsl:otherwise>
893 <img src="{@link}" alt="{@short}"/>
894 </xsl:otherwise>
895 </xsl:choose>
896 </center>
897 </xsl:template>
898 <xsl:template match="br">
899 <br/>
900 </xsl:template>
901 <xsl:template match="note">
902 <table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0">
903 <tr>
904 <td bgcolor="#bbffbb">
905 <p class="note">
906 <b>Note: </b>
907 <xsl:apply-templates/> 49 </xsl:apply-templates>
50 </xsl:if>
908 </p> 51 </p>
909 </td> 52 </td>
910 </tr> 53 </tr>
911 </table> 54 </table>
55 </xsl:if>
912 </xsl:template> 56</xsl:template>
57
58
59<!-- Content of /guide -->
60<xsl:template name="guidecontent">
61 <xsl:if test="$style != 'printable'">
62 <br />
63 </xsl:if>
64
65 <h1>
66 <xsl:choose>
67 <xsl:when test="/guide/subtitle"><xsl:value-of select="/guide/title"/>: <xsl:value-of select="/guide/subtitle"/></xsl:when>
68 <xsl:otherwise><xsl:value-of select="/guide/title"/></xsl:otherwise>
69 </xsl:choose>
70 </h1>
71
72 <xsl:choose>
73 <xsl:when test="$style = 'printable'">
74 <xsl:apply-templates select="author" />
75 <br/>
76 <i><xsl:call-template name="contentdate"/></i>
77 <xsl:variable name="outdated">
78 <xsl:call-template name="outdated-translation"/>
79 </xsl:variable>
80 <xsl:if test="string-length($outdated) &gt; 1">
81 <br/><i><xsl:copy-of select="$outdated"/></i>
82 </xsl:if>
83 </xsl:when>
84 <xsl:otherwise>
85 <xsl:if test="count(/guide/chapter)&gt;1">
86 <form name="contents" action="http://www.gentoo.org">
87 <b><xsl:value-of select="func:gettext('Content')"/></b>:
88 <select name="url" size="1" OnChange="location.href=form.url.options[form.url.selectedIndex].value" style="font-family:sans-serif,Arial,Helvetica">
89 <xsl:for-each select="chapter">
90 <xsl:variable name="chapid">doc_chap<xsl:number/></xsl:variable><option value="#{$chapid}"><xsl:number/>. <xsl:value-of select="title"/></option>
91 </xsl:for-each>
92 </select>
93 </form>
94 </xsl:if>
95 </xsl:otherwise>
96 </xsl:choose>
97
98 <xsl:choose>
99 <xsl:when test="/guide">
100 <xsl:apply-templates select="chapter"/>
101 </xsl:when>
102 <xsl:when test="/sections">
103 <xsl:apply-templates select="/sections/section"/>
104 </xsl:when>
105 </xsl:choose>
106 <br/>
107 <xsl:if test="/guide/license">
108 <xsl:apply-templates select="license" />
109 </xsl:if>
110 <br/>
111</xsl:template>
112
113<!-- Layout for documentation -->
114<xsl:template name="doclayout">
115<html>
116 <xsl:if test="string-length($glang)>1">
117 <xsl:attribute name="lang"><xsl:value-of select="translate($glang,'_','-')"/></xsl:attribute>
118 </xsl:if>
119<head>
120 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
121 <link title="new" rel="stylesheet" href="/css/main.css" type="text/css"/>
122 <link REL="shortcut icon" HREF="http://www.gentoo.org/favicon.ico" TYPE="image/x-icon"/>
123 <!-- Just remove this bit if http refresh is too annoying -->
124 <xsl:if test="/*[1][@redirect]">
125 <meta http-equiv="Refresh">
126 <xsl:attribute name="content"><xsl:value-of select="concat('15; URL=', /*[1]/@redirect)"/></xsl:attribute>
127 </meta>
128 </xsl:if>
129
130<title>
131 <xsl:choose>
132 <xsl:when test="/guide/@type='project'">Gentoo Linux Projects</xsl:when>
133 <xsl:when test="/guide/@type='newsletter'">Gentoo Linux Newsletter</xsl:when>
134 <xsl:when test="/sections">Gentoo Linux Handbook Page</xsl:when>
135 <xsl:otherwise><xsl:value-of select="func:gettext('GLinuxDoc')"/></xsl:otherwise>
136 </xsl:choose>
137--
138 <xsl:choose>
139 <xsl:when test="subtitle"><xsl:if test="/guide/@type!='newsletter'"><xsl:value-of select="title"/>:</xsl:if> <xsl:value-of select="subtitle"/></xsl:when>
140 <xsl:otherwise><xsl:value-of select="title"/></xsl:otherwise>
141 </xsl:choose>
142</title>
143
144</head>
145<xsl:choose>
146 <xsl:when test="$style = 'printable'">
147 <!-- Insert the node-specific content -->
148<body bgcolor="#ffffff">
149 <xsl:call-template name="show-disclaimer"/>
150 <xsl:call-template name="content"/>
151</body>
152 </xsl:when>
153 <xsl:otherwise>
154<body style="margin:0px;" bgcolor="#ffffff">
155<table width="100%" border="0" cellspacing="0" cellpadding="0">
156 <tr>
157 <td valign="top" height="125" bgcolor="#45347b">
158 <a href="/"><img border="0" src="/images/gtop-www.jpg" alt="Gentoo Logo"/></a>
159 </td>
160 </tr>
161 <tr>
162 <td valign="top" align="right" colspan="1" bgcolor="#ffffff">
163 <table border="0" cellspacing="0" cellpadding="0" width="100%">
164 <tr>
165 <td width="99%" class="content" valign="top" align="left">
166 <!-- Insert the node-specific content -->
167 <xsl:call-template name="show-disclaimer"/>
168 <xsl:call-template name="content"/>
169 </td>
170 <td width="1%" bgcolor="#dddaec" valign="top">
171 <xsl:call-template name="rhcol"/>
172 </td>
173 </tr>
174 </table>
175 </td>
176 </tr>
177 <tr>
178 <td colspan="2" align="right" class="infohead">
179 Copyright 2001-<xsl:value-of select="substring(func:today(),1,4)"/> Gentoo Foundation, Inc. Questions, Comments? Email <a class="highlight" href="mailto:www@gentoo.org">www@gentoo.org</a>.
180 </td>
181 </tr>
182</table>
183
184</body>
185 </xsl:otherwise>
186 </xsl:choose>
187</html>
188</xsl:template>
189
190<!-- Guide template -->
191<xsl:template match="/guide">
192<xsl:call-template name="doclayout" />
193</xsl:template>
194
195<!-- {Mainpage, News, Email} template -->
196<xsl:template match="/mainpage | /news"> <!-- Removed " | /email" can't find any use -->
197<html>
198 <xsl:if test="string-length($glang)>1">
199 <xsl:attribute name="lang"><xsl:value-of select="translate($glang,'_','-')"/></xsl:attribute>
200 </xsl:if>
201<head>
202 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
203 <link title="new" rel="stylesheet" href="/css/main.css" type="text/css"/>
204 <link REL="shortcut icon" HREF="http://www.gentoo.org/favicon.ico" TYPE="image/x-icon"/>
205
206 <xsl:if test="/mainpage/@id='news'">
207 <link rel="alternate" type="application/rss+xml" title="Gentoo Linux News RDF" href="http://www.gentoo.org/rdf/en/gentoo-news.rdf" />
208 </xsl:if>
209 <xsl:choose>
210 <xsl:when test="/mainpage | /news">
211 <title>Gentoo Linux -- <xsl:value-of select="title"/></title>
212 </xsl:when>
213 <!-- Can't find any use for this. Will be deleted.
214 <xsl:when test="/email">
215 <title><xsl:value-of select="subject"/></title>
216 </xsl:when>
217 -->
218 </xsl:choose>
219</head>
220<body style="margin:0px;" bgcolor="#000000">
221
222<table border="0" width="100%" cellspacing="0" cellpadding="0">
223 <tr>
224 <td valign="top" height="125" width="1%" bgcolor="#45347b">
225 <a href="/"><img border="0" src="/images/gtop-www.jpg" alt="Gentoo Logo"/></a>
226 </td>
227
228 <td valign="bottom" align="left" bgcolor="#000000" colspan="2" lang="en">
229 <p class="menu">
230 <xsl:choose>
231 <xsl:when test="/mainpage/@id='about'">
232 <a class="highlight" href="/main/en/about.xml">About</a>
233 </xsl:when>
234 <xsl:otherwise>
235 <a class="menulink" href="/main/en/about.xml">About</a>
236 </xsl:otherwise>
237 </xsl:choose>
238 |
239 <xsl:choose>
240 <xsl:when test="/mainpage/@id='projects'">
241 <a class="highlight" href="/proj/en/index.xml?showlevel=1">Projects</a>
242 </xsl:when>
243 <xsl:otherwise>
244 <a class="menulink" href="/proj/en/index.xml?showlevel=1">Projects</a>
245 </xsl:otherwise>
246 </xsl:choose>
247 |
248 <xsl:choose>
249 <xsl:when test="/mainpage/@id='docs'">
250 <a class="highlight" href="/doc/en/index.xml">Docs</a>
251 </xsl:when>
252 <xsl:otherwise>
253 <a class="menulink" href="/doc/en/index.xml">Docs</a>
254 </xsl:otherwise>
255 </xsl:choose>
256 | <a class="menulink" href="http://forums.gentoo.org">Forums</a>
257 |
258 <xsl:choose>
259 <xsl:when test="/mainpage/@id='lists'">
260 <a class="highlight" href="/main/en/lists.xml">Lists</a>
261 </xsl:when>
262 <xsl:otherwise>
263 <a class="menulink" href="/main/en/lists.xml">Lists</a>
264 </xsl:otherwise>
265 </xsl:choose>
266 | <a class="menulink" href="http://bugs.gentoo.org">Bugs</a>
267 | <a class="menulink" href="http://www.cafepress.com/officialgentoo/">Store</a>
268 |
269 <xsl:choose>
270 <xsl:when test="/mainpage/@id='newsletter'">
271 <a class="highlight" href="/news/en/gwn/gwn.xml"> GWN</a>
272 </xsl:when>
273 <xsl:otherwise>
274 <a class="menulink" href="/news/en/gwn/gwn.xml"> GWN</a>
275 </xsl:otherwise>
276 </xsl:choose>
277 |
278 <xsl:choose>
279 <xsl:when test="/mainpage/@id='where'">
280 <a class="highlight" href="/main/en/where.xml">Get Gentoo!</a>
281 </xsl:when>
282 <xsl:otherwise>
283 <a class="menulink" href="/main/en/where.xml">Get Gentoo!</a>
284 </xsl:otherwise>
285 </xsl:choose>
286 |
287 <xsl:choose>
288 <xsl:when test="/mainpage/@id='support'">
289 <a class="highlight" href="/main/en/support.xml">Support</a>
290 </xsl:when>
291 <xsl:otherwise>
292 <a class="menulink" href="/main/en/support.xml">Support</a>
293 </xsl:otherwise>
294 </xsl:choose>
295 |
296 <xsl:choose>
297 <xsl:when test="/mainpage/@id='sponsors'">
298 <a class="highlight" href="/main/en/sponsors.xml">Sponsors</a>
299 </xsl:when>
300 <xsl:otherwise>
301 <a class="menulink" href="/main/en/sponsors.xml">Sponsors</a>
302 </xsl:otherwise>
303 </xsl:choose>
304 | <a class="menulink" href="http://planet.gentoo.org">Planet</a>
305 </p>
306 </td>
307 </tr>
308 <tr>
309 <td valign="top" align="right" width="1%" bgcolor="#dddaec">
310 <table width="100%" cellspacing="0" cellpadding="0" border="0">
311 <tr>
312 <td height="1%" valign="top" align="right">
313 <img src="/images/gridtest.gif" alt="Gentoo Spaceship"/>
314 </td>
315 </tr>
316 <tr>
317 <td height="99%" valign="top" align="left">
318 <!--info goes here-->
319 <table cellspacing="0" cellpadding="5" border="0">
320 <tr>
321 <td valign="top" class="leftmenu" lang="en">
322 <p class="altmenu">
323 Installation:
324 <br/>
325 <a class="altlink" href="/doc/en/handbook/index.xml">Gentoo Handbook</a>
326 <br/>
327 <a class="altlink" href="/doc/en/index.xml?catid=install#doc_chap2">Installation Docs</a>
328 <br/><br/>
329 Documentation:
330 <br/>
331 <a class="altlink" href="/doc/en/">Home</a>
332 <br/>
333 <a class="altlink" href="/doc/en/list.xml">Listing</a>
334 <br/>
335 <a class="altlink" href="/main/en/about.xml">About Gentoo</a>
336 <br/>
337 <a class="altlink" href="/main/en/philosophy.xml">Philosophy</a>
338 <br/>
339 <a class="altlink" href="/main/en/contract.xml">Social Contract</a>
340 <br/><br/>
341 Resources:
342 <br/>
343 <a class="altlink" href="http://bugs.gentoo.org">Bug Tracker</a>
344 <br/>
345 <a class="altlink" href="/proj/en/devrel/roll-call/userinfo.xml">Developer List</a>
346 <br/>
347 <a class="altlink" href="http://forums.gentoo.org">Discussion Forums</a>
348 <br/>
349 <a class="altlink" href="http://torrents.gentoo.org/">Gentoo BitTorrents</a>
350 <br/>
351 <a class="altlink" href="/proj/en/glep/">Gentoo Linux Enhancement Proposals</a>
352 <br/>
353 <a class="altlink" href="/main/en/irc.xml">IRC Channels</a>
354 <br/>
355 <a class="altlink" href="/main/en/lists.xml">Mailing Lists</a>
356 <br/>
357 <a class="altlink" href="/main/en/mirrors.xml">Mirrors</a>
358 <br/>
359 <a class="altlink" href="/main/en/name-logo.xml">Name and Logo Guidelines</a>
360 <br/>
361 <a class="altlink" href="http://packages.gentoo.org/">Online Package Database</a>
362 <br/>
363 <a class="altlink" href="/security/en/index.xml">Security Announcements</a>
364 <br/>
365 <a class="altlink" href="/proj/en/devrel/staffing-needs/">Staffing Needs</a>
366 <br/>
367 <a class="altlink" href="http://vendors.gentoo.org/">Supporting Vendors</a>
368 <br/>
369 <a class="altlink" href="http://viewcvs.gentoo.org/">View our CVS</a>
370
371 <!--
372 <a class="altlink" href="/dyn/index-cvs.xml">Daily CVS ChangeLog</a>
373 -->
374 <!--<a class="altlink" href="http://stats.gentoo.org">Gentoo Usage Statistics</a>
375 <br/>
376 <a class="altlink" href="http://stable.gentoo.org">Gentoo Stable Project</a>
377 <br/>
378 -->
379 <br/><br/>
380 Graphics:
381 <br/>
382 <a class="altlink" href="/main/en/graphics.xml">Logos and themes</a>
383 <br/>
384 <a class="altlink" href="/dyn/icons.xml">Icons</a>
385 <br/>
386 <a class="altlink" href="/main/en/shots.xml">ScreenShots</a>
387 <br/><br/>
388 Miscellaneous Resources:
389 <br/>
390 <a class="altlink" href="http://www.cafepress.com/officialgentoo/">Gentoo Linux Store</a>
391 <br/>
392 <a class="altlink" href="/main/en/projects.xml">Gentoo-hosted projects</a>
393 <br/>
394 <a class="altlink" href="/main/en/articles.xml">IBM dW/Intel article archive</a>
395 <xsl:if test="/mainpage/@id='news'">
396 <br/><br/>
397 Older News:<br/>
398 <xsl:for-each select="document('/dyn/news-index.xml')/uris/uri[position()&gt;$newsitemcount][position()&lt;20]/text()">
399 <xsl:variable name="newsuri" select="."/>
400 <a class="altlink" href="{$newsuri}"><xsl:value-of select="document(.)/news/title"/></a>
401 <br/>
402 </xsl:for-each>
403 </xsl:if>
404 </p>
405 <br/><br />
406 </td>
407 </tr>
408 </table>
409 </td>
410 </tr>
411 </table>
412 </td>
413 <!-- Content below top menu and between left menu and ads -->
414 <td valign="top" bgcolor="#ffffff">
415 <xsl:choose>
416 <xsl:when test="/mainpage/@id='news'">
417 <p class="news">
418 <img class="newsicon" src="/images/gentoo-new.gif" alt="Gentoo logo"/>
419 <span class="newsitem" lang="en">We produce Gentoo Linux, a special flavor of Linux that
420 can be automatically optimized and customized for just
421 about any application or need. Extreme performance,
422 configurability and a top-notch user and developer
423 community are all hallmarks of the Gentoo experience.
424 To learn more, read our <b><a href="/main/en/about.xml">about
425 page</a></b>.</span>
426 </p>
427 <xsl:for-each select="document('/dyn/news-index.xml')/uris/uri[position()&lt;=$newsitemcount]/text()">
428 <xsl:call-template name="newscontent">
429 <xsl:with-param name="thenews" select="document(.)/news"/>
430 <xsl:with-param name="summary" select="'yes'"/>
431 <xsl:with-param name="link" select="."/>
432 </xsl:call-template>
433 </xsl:for-each>
434 </xsl:when>
435 <xsl:when test="/news">
436 <xsl:call-template name="newscontent">
437 <xsl:with-param name="thenews" select="/news"/>
438 <xsl:with-param name="summary" select="no"/>
439 </xsl:call-template>
440 </xsl:when>
441 </xsl:choose>
442 <br/>
443 <table border="0" class="content">
444 <tr>
445 <td>
446 <xsl:apply-templates select="chapter"/>
447 </td>
448 </tr>
449 </table>
450 <br/>
451 <xsl:if test="/mainpage/license">
452 <xsl:apply-templates select="license" />
453 </xsl:if>
454 <br/>
455 <!--content end-->
456 </td>
457 <td width="1%" bgcolor="#dddaec" valign="top">
458 <xsl:call-template name="rhcol"/>
459 </td>
460 </tr>
461 <tr lang="en">
462 <td align="right" class="infohead" colspan="3">
463 Copyright 2001-<xsl:value-of select="substring(func:today(),1,4)"/> Gentoo Foundation, Inc. Questions, Comments? Email <a class="highlight" href="mailto:www@gentoo.org">www@gentoo.org</a>.
464 </td>
465 </tr>
466</table>
467
468</body>
469</html>
470</xsl:template>
471
472<!-- Mail template -->
473<xsl:template match="mail">
474<a>
475 <xsl:attribute name="href">
476 <xsl:choose>
477 <xsl:when test="@link">
478 <xsl:value-of select="concat('mailto:', @link)"/>
479 </xsl:when>
480 <xsl:otherwise>
481 <xsl:value-of select="concat('mailto:', .)"/>
482 </xsl:otherwise>
483 </xsl:choose>
484 </xsl:attribute>
485 <xsl:value-of select="."/>
486</a>
487
488</xsl:template>
489
490<!-- Mail inside <author>...</author> -->
491<xsl:template match="/guide/author/mail|/book/author/mail">
492<b>
493 <a class="altlink" href="mailto:{@link}"><xsl:value-of select="."/></a>
494</b>
495</xsl:template>
496
497<!-- Author -->
498<xsl:template match="author">
499<xsl:apply-templates/>
500 <xsl:if test="@title">
501 <xsl:if test="$style != 'printable'">
502 <br/>
503 </xsl:if>
504 <xsl:if test="$style = 'printable'">&#160;</xsl:if>
505 <i><xsl:value-of select="@title"/></i>
506 </xsl:if>
507 <br/>
508 <xsl:if test="$style != 'printable' and position()!=last()">
509 <br/>
510 </xsl:if>
511</xsl:template>
512
513<!-- Chapter -->
514<xsl:template match="chapter">
515 <xsl:variable name="chid"><xsl:number/></xsl:variable>
516 <xsl:choose>
517 <xsl:when test="title">
518 <p class="chaphead">
519 <xsl:if test="@id"><a name="{@id}"/></xsl:if>
520 <a name="doc_chap{$chid}"/>
521 <xsl:if test="not(/mainpage) and count(//chapter)>1">
522 <span class="chapnum"><xsl:number/>.&#160;</span>
523 </xsl:if>
524 <xsl:value-of select="title"/>
525 </p>
526 </xsl:when>
527 <xsl:otherwise>
528 <xsl:if test="/guide">
529 <p class="chaphead">
530 <span class="chapnum">
531 <a name="doc_chap{$chid}"><xsl:number/>.</a>
532 </span>
533 </p>
534 </xsl:if>
535 </xsl:otherwise>
536 </xsl:choose>
537 <xsl:apply-templates select="body">
538 <xsl:with-param name="chid" select="$chid"/>
539 </xsl:apply-templates>
540 <xsl:apply-templates select="section">
541 <xsl:with-param name="chid" select="$chid"/>
542 </xsl:apply-templates>
543</xsl:template>
544
545
546<!-- Section template -->
547<xsl:template match="section">
548<xsl:param name="chid"/>
549<xsl:if test="title">
550 <xsl:variable name="sectid">doc_chap<xsl:value-of select="$chid"/>_sect<xsl:number/></xsl:variable>
551 <xsl:if test="@id">
552 <a name="{@id}"/>
553 </xsl:if>
554 <p class="secthead">
555 <a name="{$sectid}"><xsl:value-of select="title"/></a>
556 </p>
557</xsl:if>
558<xsl:apply-templates select="body">
559 <xsl:with-param name="chid" select="$chid"/>
560</xsl:apply-templates>
561</xsl:template>
562
563<!-- Figure template -->
564<xsl:template match="figure">
565<xsl:param name="chid"/>
566<xsl:variable name="fignum"><xsl:number level="any" from="chapter" count="figure"/></xsl:variable>
567<xsl:variable name="figid">doc_chap<xsl:value-of select="$chid"/>_fig<xsl:value-of select="$fignum"/></xsl:variable>
568<xsl:variable name="llink">
569 <xsl:choose>
570 <xsl:when test="starts-with(@link,'http://www.gentoo.org/')">
571 <xsl:value-of select="substring-after(@link, 'http://www.gentoo.org')"/>
572 </xsl:when>
573 <xsl:otherwise>
574 <xsl:value-of select="@link"/>
575 </xsl:otherwise>
576 </xsl:choose>
577</xsl:variable>
578<br/>
579<a name="{$figid}"/>
580<table cellspacing="0" cellpadding="0" border="0">
581 <tr>
582 <td bgcolor="#7a5ada">
583 <p class="codetitle">
584 <xsl:choose>
585 <xsl:when test="@caption">
586 <xsl:value-of select="func:gettext('Figure')"/>&#160;<xsl:value-of select="$chid"/>.<xsl:value-of select="$fignum"/><xsl:value-of select="func:gettext('SpaceBeforeColon')"/>: <xsl:value-of select="@caption"/>
587 </xsl:when>
588 <xsl:otherwise>
589 <xsl:value-of select="func:gettext('Figure')"/>&#160;<xsl:value-of select="$chid"/>.<xsl:value-of select="$fignum"/>
590 </xsl:otherwise>
591 </xsl:choose>
592 </p>
593 </td>
594 </tr>
595 <tr>
596 <td align="center" bgcolor="#ddddff">
597 <xsl:choose>
598 <xsl:when test="@short">
599 <img src="{$llink}" alt="Fig. {$fignum}: {@short}"/>
600 </xsl:when>
601 <xsl:otherwise>
602 <img src="{$llink}" alt="Fig. {$fignum}"/>
603 </xsl:otherwise>
604 </xsl:choose>
605 </td>
606 </tr>
607</table>
608<br/>
609</xsl:template>
610
611<!--figure without a caption; just a graphical element-->
913 <xsl:template match="impo"> 612<xsl:template match="fig">
613<center>
614 <xsl:choose>
615 <xsl:when test="@linkto">
616 <a href="{@linkto}"><img border="0" src="{@link}" alt="{@short}"/></a>
617 </xsl:when>
618 <xsl:otherwise>
619 <img src="{@link}" alt="{@short}"/>
620 </xsl:otherwise>
621 </xsl:choose>
622</center>
623</xsl:template>
624
625<!-- Line break -->
626<xsl:template match="br">
627<br/>
628</xsl:template>
629
630<!-- Note -->
631<xsl:template match="note">
914 <table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0"> 632<table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0">
633 <tr>
634 <td bgcolor="#bbffbb">
635 <p class="note">
636 <b><xsl:value-of select="func:gettext('Note')"/>: </b>
637 <xsl:apply-templates/>
638 </p>
639 </td>
640 </tr>
641</table>
642</xsl:template>
643
644<!-- Important item -->
645<xsl:template match="impo">
646<table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0">
647 <tr>
648 <td bgcolor="#ffffbb">
649 <p class="note">
650 <b><xsl:value-of select="func:gettext('Important')"/>: </b>
651 <xsl:apply-templates/>
652 </p>
653 </td>
654 </tr>
655</table>
656</xsl:template>
657
658<!-- Warning -->
659<xsl:template match="warn">
660<table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0">
661 <tr>
662 <td bgcolor="#ffbbbb">
663 <p class="note">
664 <b><xsl:value-of select="func:gettext('Warning')"/>: </b>
665 <xsl:apply-templates/>
666 </p>
667 </td>
668 </tr>
669</table>
670</xsl:template>
671
672<!-- Code note -->
673<xsl:template match="codenote">
674<span class="comment">
675 <xsl:if test='not(starts-with(., "("))'>(</xsl:if>
676 <xsl:apply-templates/>
677 <xsl:if test='not(starts-with(., "("))'>)</xsl:if>
678</span>
679</xsl:template>
680
681<!-- Regular comment -->
682<xsl:template match="comment">
683<span class="code-comment"><xsl:apply-templates/></span>
684</xsl:template>
685
686<!-- Colour coding inside <pre> -->
687<xsl:template match="i">
688<span class="code-input"><xsl:apply-templates/></span>
689</xsl:template>
690
691<xsl:template match="var">
692<span class="code-variable"><xsl:apply-templates/></span>
693</xsl:template>
694
695<xsl:template match="ident">
696<span class="code-identifier"><xsl:apply-templates/></span>
697</xsl:template>
698
699<xsl:template match="keyword">
700<span class="code-keyword"><xsl:apply-templates/></span>
701</xsl:template>
702
703<xsl:template match="stmt">
704<span class="code-statement"><xsl:apply-templates/></span>
705</xsl:template>
706
707<xsl:template match="const">
708<span class="code-constant"><xsl:apply-templates/></span>
709</xsl:template>
710
711
712<!-- Bold -->
713<xsl:template match="b">
714<b><xsl:apply-templates/></b>
715</xsl:template>
716
717<!-- Superscript -->
718<xsl:template match="sup">
719 <sup><xsl:apply-templates/></sup>
720</xsl:template>
721
722<!-- Subscript -->
723<xsl:template match="sub">
724 <sub><xsl:apply-templates/></sub>
725</xsl:template>
726
727<!-- Brite -->
728<xsl:template match="brite">
729<font color="#ff0000">
730 <b><xsl:apply-templates/></b>
731</font>
732</xsl:template>
733
734<!-- Body inside email -->
735<!-- Can't find any use for this, will be deleted
736<xsl:template match="/email/body">
737<table border="0">
738 <tr>
739 <td>
740 <span class="content">
741 <p class="secthead">
742 Subject: <xsl:value-of select="/email/subject"/>
743 </p>
744 <p class="secthead">
745 <font color="#000000">
746 List: <xsl:value-of select="/email/list"/> at gentoo.org<br/>
747 Date: <xsl:value-of select="/email/date"/><br/>
748 From: <xsl:value-of select="/email/from"/><br/><br/>
749 <xsl:if test="/email/nav/prev">
750 <xsl:for-each select="/email/nav/prev[position()=1]/text()">
751 <xsl:variable name="navloc" select="."/>
752 <xsl:variable name="navfile">/dyn/lists/<xsl:value-of select="/email/list"/>/<xsl:value-of select="."/>.xml</xsl:variable>
753 Previous: <a href="{$navfile}"><xsl:value-of select="document($navfile)/email/subject"/></a><br/>
754 </xsl:for-each>
755 </xsl:if>
756 <xsl:if test="/email/nav/next">
757 <xsl:for-each select="/email/nav/next[position()=1]/text()">
758 <xsl:variable name="navloc" select="."/>
759 <xsl:variable name="navfile">/dyn/lists/<xsl:value-of select="/email/list"/>/<xsl:value-of select="."/>.xml</xsl:variable>
760 Next: <a href="{$navfile}"><xsl:value-of select="document($navfile)/email/subject"/></a><br/>
761 </xsl:for-each>
762 </xsl:if>
763 <xsl:if test="/email/in-reply-to">
764 <xsl:for-each select="/email/in-reply-to[position()=1]/text()">
765 <xsl:variable name="irtloc" select="."/>
766 <xsl:variable name="irtfile">/dyn/lists/<xsl:value-of select="/email/list"/>/<xsl:value-of select="."/>.xml</xsl:variable>
767 In Reply To: <a href="{$irtfile}"><xsl:value-of select="document($irtfile)/email/subject"/></a><br/>
768 </xsl:for-each>
769 </xsl:if>
770 <xsl:if test="/email/replies">
771 <br/>Replies to this message:<br/>
772 <xsl:for-each select="/email/replies/reply/text()">
773 <xsl:variable name="rloc" select="."/>
774 <xsl:variable name="rfile">/dyn/lists/<xsl:value-of select="/email/list"/>/<xsl:value-of select="."/>.xml</xsl:variable>
775 &#160;<a href="{$rfile}"><xsl:value-of select="document($rfile)/email/subject"/></a><br/>
776 </xsl:for-each>
777 </xsl:if>
778 </font>
779 </p>
780 </span>
781 <pre>
782 <xsl:apply-templates/>
783 </pre>
784 </td>
785 </tr>
786</table>
787</xsl:template>
788-->
789
790<!-- Body -->
791<xsl:template match="body">
792<xsl:param name="chid"/>
793<xsl:apply-templates>
794 <xsl:with-param name="chid" select="$chid"/>
795</xsl:apply-templates>
796</xsl:template>
797
798<!-- Command or input, not to use inside <pre> -->
799<xsl:template match="c">
800<span class="code"><xsl:apply-templates/></span>
801</xsl:template>
802
803<!-- Box with small text -->
804<!-- Is this really used?
805<xsl:template match="box">
806<p class="infotext"><xsl:apply-templates/></p>
807</xsl:template>
808-->
809
810<!-- Preserve whitespace, aka Code Listing -->
811<xsl:template match="pre">
812<xsl:param name="chid"/>
813<xsl:variable name="prenum"><xsl:number level="any" from="chapter" count="pre"/></xsl:variable>
814<xsl:variable name="preid">doc_chap<xsl:value-of select="$chid"/>_pre<xsl:value-of select="$prenum"/></xsl:variable>
815<a name="{$preid}"/>
816<table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0">
817 <tr>
818 <td bgcolor="#7a5ada">
819 <p class="codetitle">
820 <xsl:value-of select="func:gettext('CodeListing')"/>&#160;<xsl:if test="$chid"><xsl:value-of select="$chid"/>.</xsl:if><xsl:value-of select="$prenum"/>
821 <xsl:if test="@caption">
822 <xsl:value-of select="func:gettext('SpaceBeforeColon')"/>: <xsl:value-of select="@caption"/>
823 </xsl:if>
824 </p>
825 </td>
826 </tr>
827 <tr>
828 <td bgcolor="#eeeeff">
829 <pre>
830 <xsl:apply-templates/>
831 </pre>
832 </td>
833 </tr>
834</table>
835</xsl:template>
836
837<!-- Path -->
838<xsl:template match="path">
839<span class="path"><xsl:value-of select="."/></span>
840</xsl:template>
841
842<!-- Url -->
843<xsl:template match="uri">
844<xsl:param name="paramlink"/>
845<!-- expand templates to handle things like <uri link="http://bar"><c>foo</c></uri> -->
846<xsl:choose>
847 <xsl:when test="@link">
848 <xsl:choose>
849 <xsl:when test="($TTOP = 'sections') and (starts-with(@link, '?'))">
850 <!-- Handbook link pointing to another part/chapter when viewing a single page,
851 cannot be a link because we have no idea where to link to
852 Besides, we have no way of knowing the language unless told via a param -->
853 <xsl:variable name="nolink"><xsl:value-of select="func:gettext('hb_file', $glang)"/></xsl:variable>
854 <span title="{$nolink}"><font color="#404080">(<xsl:apply-templates/>)</font></span>
855 </xsl:when>
856 <xsl:when test="($TTOP = 'book') and ($full = 0) and (starts-with(@link, '?'))">
857 <!-- Handbook link pointing to another part/chapter, normal case -->
858 <xsl:choose>
859 <xsl:when test="$style != 'printable'">
860 <a href="{$LINK}{@link}"><xsl:apply-templates/></a>
861 </xsl:when>
862 <xsl:otherwise>
863 <a href="{$LINK}{@link}&amp;style=printable"><xsl:apply-templates/></a>
864 </xsl:otherwise>
865 </xsl:choose>
866 </xsl:when>
867 <xsl:when test="($TTOP = 'book') and ($full = 1) and (starts-with(@link, '?'))">
868 <!-- Handbook link pointing to another part/chapter
869 Handbook is being rendered in a single page (full=1)
870 Hence link needs to be rewritten as a local one
871 i.e. ?part=1&chap=3#doc_chap1 must become #book_part1_chap3__chap1 Case 1a
872 i.e. ?part=1&chap=3#anID must become #anID Case 1b
873 or ?part=1&chap=3 must become #book_part1_chap3 Case 2
874 or ?part=2 must become #book_part2 Case 3-->
875 <xsl:choose>
876 <xsl:when test="contains(@link, 'chap=') and contains(@link, '#doc_')">
877 <!-- Link points inside a chapter (Case 1a)-->
878 <xsl:param name="linkpart" select="substring-after(substring-before(@link, '&amp;'), '=')" />
879 <xsl:param name="linkchap" select="substring-before(substring-after(substring-after(@link, '&amp;'), '='), '#doc_')" />
880 <xsl:param name="linkanch" select="substring-after(@link, '#doc_')" />
881 <a href="#book_part{$linkpart}_chap{$linkchap}__{$linkanch}"><xsl:apply-templates /></a>
882 </xsl:when>
883 <xsl:when test="contains(@link, 'chap=') and contains(@link, '#')">
884 <!-- Link points inside a chapter via an ID (Case 1b)
885 (IDs are expected to be unique throughout a handbook) -->
886 <xsl:param name="linkanch" select="substring-after(@link, '#')" />
887 <a href="#{$linkanch}"><xsl:apply-templates /></a>
888 </xsl:when>
889 <xsl:when test="contains(@link, 'chap=')">
890 <!-- Link points to a chapter (Case 2)-->
891 <xsl:param name="linkpart" select="substring-after(substring-before(@link, '&amp;'), '=')" />
892 <xsl:param name="linkchap" select="substring-after(substring-after(@link, '&amp;'), '=')" />
893 <a href="#book_part{$linkpart}_chap{$linkchap}"><xsl:apply-templates /></a>
894 </xsl:when>
895 <xsl:otherwise>
896 <!-- Link points to a part (Case 3)-->
897 <xsl:param name="linkpart" select="substring-after(@link, '=')" />
898 <a href="#book_part{$linkpart}"><xsl:apply-templates/></a>
899 </xsl:otherwise>
900 </xsl:choose>
901 </xsl:when>
902 <xsl:when test="($TTOP = 'book') and ($full = 1) and (starts-with(@link, '#'))">
903 <!-- Handbook link pointing to another place in same part/chapter
904 Handbook is being rendered in a single page (full=1)
905 Hence link needs to be rewritten as an internal one that is unique
906 for the whole handbook, i.e.
907 #doc_part1_chap3 becomes #book_{UNIQUEID}_part1_chap3, but
908 #anything_else_like_an_ID is left unchanged (IDs are expected to be unique throughout a handbook)-->
909 <xsl:choose>
910 <xsl:when test="starts-with(@link, '#doc_')">
911 <xsl:param name="locallink" select="substring-after(@link, 'doc_')" />
912 <a href="#book_{generate-id(/)}_{$locallink}"><xsl:apply-templates /></a>
913 </xsl:when>
914 <xsl:otherwise>
915 <a href="{@link}"><xsl:apply-templates/></a>
916 </xsl:otherwise>
917 </xsl:choose>
918 </xsl:when>
919 <xsl:otherwise>
920 <xsl:variable name="theurl">
921 <xsl:choose>
922 <xsl:when test="@link"><xsl:value-of select="@link" /></xsl:when>
923 <xsl:otherwise><xsl:value-of select="text()" /></xsl:otherwise>
924 </xsl:choose>
925 </xsl:variable>
926
927 <xsl:variable name="thelink">
928 <xsl:choose>
929 <xsl:when test="name(..)='insert' and $theurl='$redirect' and $paramlink"><xsl:value-of select="$paramlink" /></xsl:when>
930 <xsl:when test="name(..)='insert' and $theurl='$originalversion' and $paramlink">
931 <xsl:variable name="temp">
932 <xsl:value-of select="$paramlink"/>
933 <xsl:if test="$style = 'printable'">&amp;style=printable</xsl:if>
934 <xsl:if test="$full != '0'">&amp;full=1</xsl:if>
935 <xsl:if test="$part != '0'">&amp;part=<xsl:value-of select="$part"/></xsl:if>
936 <xsl:if test="$chap != '0'">&amp;chap=<xsl:value-of select="$chap"/></xsl:if>
937 </xsl:variable>
938 <xsl:choose>
939 <xsl:when test="contains($temp, '&amp;')">
940 <xsl:value-of select="concat(substring-before($temp,'&amp;'), '?', substring-after($temp,'&amp;'))"/>
941 </xsl:when>
942 <xsl:otherwise>
943 <xsl:value-of select="$temp"/>
944 </xsl:otherwise>
945 </xsl:choose>
946 </xsl:when>
947 <xsl:otherwise><xsl:value-of select="$theurl" /></xsl:otherwise>
948 </xsl:choose>
949 </xsl:variable>
950
951 <!-- Strip http://www.gentoo.org from links
952 Has no effect on actual www.g.o but helps when surfing on a local copy
953 Rewrite http://www.gentoo.org/cgi-bin/viewcvs/ to use viewcvs.gentoo.org
954 -->
955 <xsl:variable name="llink">
956 <xsl:choose>
957 <xsl:when test="starts-with($thelink, 'http://www.gentoo.org/cgi-bin/viewcvs.cgi')"><xsl:value-of select="concat('http://viewcvs.gentoo.org', substring-after($thelink, 'http://www.gentoo.org/cgi-bin/viewcvs.cgi'))" /></xsl:when>
958 <xsl:when test="starts-with($thelink, '/cgi-bin/viewcvs.cgi')"><xsl:value-of select="concat('http://viewcvs.gentoo.org', substring-after($thelink, '/cgi-bin/viewcvs.cgi'))" /></xsl:when>
959 <xsl:when test="starts-with($thelink, 'http://www.gentoo.org/')"><xsl:value-of select="substring-after($thelink, 'http://www.gentoo.org')" /></xsl:when>
960 <!-- Add catid to links to /doc/LL/index.xml -->
961 <xsl:when test="$catid != '0' and starts-with($thelink, '/doc/') and (substring-after(substring-after($thelink, '/doc/'), '/')='' or substring-after(substring-after($thelink, '/doc/'), '/')='index.xml')">
962 <xsl:value-of select="concat($thelink, '?catid=', $catid)"/>
963 </xsl:when>
964 <xsl:otherwise><xsl:value-of select="$thelink" /></xsl:otherwise>
965 </xsl:choose>
966 </xsl:variable>
967
968 <!-- Now, insert style=printable in the URL if necessary -->
969 <xsl:variable name="alink">
970 <xsl:choose>
971 <xsl:when test="$style != 'printable' or contains($llink, 'style=printable')">
972 <!-- Not printable style or style=printable already in URL, copy link -->
973 <xsl:value-of select="$llink" />
974 </xsl:when>
975 <xsl:when test="contains($llink, '://')">
976 <!-- External link, copy link -->
977 <xsl:value-of select="$llink" />
978 </xsl:when>
979 <xsl:when test="starts-with($llink, '#')">
980 <!-- Anchor, copy link -->
981 <xsl:value-of select="$llink" />
982 </xsl:when>
983 <xsl:otherwise>
984 <!-- We should have eliminated all other cases,
985 style printable, local link, then insert ?style=printable -->
986 <xsl:choose>
987 <xsl:when test="starts-with($llink, '?')">
988 <xsl:value-of select="concat( '?style=printable&amp;', substring-after($llink, '?'))" />
989 </xsl:when>
990 <xsl:when test="contains($llink, '.xml?')">
991 <xsl:value-of select="concat(substring-before($llink, '.xml?'), '.xml?style=printable&amp;', substring-after($llink, '.xml?'))" />
992 </xsl:when>
993 <xsl:when test="contains($llink, '.xml#')">
994 <xsl:value-of select="concat(substring-before($llink, '.xml#'), '.xml?style=printable#', substring-after($llink, '.xml#'))" />
995 </xsl:when>
996 <xsl:when test="substring-after($llink, '.xml') = ''">
997 <xsl:value-of select="concat($llink, '?style=printable')" />
998 </xsl:when>
999 <xsl:otherwise>
1000 <!-- Have I forgotten anything?
1001 Copy link -->
1002 <xsl:value-of select="$llink" />
1003 </xsl:otherwise>
1004 </xsl:choose>
1005 </xsl:otherwise>
1006 </xsl:choose>
1007 </xsl:variable>
1008 <a href="{$alink}"><xsl:apply-templates/></a>
1009 </xsl:otherwise>
1010 </xsl:choose>
1011 </xsl:when>
1012 <xsl:otherwise>
1013 <xsl:variable name="loc" select="."/>
1014 <a href="{$loc}"><xsl:apply-templates/></a>
1015 </xsl:otherwise>
1016</xsl:choose>
1017</xsl:template>
1018
1019<!-- Paragraph -->
1020<xsl:template match="p">
1021<xsl:param name="chid"/>
1022 <p>
1023 <!-- Keep this for old files with <p class="secthead"> -->
1024 <xsl:if test="@class">
1025 <xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute>
1026 </xsl:if>
1027
1028 <xsl:if test="@by">
1029 <xsl:attribute name="class">epigraph</xsl:attribute>
1030 </xsl:if>
1031
1032 <xsl:apply-templates>
1033 <xsl:with-param name="chid" select="$chid"/>
1034 </xsl:apply-templates>
1035
1036 <xsl:if test="@by">
1037 <br/><br/><span class="episig">—<xsl:value-of select="@by"/></span><br/><br/>
1038 </xsl:if>
1039 </p>
1040</xsl:template>
1041
1042<!-- Emphasize -->
1043<xsl:template match="e">
1044 <span class="emphasis"><xsl:apply-templates/></span>
1045</xsl:template>
1046
1047<!-- Table -->
1048<xsl:template match="table">
1049<table class="ntable">
1050 <xsl:apply-templates/>
1051</table>
1052</xsl:template>
1053
1054<!-- Table Row -->
1055<xsl:template match="tr">
1056<tr>
1057 <xsl:if test="@id">
1058 <xsl:attribute name="id">
1059 <xsl:value-of select="@id"/>
1060 </xsl:attribute>
1061 </xsl:if>
1062 <xsl:apply-templates/>
1063</tr>
1064</xsl:template>
1065
1066<xsl:template match="tcolumn">
1067<col width="{@width}"/>
1068</xsl:template>
1069
1070<!-- Table Item -->
1071<xsl:template match="ti">
1072<td class="tableinfo">
1073 <xsl:if test="@align='center' or @align='right'">
1074 <xsl:attribute name="style"><xsl:value-of select="concat('text-align:',@align)"/></xsl:attribute>
1075 </xsl:if>
1076 <xsl:if test="@colspan">
1077 <xsl:attribute name="colspan"><xsl:value-of select="@colspan"/></xsl:attribute>
1078 </xsl:if>
1079 <xsl:if test="@rowspan">
1080 <xsl:attribute name="rowspan"><xsl:value-of select="@rowspan"/></xsl:attribute>
1081 </xsl:if>
1082 <xsl:apply-templates/>
1083</td>
1084</xsl:template>
1085
1086<!-- Table Heading, no idea why <th> hasn't been used -->
1087<xsl:template match="th">
1088<td class="infohead">
1089 <xsl:if test="@colspan">
1090 <xsl:attribute name="colspan"><xsl:value-of select="@colspan"/></xsl:attribute>
1091 <!-- Center only when item spans several columns as
1092 centering all <th> might disrupt some pages.
1093 We might want to use a plain html <th> tag later.
1094 Tip: to center a single-cell title, use <th colspan="1">
1095 -->
1096 <xsl:attribute name="style">text-align:center</xsl:attribute>
1097 </xsl:if>
1098 <xsl:if test="@rowspan">
1099 <xsl:attribute name="rowspan"><xsl:value-of select="@rowspan"/></xsl:attribute>
1100 </xsl:if>
1101 <b>
1102 <xsl:apply-templates/>
1103 </b>
1104</td>
1105</xsl:template>
1106
1107<!-- Unnumbered List -->
1108<xsl:template match="ul">
1109<ul>
1110 <xsl:apply-templates/>
1111</ul>
1112</xsl:template>
1113
1114<!-- Ordered List -->
1115<xsl:template match="ol">
1116<ol>
1117 <xsl:apply-templates/>
1118</ol>
1119</xsl:template>
1120
1121<!-- List Item -->
1122<xsl:template match="li">
1123<li>
1124 <xsl:apply-templates/>
1125</li>
1126</xsl:template>
1127
1128<!-- Definition Lists -->
1129<xsl:template match="dl">
1130<dl><xsl:apply-templates/></dl>
1131</xsl:template>
1132
1133<xsl:template match="dt">
1134<dt><xsl:apply-templates/></dt>
1135</xsl:template>
1136
1137<xsl:template match="dd">
1138<dd><xsl:apply-templates/></dd>
1139</xsl:template>
1140
1141<!-- NOP -->
1142<xsl:template match="ignoreinemail">
1143<xsl:apply-templates/>
1144</xsl:template>
1145
1146<!-- NOP -->
1147<xsl:template match="ignoreinguide">
1148</xsl:template>
1149
1150<!-- License Tag -->
1151<xsl:template match="license">
1152<p class="copyright">
1153 <xsl:apply-templates select="func:gettext('License')"/>
1154</p>
1155<xsl:comment>
1156 &lt;rdf:RDF xmlns="http://web.resource.org/cc/"
1157 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
1158 &lt;License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/"&gt;
1159 &lt;permits rdf:resource="http://web.resource.org/cc/Reproduction" /&gt;
1160 &lt;permits rdf:resource="http://web.resource.org/cc/Distribution" /&gt;
1161 &lt;requires rdf:resource="http://web.resource.org/cc/Notice" /&gt;
1162 &lt;requires rdf:resource="http://web.resource.org/cc/Attribution" /&gt;
1163 &lt;permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /&gt;
1164 &lt;requires rdf:resource="http://web.resource.org/cc/ShareAlike" /&gt;
1165 &lt;/License&gt;
1166 &lt;/rdf:RDF&gt;
1167</xsl:comment>
1168</xsl:template>
1169
1170<!-- GLSA Index -->
1171<xsl:template match="glsaindex">
1172 <xsl:apply-templates select="document('/dyn/glsa-index.xml')/guide/chapter[1]/section[1]/body"/>
1173</xsl:template>
1174
1175<!-- GLSA Latest (max 10) -->
1176<xsl:template match="glsa-latest">
1177 <xsl:variable name="src" select="'/dyn/glsa-index.xml'"/>
1178 <table>
1179 <xsl:for-each select="document($src)/guide/chapter[1]/section[1]/body/table[1]/tr[position()&lt;11]">
1180 <tr><xsl:apply-templates/></tr>
1181 </xsl:for-each>
1182 </table>
1183</xsl:template>
1184
1185
1186<!-- Compare versions between two documents, scan handbooks if need be -->
1187<xsl:template name="compare-versions">
1188<xsl:param name="original"/>
1189<xsl:param name="translation"/>
1190 <xsl:choose>
1191 <xsl:when test="$original/book and $translation/book">
1192 <!-- /book == /book -->
1193 <xsl:choose>
1194 <xsl:when test="$full != 0">
1195 <!-- if full != 0, then compare all files -->
1196 <!-- Compare versions in master files -->
1197 <xsl:if test="$original/book/version != $translation/book/version">X</xsl:if>
1198 <!-- Compare versions in original chapters vs. translated chapters that have the same position -->
1199 <xsl:for-each select="$original/book/part">
1200 <xsl:variable name="part" select="position()"/>
1201 <xsl:for-each select="chapter">
1202 <xsl:variable name="chap" select="position()"/>
1203 <xsl:variable name="ov" select="document($original/book/part[$part]/chapter[$chap]/include/@href)/sections/version"/>
1204 <xsl:variable name="tv" select="document($translation/book/part[$part]/chapter[$chap]/include/@href)/sections/version"/>
1205 <xsl:if test="$ov != $tv or not($tv)">X</xsl:if>
1206 </xsl:for-each>
1207 </xsl:for-each>
1208 </xsl:when>
1209 <xsl:when test="$part = '0' or $chap = '0'">
1210 <!-- Table of contents, check master file -->
1211 <xsl:if test="$original/book/version != $translation/book/version">X</xsl:if>
1212 </xsl:when>
1213 <xsl:otherwise>
1214 <!-- Compare chapters at same position (/$part/$chap/) in English handbook and in translated one -->
1215 <xsl:variable name="ov" select="document($original/book/part[position()=$part]/chapter[position()=$chap]/include/@href)/sections/version"/>
1216 <xsl:variable name="tv" select="document($translation/book/part[position()=$part]/chapter[position()=$chap]/include/@href)/sections/version"/>
1217 <xsl:if test="$ov != $tv or not($tv)">X</xsl:if>
1218 </xsl:otherwise>
1219 </xsl:choose>
1220 </xsl:when>
1221 <xsl:when test="$original/guide and $translation/guide">
1222 <!-- /guide == /guide -->
1223 <xsl:if test="$original/guide/version != $translation/guide/version">X</xsl:if>
1224 </xsl:when>
1225 <!-- If we did not compare book==book or guide==guide, then consider versions are different -->
1226 <xsl:otherwise>X</xsl:otherwise>
1227 </xsl:choose>
1228</xsl:template>
1229
1230<!-- Return the date of a document, for handbooks, it is the max(main file date, all included parts dates) -->
1231<xsl:template name="maxdate">
1232 <xsl:param name="thedoc"/>
1233 <xsl:choose>
1234 <xsl:when test="$thedoc/book">
1235 <!-- In a book: look for max(/date, include_files/sections/date) -->
1236 <xsl:for-each select="$thedoc/book/part/chapter/include">
1237 <xsl:sort select="document(@href)/sections/date" order="descending" />
1238 <xsl:if test="position() = 1">
1239 <!-- Compare the max(date) from included files with the date in the master file
1240 Of course, XSLT 1.0 knows no string comparison operator :-(
1241 So we build a node set with the two dates and we sort it.
1242 -->
1243 <xsl:variable name="theDates">
1244 <xsl:element name="bookDate">
1245 <xsl:value-of select="$thedoc/book/date"/>
1246 </xsl:element>
1247 <xsl:element name="maxChapterDate">
1248 <xsl:value-of select="document(@href)/sections/date"/>
1249 </xsl:element>
1250 </xsl:variable>
1251 <xsl:variable name="sortedDates">
1252 <xsl:for-each select="exslt:node-set($theDates)/*">
1253 <xsl:sort select="." order="descending" />
1254 <xsl:copy-of select="."/>
1255 </xsl:for-each>
1256 </xsl:variable>
1257 <!-- First date is the one we want -->
1258 <xsl:value-of select="exslt:node-set($sortedDates)/*[position()=1]"/>
1259 </xsl:if>
1260 </xsl:for-each>
1261 </xsl:when>
1262 <xsl:when test="$thedoc/guide or $thedoc/sections or $thedoc/mainpage">
1263 <xsl:value-of select="$thedoc/*[1]/date"/>
1264 </xsl:when>
1265 </xsl:choose>
1266</xsl:template>
1267
1268<xsl:template name="contentdate">
1269 <xsl:variable name="docdate">
1270 <xsl:call-template name="maxdate">
1271 <xsl:with-param name="thedoc" select="/"/>
1272 </xsl:call-template>
1273 </xsl:variable>
1274
1275 <xsl:choose>
1276 <xsl:when test="func:gettext('Updated')/docdate">
1277 <xsl:apply-templates select="func:gettext('Updated')">
1278 <xsl:with-param name="docdate" select="$docdate"/>
1279 </xsl:apply-templates>
1280 </xsl:when>
1281 <xsl:otherwise>
1282 <xsl:value-of select="concat(func:gettext('Updated'),' ')"/> <xsl:copy-of select="func:format-date($docdate)"/>
1283 </xsl:otherwise>
1284 </xsl:choose>
1285</xsl:template>
1286
1287<xsl:template name="outdated-translation">
1288 <!-- Add mention that translation is outdated whenever possible -->
1289 <xsl:variable name="link">
1290 <xsl:value-of select="/*[1]/@link"/>
1291 </xsl:variable>
1292 <xsl:if test="starts-with($link, '/doc/') and not(starts-with($link, '/doc/en/')) and $glang != ''">
1293 <!-- We have a translation, is it up-to-date? -->
1294 <xsl:variable name="metadoc" select="document(concat('/doc/', $glang, '/metadoc.xml'))"/>
1295 <xsl:variable name="fileid" select="$metadoc/metadoc/files/file[text()=$link]/@id"/>
1296 <xsl:choose>
1297 <xsl:when test="not($fileid)">
1298 <!-- File is not even listed in local metadoc.xml -->
1299 <xsl:value-of select="func:gettext('NoIndex')"/>
1300 </xsl:when>
1301 <xsl:otherwise>
1302 <xsl:variable name="pmetadoc" select="document($metadoc/metadoc/@parent)"/>
1303 <xsl:choose>
1304 <xsl:when test="not($pmetadoc/metadoc/files/file[@id=$fileid])">
1305 <!-- File is not listed in original metadoc.xml -->
1306 <xsl:value-of select="func:gettext('NoOriginal')"/>
1307 </xsl:when>
1308 <xsl:otherwise>
1309 <!-- Document is listed in both local metadoc.xml and English one, compare version numbers -->
1310 <xsl:variable name="pfile" select="$pmetadoc/metadoc/files/file[@id=$fileid]"/>
1311 <xsl:variable name="versions">
1312 <xsl:call-template name="compare-versions">
1313 <xsl:with-param name="original" select ="document($pfile)"/>
1314 <xsl:with-param name="translation" select ="/"/>
1315 </xsl:call-template>
1316 </xsl:variable>
1317 <xsl:if test="string-length($versions) > 0">
1318 <xsl:variable name="pdocdate">
1319 <xsl:call-template name="maxdate">
1320 <xsl:with-param name="thedoc" select="document($pfile)"/>
1321 </xsl:call-template>
1322 </xsl:variable>
1323 <xsl:variable name="res">
1324 <xsl:apply-templates select="func:gettext('Outdated')">
1325 <xsl:with-param name="docdate" select="$pdocdate"/>
1326 <xsl:with-param name="paramlink" select="$pfile"/>
1327 </xsl:apply-templates>
1328 </xsl:variable>
1329 <xsl:copy-of select="$res"/>
1330 </xsl:if>
1331 </xsl:otherwise>
1332 </xsl:choose>
1333 </xsl:otherwise>
1334 </xsl:choose>
1335 </xsl:if>
1336</xsl:template>
1337
1338<xsl:template match="docdate">
1339<xsl:param name="docdate"/>
1340 <xsl:copy-of select="func:format-date($docdate)"/>
1341</xsl:template>
1342
1343
1344<xsl:template name="rhcol">
1345<!-- Right-hand column with date/authors/ads -->
1346 <table border="0" cellspacing="4px" cellpadding="4px">
1347 <!-- Add a "printer-friendly" button when link attribute exists -->
1348 <xsl:if test="/book/@link or /guide/@link">
1349 <tr>
1350 <td class="topsep" align="center">
1351 <p class="altmenu">
1352 <xsl:variable name="PrintTip"><xsl:value-of select="func:gettext('PrintTip')"/></xsl:variable>
1353 <xsl:variable name="href">
1354 <xsl:choose>
1355 <xsl:when test="/book and $full != 0">
1356 <xsl:value-of select="concat(@link, '?full=1&amp;style=printable')"/>
1357 </xsl:when>
1358 <xsl:when test="/book">
1359 <xsl:value-of select="concat(@link, '?style=printable')"/>
1360 <xsl:if test="$part != '0'">&amp;part=<xsl:value-of select="$part"/></xsl:if>
1361 <xsl:if test="$chap != '0'">&amp;chap=<xsl:value-of select="$chap"/></xsl:if>
1362 </xsl:when>
1363 <xsl:when test="/guide">
1364 <xsl:value-of select="concat(@link, '?style=printable')"/>
1365 </xsl:when>
1366 </xsl:choose>
1367 </xsl:variable>
1368 <a title="{$PrintTip}" class="altlink" href="{$href}"><xsl:value-of select="func:gettext('Print')"/></a>
1369 </p>
1370 </td>
1371 </tr>
1372 </xsl:if>
1373 <xsl:choose>
1374 <xsl:when test="/book/date or /guide/date or /sections/date">
1375 <tr>
1376 <td align="center" class="topsep">
1377 <p class="alttext">
1378 <xsl:call-template name="contentdate"/>
1379 </p>
1380 </td>
1381 </tr>
1382 <xsl:variable name="outdated">
1383 <xsl:call-template name="outdated-translation"/>
1384 </xsl:variable>
1385 <xsl:if test="string-length($outdated) &gt; 1">
1386 <tr>
1387 <td align="left" class="topsep">
1388 <p class="alttext">
1389 <xsl:copy-of select="$outdated"/>
1390 </p>
1391 </td>
1392 </tr>
1393 </xsl:if>
1394 </xsl:when>
1395 <xsl:when test="/mainpage/date">
1396 <tr>
1397 <td align="center" class="topsep">
1398 <p class="alttext">
1399 <xsl:value-of select="concat(func:gettext('Updated'),' ')"/>
1400 <xsl:copy-of select="func:format-date(/mainpage/date)"/>
1401 </p>
1402 </td>
1403 </tr>
1404 </xsl:when>
1405 <xsl:when test="/news/date">
1406 <tr>
1407 <td align="center" class="topsep">
1408 <p class="alttext">
1409 <xsl:value-of select="concat(func:gettext('Updated'),' ')"/>
1410 <xsl:copy-of select="func:format-date(/news/date)"/>
1411 </p>
1412 </td>
1413 </tr>
1414 </xsl:when>
1415 </xsl:choose>
1416 <xsl:if test="/book/abstract[normalize-space(.)] or /guide/abstract[normalize-space(.)]">
915 <tr> 1417 <tr>
916 <td bgcolor="#ffffbb"> 1418 <td align="left" class="topsep">
917 <p class="note"> 1419 <p class="alttext">
918 <b>Important: </b> 1420 <!-- Abstract (summary) of the document -->
1421 <b><xsl:value-of select="func:gettext('Summary')"/>: </b>
919 <xsl:apply-templates/> 1422 <xsl:apply-templates select="abstract"/>
920 </p> 1423 </p>
921 </td> 1424 </td>
922 </tr> 1425 </tr>
1426 </xsl:if>
1427 <xsl:if test="/book/author or /guide/author">
1428 <tr>
1429 <td align="left" class="topsep">
1430 <p class="alttext">
1431 <!-- Authors -->
1432 <xsl:apply-templates select="/guide/author|/book/author"/>
1433 </p>
1434 </td>
1435 </tr>
1436 </xsl:if>
1437
1438 <tr lang="en">
1439 <td align="center" class="topsep">
1440 <p class="alttext">
1441 <b>Donate</b> to support our development efforts.
1442 </p>
1443
1444 <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
1445 <input type="hidden" name="cmd" value="_xclick"/>
1446 <input type="hidden" name="business" value="paypal@gentoo.org"/>
1447 <input type="hidden" name="item_name" value="Gentoo Linux Support"/>
1448 <input type="hidden" name="item_number" value="1000"/>
1449 <input type="hidden" name="image_url" value="/images/paypal.png"/>
1450 <input type="hidden" name="no_shipping" value="1"/>
1451 <input type="hidden" name="return" value="http://www.gentoo.org"/>
1452 <input type="hidden" name="cancel_return" value="http://www.gentoo.org"/>
1453
1454 <input type="image" src="http://images.paypal.com/images/x-click-but21.gif" name="submit" alt="Donate to Gentoo"/>
1455 </form>
1456 </td>
1457 </tr>
1458 <tr lang="en">
1459 <td align="center" class="topsep">
1460 <a href="http://www.vr.org">
1461 <img src="/images/vr-ad.png" width="125" height="144" alt="Gentoo Centric Hosting: vr.org" border="0"/>
1462 </a>
1463 <p class="alttext">
1464 <a href="http://www.vr.org/">VR Hosted</a>
1465 </p>
1466 </td>
1467 </tr>
1468 <tr lang="en">
1469 <td align="center" class="topsep">
1470 <a href="http://www.tek.net" target="_top">
1471 <img src="/images/tek-gentoo.gif" width="125" height="125" alt="Tek Alchemy" border="0"/>
1472 </a>
1473 <p class="alttext">
1474 <a href="http://www.tek.net/">Tek Alchemy</a>
1475 </p>
1476 </td>
1477 </tr>
1478 <tr lang="en">
1479 <td align="center" class="topsep">
1480 <a href="http://www.sevenl.net" target="_top">
1481 <img src="/images/sponsors/sevenl.gif" width="125" height="144" alt="SevenL.net" border="0"/>
1482 </a>
1483 <p class="alttext">
1484 <a href="http://www.sevenl.net/">SevenL.net</a>
1485 </p>
1486 </td>
1487 </tr>
1488 <tr lang="en">
1489 <td align="center" class="topsep">
1490 <a href="http://www.phparch.com/bannerclick.php?AID=68&amp;BID=1&amp;BT=127929" target="_top">
1491 <img src="/images/phpa-gentoo.gif" width="125" height="144" alt="php|architect" border="0"/>
1492 </a>
1493 <p class="alttext">
1494 <a href="http://www.phparch.com/bannerclick.php?AID=68&amp;BID=1&amp;BT=127929">php|architect</a>
1495 </p>
1496 </td>
1497 </tr>
1498 <tr>
1499 <td align="center" class="topsep"/>
1500 </tr>
923 </table> 1501 </table>
924 </xsl:template> 1502</xsl:template>
925 <xsl:template match="warn"> 1503
926 <table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0"> 1504<xsl:template name="newscontent">
927 <tr> 1505<xsl:param name="thenews"/>
928 <td bgcolor="#ffbbbb"> 1506<xsl:param name="summary"/>
929 <p class="note"> 1507<xsl:param name="link"/>
930 <b>Warning: </b> 1508
931 <xsl:apply-templates/> 1509 <div class="news">
932 </p> 1510 <p class="newshead" lang="en">
933 </td> 1511 <b><xsl:value-of select="$thenews/title"/></b>
934 </tr>
935 </table>
936 </xsl:template>
937 <xsl:template match="codenote">
938 <span class="comment">// <xsl:value-of select="."/></span>
939 </xsl:template>
940 <xsl:template match="comment">
941 <span class="comment">
942 <xsl:apply-templates/>
943 </span>
944 </xsl:template>
945 <xsl:template match="i">
946 <span class="input">
947 <xsl:apply-templates/>
948 </span>
949 </xsl:template>
950 <xsl:template match="b">
951 <b>
952 <xsl:apply-templates/>
953 </b>
954 </xsl:template>
955 <xsl:template match="brite">
956 <font color="#ff0000">
957 <b> 1512 <br/>
958 <xsl:apply-templates/> 1513 <font size="0.90em">
959 </b> 1514 Posted on <xsl:copy-of select="func:format-date($thenews/date)"/>
1515 by <xsl:value-of select="$thenews/poster"/>
960 </font> 1516 </font>
961 </xsl:template>
962
963<xsl:template match="/email/body">
964<table border="0"><tr><td>
965<span class="content">
966<p class="secthead">
967 Subject: <xsl:value-of select="/email/subject"/>
968</p>
969<p class="secthead"><font color="#000000">
970 List: <xsl:value-of select="/email/list"/> at gentoo.org<br/>
971 Date: <xsl:value-of select="/email/date"/><br/>
972 From: <xsl:value-of select="/email/from"/><br/><br/>
973 <xsl:if test="/email/nav/prev">
974 <xsl:for-each select="/email/nav/prev[position()=1]/text()">
975 <xsl:variable name="navloc" select="."/>
976 <xsl:variable name="navfile">/dyn/lists/<xsl:value-of select="/email/list"/>/<xsl:value-of select="."/>.xml</xsl:variable>
977 Previous: <a href="{$navfile}"><xsl:value-of select="document($navfile)/email/subject"/></a><br/>
978 </xsl:for-each>
979 </xsl:if>
980 <xsl:if test="/email/nav/next">
981 <xsl:for-each select="/email/nav/next[position()=1]/text()">
982 <xsl:variable name="navloc" select="."/>
983 <xsl:variable name="navfile">/dyn/lists/<xsl:value-of select="/email/list"/>/<xsl:value-of select="."/>.xml</xsl:variable>
984 Next: <a href="{$navfile}"><xsl:value-of select="document($navfile)/email/subject"/></a><br/>
985 </xsl:for-each>
986 </xsl:if>
987 <xsl:if test="/email/in-reply-to">
988 <xsl:for-each select="/email/in-reply-to[position()=1]/text()">
989 <xsl:variable name="irtloc" select="."/>
990 <xsl:variable name="irtfile">/dyn/lists/<xsl:value-of select="/email/list"/>/<xsl:value-of select="."/>.xml</xsl:variable>
991 In Reply To: <a href="{$irtfile}"><xsl:value-of select="document($irtfile)/email/subject"/></a><br/>
992 </xsl:for-each>
993 </xsl:if>
994<xsl:if test="/email/replies">
995 <br/>Replies to this message:<br/>
996 <xsl:for-each select="/email/replies/reply/text()">
997 <xsl:variable name="rloc" select="."/>
998 <xsl:variable name="rfile">/dyn/lists/<xsl:value-of select="/email/list"/>/<xsl:value-of select="."/>.xml</xsl:variable>
999 &#160;<a href="{$rfile}"><xsl:value-of select="document($rfile)/email/subject"/></a><br/>
1000 </xsl:for-each>
1001 </xsl:if>
1002</font></p>
1003</span>
1004<pre>
1005 <xsl:apply-templates/>
1006</pre>
1007</td></tr></table>
1008</xsl:template>
1009
1010 <xsl:template match="body">
1011 <xsl:param name="chid"/>
1012 <xsl:apply-templates>
1013 <xsl:with-param name="chid" select="$chid"/>
1014 </xsl:apply-templates>
1015 </xsl:template>
1016 <xsl:template match="c">
1017 <span class="code">
1018 <xsl:apply-templates/>
1019 </span>
1020 </xsl:template>
1021 <xsl:template match="box">
1022 <p class="infotext">
1023 <xsl:apply-templates/>
1024 </p> 1517 </p>
1025 </xsl:template> 1518
1026
1027 <xsl:template match="pre">
1028 <xsl:param name="chid"/>
1029 <xsl:variable name="prenum">
1030 <xsl:number level="any" from="chapter" count="pre"/>
1031 </xsl:variable>
1032 <xsl:variable name="preid">doc_chap<xsl:value-of select="$chid"/>_pre<xsl:value-of select="$prenum"/></xsl:variable>
1033 <a name="{$preid}"/>
1034 <table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0">
1035 <tr>
1036 <td class="infohead" bgcolor="#7a5ada">
1037 <p class="caption">
1038 <xsl:choose>
1039 <xsl:when test="@caption">
1040 Code listing <xsl:value-of select="$chid"/>.<xsl:value-of select="$prenum"/>: <xsl:value-of select="@caption"/>
1041 </xsl:when>
1042 <xsl:otherwise>
1043 Code listing <xsl:value-of select="$chid"/>.<xsl:value-of select="$prenum"/>
1044 </xsl:otherwise>
1045 </xsl:choose>
1046 </p>
1047 </td>
1048 </tr>
1049 <tr>
1050 <td bgcolor="#ddddff">
1051 <pre>
1052 <xsl:apply-templates/>
1053 </pre>
1054 </td>
1055 </tr>
1056 </table>
1057 </xsl:template>
1058 <xsl:template match="path">
1059 <span class="path">
1060 <xsl:value-of select="."/>
1061 </span>
1062 </xsl:template>
1063 <xsl:template match="uri">
1064<!-- expand templates to handle things like <uri link="http://bar"><c>foo</c></uri> -->
1065 <xsl:choose> 1519 <xsl:choose>
1066 <xsl:when test="@link"> 1520 <xsl:when test="$thenews/@category='alpha'">
1067 <a href="{@link}"> 1521 <img class="newsicon" src="/images/icon-alpha.gif" alt="AlphaServer GS160"/>
1068 <xsl:apply-templates/>
1069 </a>
1070 </xsl:when>
1071 <xsl:otherwise>
1072 <xsl:variable name="loc" select="."/>
1073 <a href="{$loc}">
1074 <xsl:apply-templates/>
1075 </a>
1076 </xsl:otherwise> 1522 </xsl:when>
1523 <xsl:when test="$thenews/@category='kde'">
1524 <img class="newsicon" src="/images/icon-kde.png" alt="KDE"/>
1525 </xsl:when>
1526 <xsl:when test="$thenews/@category='gentoo'">
1527 <img class="newsicon" src="/images/icon-gentoo.png" alt="gentoo"/>
1528 </xsl:when>
1529 <xsl:when test="$thenews/@category='main'">
1530 <img class="newsicon" src="/images/icon-stick.png" alt="stick man"/>
1531 </xsl:when>
1532 <xsl:when test="$thenews/@category='ibm'">
1533 <img class="newsicon" src="/images/icon-ibm.gif" alt="ibm"/>
1534 </xsl:when>
1535 <xsl:when test="$thenews/@category='linux'">
1536 <img class="newsicon" src="/images/icon-penguin.png" alt="tux"/>
1537 </xsl:when>
1538 <xsl:when test="$thenews/@category='moo'">
1539 <img class="newsicon" src="/images/icon-cow.png" alt="Larry the Cow"/>
1540 </xsl:when>
1541 <xsl:when test="$thenews/@category='plans'">
1542 <img class="newsicon" src="/images/icon-clock.png" alt="Clock"/>
1543 </xsl:when>
1544 <xsl:when test="$thenews/@category='nvidia'">
1545 <img class="newsicon" src="/images/icon-nvidia.png" alt="Nvidia"/>
1546 </xsl:when>
1547 <xsl:when test="$thenews/@category='freescale'">
1548 <img class="newsicon" src="/images/icon-freescale.gif" alt="Freescale Semiconductor"/>
1549 </xsl:when>
1077 </xsl:choose> 1550 </xsl:choose>
1078 </xsl:template> 1551
1079 <xsl:template match="p"> 1552 <div class="newsitem">
1080 <xsl:param name="chid"/>
1081 <xsl:choose> 1553 <xsl:choose>
1082 <xsl:when test="@class"> 1554 <xsl:when test="$thenews/summary and $summary='yes'">
1083 <p class="{@class}"> 1555 <xsl:apply-templates select="$thenews/summary"/>
1084 <xsl:apply-templates> 1556 <br/>
1085 <xsl:with-param name="chid" select="$chid"/> 1557 <a href="{$link}"><b>(full story)</b></a>
1086 </xsl:apply-templates>
1087 </p>
1088 </xsl:when> 1558 </xsl:when>
1089 <xsl:otherwise> 1559 <xsl:when test="$thenews/body">
1090 <p> 1560 <xsl:apply-templates select="$thenews/body"/>
1091 <xsl:apply-templates> 1561 </xsl:when>
1092 <xsl:with-param name="chid" select="$chid"/>
1093 </xsl:apply-templates>
1094 </p>
1095 </xsl:otherwise>
1096 </xsl:choose> 1562 </xsl:choose>
1563 </div>
1564 </div>
1097 </xsl:template> 1565</xsl:template>
1098 <xsl:template match="e"> 1566
1099 <span class="emphasis">
1100 <xsl:apply-templates/>
1101 </span>
1102 </xsl:template>
1103 <xsl:template match="mail">
1104 <a href="mailto:{@link}">
1105 <xsl:value-of select="."/>
1106 </a>
1107 </xsl:template>
1108 <xsl:template match="table">
1109 <table class="ntable">
1110 <xsl:apply-templates/>
1111 </table>
1112 </xsl:template>
1113 <xsl:template match="tr">
1114 <tr>
1115 <xsl:apply-templates/>
1116 </tr>
1117 </xsl:template>
1118 <xsl:template match="ti">
1119 <td bgcolor="#ddddff" class="tableinfo">
1120 <xsl:apply-templates/>
1121 </td>
1122 </xsl:template>
1123 <xsl:template match="th">
1124 <td bgcolor="#7a5ada" class="infohead">
1125 <b>
1126 <xsl:apply-templates/>
1127 </b>
1128 </td>
1129 </xsl:template>
1130 <xsl:template match="ul">
1131 <ul>
1132 <xsl:apply-templates/>
1133 </ul>
1134 </xsl:template>
1135 <xsl:template match="ol">
1136 <ol>
1137 <xsl:apply-templates/>
1138 </ol>
1139 </xsl:template>
1140 <xsl:template match="li">
1141 <li>
1142 <xsl:apply-templates/>
1143 </li>
1144 </xsl:template>
1145 <xsl:template match="ignoreinemail">
1146 <xsl:apply-templates/>
1147 </xsl:template>
1148 <xsl:template match="ignoreinguide">
1149 </xsl:template>
1150<xsl:template match="license">
1151<pre>
1152This work is licensed under the <a href="http://creativecommons.org/licenses/by-sa/1.0">Creative Commons - Attribution / Share Alike</a> license.
1153</pre>
1154</xsl:template>
1155 1567
1156</xsl:stylesheet> 1568</xsl:stylesheet>

Legend:
Removed from v.1.66  
changed lines
  Added in v.1.177

  ViewVC Help
Powered by ViewVC 1.1.13