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

Contents of /xml/htdocs/xsl/guide.xsl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.155 - (show annotations) (download) (as text)
Wed Jul 13 11:38:23 2005 UTC (7 years, 10 months ago) by swift
Branch: MAIN
Changes since 1.154: +2 -0 lines
File MIME type: application/xml
Adding "Supporting Vendors" to the menu

1 <?xml version="1.0" encoding="UTF-8"?>
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
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 -->
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 <!-- img tag -->
22 <xsl:template match="img">
23 <img src="{@src}"/>
24 </xsl:template>
25
26 <!-- Content of /guide -->
27 <xsl:template name="guidecontent">
28 <xsl:if test="$style != 'printable'">
29 <br />
30 </xsl:if>
31 <h1>
32 <xsl:choose>
33 <xsl:when test="/guide/subtitle"><xsl:value-of select="/guide/title"/>: <xsl:value-of select="/guide/subtitle"/></xsl:when>
34 <xsl:otherwise><xsl:value-of select="/guide/title"/></xsl:otherwise>
35 </xsl:choose>
36 </h1>
37
38 <xsl:choose>
39 <xsl:when test="$style = 'printable'">
40 <xsl:apply-templates select="author" />
41 <br/>
42 <i><xsl:call-template name="contentdate"/></i>
43 </xsl:when>
44 <xsl:otherwise>
45 <xsl:if test="count(/guide/chapter)&gt;1">
46 <form name="contents" action="http://www.gentoo.org">
47 <b><xsl:value-of select="func:gettext('Content')"/></b>:
48 <select name="url" size="1" OnChange="location.href=form.url.options[form.url.selectedIndex].value" style="font-family:sans-serif,Arial,Helvetica">
49 <xsl:for-each select="chapter">
50 <xsl:variable name="chapid">doc_chap<xsl:number/></xsl:variable><option value="#{$chapid}"><xsl:number/>. <xsl:value-of select="title"/></option>
51 </xsl:for-each>
52 </select>
53 </form>
54 </xsl:if>
55 </xsl:otherwise>
56 </xsl:choose>
57
58 <xsl:choose>
59 <xsl:when test="/guide">
60 <xsl:apply-templates select="chapter"/>
61 </xsl:when>
62 <xsl:when test="/sections">
63 <xsl:apply-templates select="/sections/section"/>
64 </xsl:when>
65 </xsl:choose>
66 <br/>
67 <xsl:if test="/guide/license">
68 <xsl:apply-templates select="license" />
69 </xsl:if>
70 <br/>
71 </xsl:template>
72
73 <!-- Layout for documentation -->
74 <xsl:template name="doclayout">
75 <xsl:call-template name="commonHTMLheader" />
76 <title>
77 <xsl:choose>
78 <xsl:when test="/guide/@type='project'">Gentoo Linux Projects</xsl:when>
79 <xsl:when test="/guide/@type='newsletter'">Gentoo Linux Newsletter</xsl:when>
80 <xsl:when test="/sections">Gentoo Linux Handbook Page</xsl:when>
81 <xsl:otherwise><xsl:value-of select="func:gettext('GLinuxDoc')"/></xsl:otherwise>
82 </xsl:choose>
83 --
84 <xsl:choose>
85 <xsl:when test="subtitle"><xsl:if test="/guide/@type!='newsletter'"><xsl:value-of select="title"/>:</xsl:if> <xsl:value-of select="subtitle"/></xsl:when>
86 <xsl:otherwise><xsl:value-of select="title"/></xsl:otherwise>
87 </xsl:choose>
88 </title>
89
90 <xsl:text disable-output-escaping="yes">&lt;/head&gt;</xsl:text>
91 <xsl:choose>
92 <xsl:when test="$style = 'printable'">
93 <!-- Insert the node-specific content -->
94 <body bgcolor="#ffffff">
95 <xsl:call-template name="content"/>
96 </body>
97 </xsl:when>
98 <xsl:otherwise>
99 <body style="margin:0px;" bgcolor="#ffffff">
100 <table width="100%" border="0" cellspacing="0" cellpadding="0">
101 <tr>
102 <td valign="top" height="125" bgcolor="#45347b">
103 <a href="/"><img border="0" src="/images/gtop-www.jpg" alt="Gentoo Logo"/></a>
104 </td>
105 </tr>
106 <tr>
107 <td valign="top" align="right" colspan="1" bgcolor="#ffffff">
108 <table border="0" cellspacing="0" cellpadding="0" width="100%">
109 <tr>
110 <td width="99%" class="content" valign="top" align="left">
111 <!-- Insert the node-specific content -->
112 <xsl:call-template name="content"/>
113 </td>
114 <td width="1%" bgcolor="#dddaec" valign="top">
115 <xsl:call-template name="rhcol"/>
116 </td>
117 </tr>
118 </table>
119 </td>
120 </tr>
121 <tr>
122 <td colspan="2" align="right" class="infohead">
123 Copyright 2001-2005 Gentoo Foundation, Inc. Questions, Comments, Corrections? Email <a class="highlight" href="mailto:www@gentoo.org">www@gentoo.org</a>.
124 </td>
125 </tr>
126 </table>
127
128 </body>
129 </xsl:otherwise>
130 </xsl:choose>
131 <xsl:text disable-output-escaping="yes">&lt;/html&gt;</xsl:text>
132 </xsl:template>
133
134 <!-- Guide template -->
135 <xsl:template match="/guide">
136 <xsl:call-template name="doclayout" />
137 </xsl:template>
138
139 <!-- {Mainpage, News, Email} template -->
140 <xsl:template match="/mainpage | /news | /email">
141 <xsl:call-template name="commonHTMLheader" />
142 <xsl:if test="/mainpage/@id='news'">
143 <link rel="alternate" type="application/rss+xml" title="Gentoo Linux News RDF" href="http://www.gentoo.org/rdf/en/gentoo-news.rdf" />
144 </xsl:if>
145 <xsl:choose>
146 <xsl:when test="/mainpage | /news">
147 <title>Gentoo Linux -- <xsl:value-of select="title"/></title>
148 </xsl:when>
149 <xsl:when test="/email">
150 <title><xsl:value-of select="subject"/></title>
151 </xsl:when>
152 </xsl:choose>
153 <xsl:text disable-output-escaping="yes">&lt;/head&gt;</xsl:text>
154 <body style="margin:0px;" bgcolor="#000000">
155
156 <table border="0" width="100%" cellspacing="0" cellpadding="0">
157 <tr>
158 <td valign="top" height="125" width="1%" bgcolor="#45347b">
159 <a href="/"><img border="0" src="/images/gtop-www.jpg" alt="Gentoo Logo"/></a>
160 </td>
161
162 <td valign="bottom" align="left" bgcolor="#000000" colspan="2" lang="en">
163 <p class="menu">
164 <xsl:choose>
165 <xsl:when test="/mainpage/@id='about'">
166 <a class="highlight" href="/main/en/about.xml">About</a>
167 </xsl:when>
168 <xsl:otherwise>
169 <a class="menulink" href="/main/en/about.xml">About</a>
170 </xsl:otherwise>
171 </xsl:choose>
172 |
173 <xsl:choose>
174 <xsl:when test="/mainpage/@id='projects'">
175 <a class="highlight" href="/proj/en/index.xml?showlevel=1">Projects</a>
176 </xsl:when>
177 <xsl:otherwise>
178 <a class="menulink" href="/proj/en/index.xml?showlevel=1">Projects</a>
179 </xsl:otherwise>
180 </xsl:choose>
181 |
182 <xsl:choose>
183 <xsl:when test="/mainpage/@id='docs'">
184 <a class="highlight" href="/doc/en/index.xml">Docs</a>
185 </xsl:when>
186 <xsl:otherwise>
187 <a class="menulink" href="/doc/en/index.xml">Docs</a>
188 </xsl:otherwise>
189 </xsl:choose>
190 | <a class="menulink" href="http://forums.gentoo.org">Forums</a>
191 |
192 <xsl:choose>
193 <xsl:when test="/mainpage/@id='lists'">
194 <a class="highlight" href="/main/en/lists.xml">Lists</a>
195 </xsl:when>
196 <xsl:otherwise>
197 <a class="menulink" href="/main/en/lists.xml">Lists</a>
198 </xsl:otherwise>
199 </xsl:choose>
200 | <a class="menulink" href="http://bugs.gentoo.org">Bugs</a>
201 | <a class="menulink" href="http://www.cafepress.com/officialgentoo/">Store</a>
202 |
203 <xsl:choose>
204 <xsl:when test="/mainpage/@id='newsletter'">
205 <a class="highlight" href="/news/en/gwn/gwn.xml"> GWN</a>
206 </xsl:when>
207 <xsl:otherwise>
208 <a class="menulink" href="/news/en/gwn/gwn.xml"> GWN</a>
209 </xsl:otherwise>
210 </xsl:choose>
211 |
212 <xsl:choose>
213 <xsl:when test="/mainpage/@id='where'">
214 <a class="highlight" href="/main/en/where.xml">Get Gentoo!</a>
215 </xsl:when>
216 <xsl:otherwise>
217 <a class="menulink" href="/main/en/where.xml">Get Gentoo!</a>
218 </xsl:otherwise>
219 </xsl:choose>
220 |
221 <xsl:choose>
222 <xsl:when test="/mainpage/@id='support'">
223 <a class="highlight" href="/main/en/support.xml">Support</a>
224 </xsl:when>
225 <xsl:otherwise>
226 <a class="menulink" href="/main/en/support.xml">Support</a>
227 </xsl:otherwise>
228 </xsl:choose>
229 |
230 <xsl:choose>
231 <xsl:when test="/mainpage/@id='sponsors'">
232 <a class="highlight" href="/main/en/sponsors.xml">Sponsors</a>
233 </xsl:when>
234 <xsl:otherwise>
235 <a class="menulink" href="/main/en/sponsors.xml">Sponsors</a>
236 </xsl:otherwise>
237 </xsl:choose>
238 | <a class="menulink" href="http://planet.gentoo.org">Planet</a>
239 </p>
240 </td>
241 </tr>
242 <tr>
243 <td valign="top" align="right" width="1%" bgcolor="#dddaec">
244 <table width="100%" cellspacing="0" cellpadding="0" border="0">
245 <tr>
246 <td height="1%" valign="top" align="right">
247 <img src="/images/gridtest.gif" alt="Gentoo Spaceship"/>
248 </td>
249 </tr>
250 <tr>
251 <td height="99%" valign="top" align="left">
252 <!--info goes here-->
253 <table cellspacing="0" cellpadding="5" border="0">
254 <tr>
255 <td valign="top" class="leftmenu" lang="en">
256 <p class="altmenu">
257 Installation:
258 <br/>
259 <a class="altlink" href="/doc/en/handbook/index.xml">Gentoo Handbook</a>
260 <br/>
261 <a class="altlink" href="/doc/en/index.xml?catid=install#doc_chap2">Installation Docs</a>
262 <br/><br/>
263 Documentation:
264 <br/>
265 <a class="altlink" href="/doc/en/">Main Index</a>
266 <br/>
267 <a class="altlink" href="/main/en/about.xml">About Gentoo</a>
268 <br/>
269 <a class="altlink" href="/main/en/philosophy.xml">Philosophy</a>
270 <br/>
271 <a class="altlink" href="/main/en/contract.xml">Social Contract</a>
272 <br/><br/>
273 Resources:
274 <br/>
275 <a class="altlink" href="http://bugs.gentoo.org">Bug Tracker</a>
276 <br/>
277 <a class="altlink" href="http://forums.gentoo.org">Discussion Forums</a>
278 <br/>
279 <a class="altlink" href="/main/en/lists.xml">Mailing Lists</a>
280 <br/>
281 <a class="altlink" href="/main/en/irc.xml">IRC Channels</a>
282 <br/>
283 <a class="altlink" href="/security/en/index.xml">Security Announcements</a>
284 <br/>
285 <a class="altlink" href="http://packages.gentoo.org/">Online Package Database</a>
286 <br/>
287 <a class="altlink" href="/proj/en/devrel/roll-call/userinfo.xml">Developer List</a>
288 <br/>
289 <a class="altlink" href="http://viewcvs.gentoo.org/">View our CVS</a>
290 <br/>
291 <a class="altlink" href="/proj/en/devrel/staffing-needs/">Staffing Needs</a>
292 <br/>
293 <a class="altlink" href="/main/en/mirrors.xml">Mirrors</a>
294 <br/>
295 <a class="altlink" href="http://torrents.gentoo.org/">Gentoo BitTorrents</a>
296 <br/>
297 <a class="altlink" href="http://vendors.gentoo.org/">Supporting Vendors</a>
298 <br/>
299 <a class="altlink" href="/proj/en/glep/">Gentoo Linux Enhancement Proposals</a>
300 <br/>
301 <a class="altlink" href="/main/en/name-logo.xml">Name and Logo Guidelines</a>
302 <!--
303 <a class="altlink" href="/dyn/index-cvs.xml">Daily CVS ChangeLog</a>
304 -->
305 <!--<a class="altlink" href="http://stats.gentoo.org">Gentoo Usage Statistics</a>
306 <br/>
307 <a class="altlink" href="http://stable.gentoo.org">Gentoo Stable Project</a>
308 <br/>
309 -->
310 <br/><br/>
311 Graphics:
312 <br/>
313 <a class="altlink" href="/main/en/graphics.xml">Logos and themes</a>
314 <br/>
315 <a class="altlink" href="/dyn/icons.xml">Icons</a>
316 <br/>
317 <a class="altlink" href="/main/en/shots.xml">ScreenShots</a>
318 <br/><br/>
319 Miscellaneous Resources:
320 <br/>
321 <a class="altlink" href="http://www.cafepress.com/officialgentoo/">Gentoo Linux Store</a>
322 <br/>
323 <a class="altlink" href="/main/en/projects.xml">Gentoo-hosted projects</a>
324 <br/>
325 <a class="altlink" href="/main/en/articles.xml">IBM dW/Intel article archive</a>
326 <xsl:if test="/mainpage/@id='news'">
327 <br/><br/>
328 Older News:<br/>
329 <xsl:for-each select="document('/dyn/news-index.xml')/uris/uri[position()&gt;$newsitemcount][position()&lt;20]/text()">
330 <xsl:variable name="newsuri" select="."/>
331 <a class="altlink" href="{$newsuri}"><xsl:value-of select="document(.)/news/title"/></a>
332 <br/>
333 </xsl:for-each>
334 </xsl:if>
335 </p>
336 <br/><br />
337 </td>
338 </tr>
339 </table>
340 </td>
341 </tr>
342 </table>
343 </td>
344 <!-- Content below top menu and between left menu and ads -->
345 <td valign="top" bgcolor="#ffffff">
346 <xsl:choose>
347 <xsl:when test="/mainpage/@id='news'">
348 <p class="news">
349 <img class="newsicon" src="/images/gentoo-new.gif" alt="Gentoo logo"/>
350 <span class="newsitem" lang="en">We produce Gentoo Linux, a special flavor of Linux that
351 can be automatically optimized and customized for just
352 about any application or need. Extreme performance,
353 configurability and a top-notch user and developer
354 community are all hallmarks of the Gentoo experience.
355 To learn more, read our <b><a href="/main/en/about.xml">about
356 page</a></b>.</span>
357 </p>
358 <xsl:for-each select="document('/dyn/news-index.xml')/uris/uri[position()&lt;=$newsitemcount]/text()">
359 <xsl:call-template name="newscontent">
360 <xsl:with-param name="thenews" select="document(.)/news"/>
361 <xsl:with-param name="summary" select="'yes'"/>
362 <xsl:with-param name="link" select="."/>
363 </xsl:call-template>
364 </xsl:for-each>
365 </xsl:when>
366 <xsl:when test="/news">
367 <xsl:call-template name="newscontent">
368 <xsl:with-param name="thenews" select="/news"/>
369 <xsl:with-param name="summary" select="no"/>
370 </xsl:call-template>
371 </xsl:when>
372 </xsl:choose>
373 <br/>
374 <table border="0" class="content">
375 <tr>
376 <td>
377 <xsl:apply-templates select="chapter"/>
378 </td>
379 </tr>
380 </table>
381 <br/>
382 <xsl:if test="/mainpage/license">
383 <xsl:apply-templates select="license" />
384 </xsl:if>
385 <br/>
386 <!--content end-->
387 </td>
388 <td width="1%" bgcolor="#dddaec" valign="top">
389 <xsl:call-template name="rhcol"/>
390 </td>
391 </tr>
392 <tr lang="en">
393 <td align="right" class="infohead" colspan="3">
394 Copyright 2001-2005 Gentoo Foundation, Inc. Questions, Comments, Corrections? Email <a class="highlight" href="mailto:www@gentoo.org">www@gentoo.org</a>.
395 </td>
396 </tr>
397 </table>
398
399 </body>
400 <xsl:text disable-output-escaping="yes">&lt;/html&gt;</xsl:text>
401 </xsl:template>
402
403 <!-- Mail template -->
404 <xsl:template match="mail">
405 <a href="mailto:{@link}"><xsl:value-of select="."/></a>
406 </xsl:template>
407
408 <!-- Mail inside <author>...</author> -->
409 <xsl:template match="/guide/author/mail|/book/author/mail">
410 <b>
411 <a class="altlink" href="mailto:{@link}"><xsl:value-of select="."/></a>
412 </b>
413 </xsl:template>
414
415 <!-- Author -->
416 <xsl:template match="author">
417 <xsl:apply-templates/>
418 <xsl:if test="@title">
419 <xsl:if test="$style != 'printable'">
420 <br/>
421 </xsl:if>
422 <xsl:if test="$style = 'printable'">&#160;</xsl:if>
423 <i><xsl:value-of select="@title"/></i>
424 </xsl:if>
425 <br/>
426 <xsl:if test="$style != 'printable' and position()!=last()">
427 <br/>
428 </xsl:if>
429 </xsl:template>
430
431 <!-- Chapter -->
432 <xsl:template match="chapter">
433 <xsl:variable name="chid"><xsl:number/></xsl:variable>
434 <xsl:choose>
435 <xsl:when test="title">
436 <p class="chaphead">
437 <xsl:if test="@id">
438 <a name="{@id}"/>
439 </xsl:if>
440 <span class="chapnum">
441 <a name="doc_chap{$chid}"><xsl:number/>. </a>
442 </span>
443 <xsl:value-of select="title"/>
444 </p>
445 </xsl:when>
446 <xsl:otherwise>
447 <xsl:if test="/guide">
448 <p class="chaphead">
449 <span class="chapnum">
450 <a name="doc_chap{$chid}"><xsl:number/>.</a>
451 </span>
452 </p>
453 </xsl:if>
454 </xsl:otherwise>
455 </xsl:choose>
456 <xsl:apply-templates select="body">
457 <xsl:with-param name="chid" select="$chid"/>
458 </xsl:apply-templates>
459 <xsl:apply-templates select="section">
460 <xsl:with-param name="chid" select="$chid"/>
461 </xsl:apply-templates>
462 </xsl:template>
463
464
465 <!-- Section template -->
466 <xsl:template match="section">
467 <xsl:param name="chid"/>
468 <xsl:if test="title">
469 <xsl:variable name="sectid">doc_chap<xsl:value-of select="$chid"/>_sect<xsl:number/></xsl:variable>
470 <xsl:if test="@id">
471 <a name="{@id}"/>
472 </xsl:if>
473 <p class="secthead">
474 <a name="{$sectid}"><xsl:value-of select="title"/></a>
475 </p>
476 </xsl:if>
477 <xsl:apply-templates select="body">
478 <xsl:with-param name="chid" select="$chid"/>
479 </xsl:apply-templates>
480 </xsl:template>
481
482 <!-- Figure template -->
483 <xsl:template match="figure">
484 <xsl:param name="chid"/>
485 <xsl:variable name="fignum"><xsl:number level="any" from="chapter" count="figure"/></xsl:variable>
486 <xsl:variable name="figid">doc_chap<xsl:value-of select="$chid"/>_fig<xsl:value-of select="$fignum"/></xsl:variable>
487 <xsl:variable name="llink">
488 <xsl:choose>
489 <xsl:when test="starts-with(@link,'http://www.gentoo.org/')">
490 <xsl:value-of select="substring-after(@link, 'http://www.gentoo.org')"/>
491 </xsl:when>
492 <xsl:otherwise>
493 <xsl:value-of select="@link"/>
494 </xsl:otherwise>
495 </xsl:choose>
496 </xsl:variable>
497 <br/>
498 <a name="{$figid}"/>
499 <table cellspacing="0" cellpadding="0" border="0">
500 <tr>
501 <td bgcolor="#7a5ada">
502 <p class="codetitle">
503 <xsl:choose>
504 <xsl:when test="@caption">
505 <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"/>
506 </xsl:when>
507 <xsl:otherwise>
508 <xsl:value-of select="func:gettext('Figure')"/>&#160;<xsl:value-of select="$chid"/>.<xsl:value-of select="$fignum"/>
509 </xsl:otherwise>
510 </xsl:choose>
511 </p>
512 </td>
513 </tr>
514 <tr>
515 <td align="center" bgcolor="#ddddff">
516 <xsl:choose>
517 <xsl:when test="@short">
518 <img src="{$llink}" alt="Fig. {$fignum}: {@short}"/>
519 </xsl:when>
520 <xsl:otherwise>
521 <img src="{$llink}" alt="Fig. {$fignum}"/>
522 </xsl:otherwise>
523 </xsl:choose>
524 </td>
525 </tr>
526 </table>
527 <br/>
528 </xsl:template>
529
530 <!--figure without a caption; just a graphical element-->
531 <xsl:template match="fig">
532 <center>
533 <xsl:choose>
534 <xsl:when test="@linkto">
535 <a href="{@linkto}"><img border="0" src="{@link}" alt="{@short}"/></a>
536 </xsl:when>
537 <xsl:otherwise>
538 <img src="{@link}" alt="{@short}"/>
539 </xsl:otherwise>
540 </xsl:choose>
541 </center>
542 </xsl:template>
543
544 <!-- Line break -->
545 <xsl:template match="br">
546 <br/>
547 </xsl:template>
548
549 <!-- Note -->
550 <xsl:template match="note">
551 <table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0">
552 <tr>
553 <td bgcolor="#bbffbb">
554 <p class="note">
555 <b><xsl:value-of select="func:gettext('Note')"/>: </b>
556 <xsl:apply-templates/>
557 </p>
558 </td>
559 </tr>
560 </table>
561 </xsl:template>
562
563 <!-- Important item -->
564 <xsl:template match="impo">
565 <table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0">
566 <tr>
567 <td bgcolor="#ffffbb">
568 <p class="note">
569 <b><xsl:value-of select="func:gettext('Important')"/>: </b>
570 <xsl:apply-templates/>
571 </p>
572 </td>
573 </tr>
574 </table>
575 </xsl:template>
576
577 <!-- Warning -->
578 <xsl:template match="warn">
579 <table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0">
580 <tr>
581 <td bgcolor="#ffbbbb">
582 <p class="note">
583 <b><xsl:value-of select="func:gettext('Warning')"/>: </b>
584 <xsl:apply-templates/>
585 </p>
586 </td>
587 </tr>
588 </table>
589 </xsl:template>
590
591 <!-- Code note -->
592 <xsl:template match="codenote">
593 <span class="comment">
594 <xsl:if test='not(starts-with(., "("))'>(</xsl:if>
595 <xsl:apply-templates/>
596 <xsl:if test='not(starts-with(., "("))'>)</xsl:if>
597 </span>
598 </xsl:template>
599
600 <!-- Regular comment -->
601 <xsl:template match="comment">
602 <span class="comment">
603 <xsl:apply-templates/>
604 </span>
605 </xsl:template>
606
607 <!-- User input -->
608 <xsl:template match="i">
609 <span class="input"><xsl:apply-templates/></span>
610 </xsl:template>
611
612 <!-- Bold -->
613 <xsl:template match="b">
614 <b><xsl:apply-templates/></b>
615 </xsl:template>
616
617 <!-- Brite -->
618 <xsl:template match="brite">
619 <font color="#ff0000">
620 <b><xsl:apply-templates/></b>
621 </font>
622 </xsl:template>
623
624 <!-- Body inside email -->
625 <xsl:template match="/email/body">
626 <table border="0">
627 <tr>
628 <td>
629 <span class="content">
630 <p class="secthead">
631 Subject: <xsl:value-of select="/email/subject"/>
632 </p>
633 <p class="secthead">
634 <font color="#000000">
635 List: <xsl:value-of select="/email/list"/> at gentoo.org<br/>
636 Date: <xsl:value-of select="/email/date"/><br/>
637 From: <xsl:value-of select="/email/from"/><br/><br/>
638 <xsl:if test="/email/nav/prev">
639 <xsl:for-each select="/email/nav/prev[position()=1]/text()">
640 <xsl:variable name="navloc" select="."/>
641 <xsl:variable name="navfile">/dyn/lists/<xsl:value-of select="/email/list"/>/<xsl:value-of select="."/>.xml</xsl:variable>
642 Previous: <a href="{$navfile}"><xsl:value-of select="document($navfile)/email/subject"/></a><br/>
643 </xsl:for-each>
644 </xsl:if>
645 <xsl:if test="/email/nav/next">
646 <xsl:for-each select="/email/nav/next[position()=1]/text()">
647 <xsl:variable name="navloc" select="."/>
648 <xsl:variable name="navfile">/dyn/lists/<xsl:value-of select="/email/list"/>/<xsl:value-of select="."/>.xml</xsl:variable>
649 Next: <a href="{$navfile}"><xsl:value-of select="document($navfile)/email/subject"/></a><br/>
650 </xsl:for-each>
651 </xsl:if>
652 <xsl:if test="/email/in-reply-to">
653 <xsl:for-each select="/email/in-reply-to[position()=1]/text()">
654 <xsl:variable name="irtloc" select="."/>
655 <xsl:variable name="irtfile">/dyn/lists/<xsl:value-of select="/email/list"/>/<xsl:value-of select="."/>.xml</xsl:variable>
656 In Reply To: <a href="{$irtfile}"><xsl:value-of select="document($irtfile)/email/subject"/></a><br/>
657 </xsl:for-each>
658 </xsl:if>
659 <xsl:if test="/email/replies">
660 <br/>Replies to this message:<br/>
661 <xsl:for-each select="/email/replies/reply/text()">
662 <xsl:variable name="rloc" select="."/>
663 <xsl:variable name="rfile">/dyn/lists/<xsl:value-of select="/email/list"/>/<xsl:value-of select="."/>.xml</xsl:variable>
664 &#160;<a href="{$rfile}"><xsl:value-of select="document($rfile)/email/subject"/></a><br/>
665 </xsl:for-each>
666 </xsl:if>
667 </font>
668 </p>
669 </span>
670 <pre>
671 <xsl:apply-templates/>
672 </pre>
673 </td>
674 </tr>
675 </table>
676 </xsl:template>
677
678 <!-- Body -->
679 <xsl:template match="body">
680 <xsl:param name="chid"/>
681 <xsl:apply-templates>
682 <xsl:with-param name="chid" select="$chid"/>
683 </xsl:apply-templates>
684 </xsl:template>
685
686 <!-- Command or input, not to use inside <pre> -->
687 <xsl:template match="c">
688 <span class="code"><xsl:apply-templates/></span>
689 </xsl:template>
690
691 <!-- Box with small text -->
692 <xsl:template match="box">
693 <p class="infotext"><xsl:apply-templates/></p>
694 </xsl:template>
695
696 <!-- Preserve whitespace, aka Code Listing -->
697 <xsl:template match="pre">
698 <xsl:param name="chid"/>
699 <xsl:variable name="prenum"><xsl:number level="any" from="chapter" count="pre"/></xsl:variable>
700 <xsl:variable name="preid">doc_chap<xsl:value-of select="$chid"/>_pre<xsl:value-of select="$prenum"/></xsl:variable>
701 <a name="{$preid}"/>
702 <table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0">
703 <tr>
704 <td bgcolor="#7a5ada">
705 <p class="codetitle">
706 <xsl:value-of select="func:gettext('CodeListing')"/>&#160;<xsl:if test="$chid"><xsl:value-of select="$chid"/>.</xsl:if><xsl:value-of select="$prenum"/>
707 <xsl:if test="@caption">
708 <xsl:value-of select="func:gettext('SpaceBeforeColon')"/>: <xsl:value-of select="@caption"/>
709 </xsl:if>
710 </p>
711 </td>
712 </tr>
713 <tr>
714 <td bgcolor="#ddddff">
715 <pre>
716 <xsl:apply-templates/>
717 </pre>
718 </td>
719 </tr>
720 </table>
721 </xsl:template>
722
723 <!-- Path -->
724 <xsl:template match="path">
725 <span class="path"><xsl:value-of select="."/></span>
726 </xsl:template>
727
728 <!-- Url -->
729 <xsl:template match="uri">
730 <!-- expand templates to handle things like <uri link="http://bar"><c>foo</c></uri> -->
731 <xsl:choose>
732 <xsl:when test="@link">
733 <xsl:choose>
734 <xsl:when test="($TTOP = 'sections') and (starts-with(@link, '?'))">
735 <!-- Handbook link pointing to another part/chapter when viewing a single page,
736 cannot be a link because we have no idea where to link to
737 Besides, we have no way of knowing the language unless told via a param -->
738 <xsl:variable name="nolink"><xsl:value-of select="func:gettext('hb_file', $glang)"/></xsl:variable>
739 <span title="{$nolink}"><font color="#404080">(<xsl:apply-templates/>)</font></span>
740 </xsl:when>
741 <xsl:when test="($TTOP = 'book') and ($full = 0) and (starts-with(@link, '?'))">
742 <!-- Handbook link pointing to another part/chapter, normal case -->
743 <xsl:choose>
744 <xsl:when test="$style != 'printable'">
745 <a href="{$LINK}{@link}"><xsl:apply-templates/></a>
746 </xsl:when>
747 <xsl:otherwise>
748 <a href="{$LINK}{@link}&amp;style=printable"><xsl:apply-templates/></a>
749 </xsl:otherwise>
750 </xsl:choose>
751 </xsl:when>
752 <xsl:when test="($TTOP = 'book') and ($full = 1) and (starts-with(@link, '?'))">
753 <!-- Handbook link pointing to another part/chapter
754 Handbook is being rendered in a single page (full=1)
755 Hence link needs to be rewritten as a local one
756 i.e. ?part=1&chap=3#doc_chap1 must become #book_part1_chap3__chap1 Case 1a
757 i.e. ?part=1&chap=3#anID must become #anID Case 1b
758 or ?part=1&chap=3 must become #book_part1_chap3 Case 2
759 or ?part=2 must become #book_part2 Case 3-->
760 <xsl:choose>
761 <xsl:when test="contains(@link, 'chap=') and contains(@link, '#doc_')">
762 <!-- Link points inside a chapter (Case 1a)-->
763 <xsl:param name="linkpart" select="substring-after(substring-before(@link, '&amp;'), '=')" />
764 <xsl:param name="linkchap" select="substring-before(substring-after(substring-after(@link, '&amp;'), '='), '#doc_')" />
765 <xsl:param name="linkanch" select="substring-after(@link, '#doc_')" />
766 <a href="#book_part{$linkpart}_chap{$linkchap}__{$linkanch}"><xsl:apply-templates /></a>
767 </xsl:when>
768 <xsl:when test="contains(@link, 'chap=') and contains(@link, '#')">
769 <!-- Link points inside a chapter via an ID (Case 1b)
770 (IDs are expected to be unique throughout a handbook) -->
771 <xsl:param name="linkanch" select="substring-after(@link, '#')" />
772 <a href="#{$linkanch}"><xsl:apply-templates /></a>
773 </xsl:when>
774 <xsl:when test="contains(@link, 'chap=')">
775 <!-- Link points to a chapter (Case 2)-->
776 <xsl:param name="linkpart" select="substring-after(substring-before(@link, '&amp;'), '=')" />
777 <xsl:param name="linkchap" select="substring-after(substring-after(@link, '&amp;'), '=')" />
778 <a href="#book_part{$linkpart}_chap{$linkchap}"><xsl:apply-templates /></a>
779 </xsl:when>
780 <xsl:otherwise>
781 <!-- Link points to a part (Case 3)-->
782 <xsl:param name="linkpart" select="substring-after(@link, '=')" />
783 <a href="#book_part{$linkpart}"><xsl:apply-templates/></a>
784 </xsl:otherwise>
785 </xsl:choose>
786 </xsl:when>
787 <xsl:when test="($TTOP = 'book') and ($full = 1) and (starts-with(@link, '#'))">
788 <!-- Handbook link pointing to another place in same part/chapter
789 Handbook is being rendered in a single page (full=1)
790 Hence link needs to be rewritten as an internal one that is unique
791 for the whole handbook, i.e.
792 #doc_part1_chap3 becomes #book_{UNIQUEID}_part1_chap3, but
793 #anything_else_like_an_ID is left unchanged (IDs are expected to be unique throughout a handbook)-->
794 <xsl:choose>
795 <xsl:when test="starts-with(@link, '#doc_')">
796 <xsl:param name="locallink" select="substring-after(@link, 'doc_')" />
797 <a href="#book_{generate-id(/)}_{$locallink}"><xsl:apply-templates /></a>
798 </xsl:when>
799 <xsl:otherwise>
800 <a href="{@link}"><xsl:apply-templates/></a>
801 </xsl:otherwise>
802 </xsl:choose>
803 </xsl:when>
804 <xsl:otherwise>
805 <!-- Strip http://www.gentoo.org from links but leave links to viewcvs intact
806 Has no effect on actual www.g.o but helps when surfing on a local copy -->
807 <xsl:variable name="llink">
808 <xsl:choose>
809 <xsl:when test="starts-with(@link, 'http://www.gentoo.org/cgi-bin/')"><xsl:value-of select="@link" /></xsl:when>
810 <xsl:when test="starts-with(@link, 'http://www.gentoo.org/')"><xsl:value-of select="substring-after(@link, 'http://www.gentoo.org')" /></xsl:when>
811 <xsl:otherwise><xsl:value-of select="@link" /></xsl:otherwise>
812 </xsl:choose>
813 </xsl:variable>
814
815 <!-- Now, insert style=printable in the URL if necessary -->
816 <xsl:variable name="alink">
817 <xsl:choose>
818 <xsl:when test="$style != 'printable' or contains($llink, 'style=printable')">
819 <!-- Not printable style or style=printable already in URL, copy link -->
820 <xsl:value-of select="$llink" />
821 </xsl:when>
822 <xsl:when test="contains($llink, '://')">
823 <!-- External link, copy link -->
824 <xsl:value-of select="$llink" />
825 </xsl:when>
826 <xsl:when test="starts-with($llink, '#')">
827 <!-- Anchor, copy link -->
828 <xsl:value-of select="$llink" />
829 </xsl:when>
830 <xsl:otherwise>
831 <!-- We should have eliminated all other cases,
832 style printable, local link, then insert ?style=printable -->
833 <xsl:choose>
834 <xsl:when test="starts-with($llink, '?')">
835 <xsl:value-of select="concat( '?style=printable&amp;', substring-after($llink, '?'))" />
836 </xsl:when>
837 <xsl:when test="contains($llink, '.xml?')">
838 <xsl:value-of select="concat(substring-before($llink, '.xml?'), '.xml?style=printable&amp;', substring-after($llink, '.xml?'))" />
839 </xsl:when>
840 <xsl:when test="contains($llink, '.xml#')">
841 <xsl:value-of select="concat(substring-before($llink, '.xml#'), '.xml?style=printable#', substring-after($llink, '.xml#'))" />
842 </xsl:when>
843 <xsl:when test="substring-after($llink, '.xml') = ''">
844 <xsl:value-of select="concat($llink, '?style=printable')" />
845 </xsl:when>
846 <xsl:otherwise>
847 <!-- Have I forgotten anything?
848 Copy link -->
849 <xsl:value-of select="$llink" />
850 </xsl:otherwise>
851 </xsl:choose>
852 </xsl:otherwise>
853 </xsl:choose>
854 </xsl:variable>
855 <a href="{$alink}"><xsl:apply-templates/></a>
856 </xsl:otherwise>
857 </xsl:choose>
858 </xsl:when>
859 <xsl:otherwise>
860 <xsl:variable name="loc" select="."/>
861 <a href="{$loc}"><xsl:apply-templates/></a>
862 </xsl:otherwise>
863 </xsl:choose>
864 </xsl:template>
865
866 <!-- Paragraph -->
867 <xsl:template match="p">
868 <xsl:param name="chid"/>
869 <xsl:choose>
870 <xsl:when test="@class">
871 <p class="{@class}">
872 <xsl:apply-templates>
873 <xsl:with-param name="chid" select="$chid"/>
874 </xsl:apply-templates>
875 </p>
876 </xsl:when>
877 <xsl:otherwise>
878 <p>
879 <xsl:apply-templates>
880 <xsl:with-param name="chid" select="$chid"/>
881 </xsl:apply-templates>
882 </p>
883 </xsl:otherwise>
884 </xsl:choose>
885 </xsl:template>
886
887 <!-- Emphasize -->
888 <xsl:template match="e">
889 <span class="emphasis"><xsl:apply-templates/></span>
890 </xsl:template>
891
892 <!-- Table -->
893 <xsl:template match="table">
894 <table class="ntable">
895 <xsl:apply-templates/>
896 </table>
897 </xsl:template>
898
899 <!-- Table Row -->
900 <xsl:template match="tr">
901 <tr>
902 <xsl:apply-templates/>
903 </tr>
904 </xsl:template>
905
906 <!-- Table Item -->
907 <xsl:template match="ti">
908 <td class="tableinfo">
909 <xsl:apply-templates/>
910 </td>
911 </xsl:template>
912
913 <!-- Table Heading -->
914 <xsl:template match="th">
915 <td class="infohead">
916 <b>
917 <xsl:apply-templates/>
918 </b>
919 </td>
920 </xsl:template>
921
922 <!-- Unnumbered List -->
923 <xsl:template match="ul">
924 <ul>
925 <xsl:apply-templates/>
926 </ul>
927 </xsl:template>
928
929 <!-- Ordered List -->
930 <xsl:template match="ol">
931 <ol>
932 <xsl:apply-templates/>
933 </ol>
934 </xsl:template>
935
936 <!-- List Item -->
937 <xsl:template match="li">
938 <li>
939 <xsl:apply-templates/>
940 </li>
941 </xsl:template>
942
943 <!-- NOP -->
944 <xsl:template match="ignoreinemail">
945 <xsl:apply-templates/>
946 </xsl:template>
947
948 <!-- NOP -->
949 <xsl:template match="ignoreinguide">
950 </xsl:template>
951
952 <!-- License Tag -->
953 <xsl:template match="license">
954 <p class="copyright">
955 <xsl:apply-templates select="func:gettext('License')"/>
956 </p>
957 <xsl:comment>
958 &lt;rdf:RDF xmlns="http://web.resource.org/cc/"
959 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
960 &lt;License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/"&gt;
961 &lt;permits rdf:resource="http://web.resource.org/cc/Reproduction" /&gt;
962 &lt;permits rdf:resource="http://web.resource.org/cc/Distribution" /&gt;
963 &lt;requires rdf:resource="http://web.resource.org/cc/Notice" /&gt;
964 &lt;requires rdf:resource="http://web.resource.org/cc/Attribution" /&gt;
965 &lt;permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /&gt;
966 &lt;requires rdf:resource="http://web.resource.org/cc/ShareAlike" /&gt;
967 &lt;/License&gt;
968 &lt;/rdf:RDF&gt;
969 </xsl:comment>
970 </xsl:template>
971
972 <!-- GLSA Index -->
973 <xsl:template match="glsaindex">
974 <xsl:apply-templates select="document('/dyn/glsa-index.xml')/guide/chapter[1]/section[1]/body"/>
975 </xsl:template>
976
977 <!-- GLSA Latest (max 10) -->
978 <xsl:template match="glsa-latest">
979 <xsl:variable name="src" select="'/dyn/glsa-index.xml'"/>
980 <table>
981 <xsl:for-each select="document($src)/guide/chapter[1]/section[1]/body/table[1]/tr[position()&lt;11]">
982 <tr><xsl:apply-templates/></tr>
983 </xsl:for-each>
984 </table>
985 </xsl:template>
986
987
988 <xsl:template name="contentdate">
989 <!-- Update datestamp -->
990 <xsl:value-of select="concat(func:gettext('Updated'),' ')"/>
991 <xsl:choose>
992 <xsl:when test="/book">
993 <!-- In a book: look for max(/date, include_files/sections/date) -->
994 <xsl:for-each select="/book/part/chapter/include">
995 <xsl:sort select="document(@href)/sections/date" order="descending" />
996 <xsl:if test="position() = 1">
997 <!-- Compare the max(date) from included files with the date in the master file
998 Of course, XSLT 1.0 knows no string comparison operator :-(
999 So we build a node set with the two dates and we sort it.
1000 -->
1001 <xsl:variable name="theDates">
1002 <xsl:element name="bookDate">
1003 <xsl:value-of select="/book/date"/>
1004 </xsl:element>
1005 <xsl:element name="maxChapterDate">
1006 <xsl:value-of select="document(@href)/sections/date"/>
1007 </xsl:element>
1008 </xsl:variable>
1009 <xsl:variable name="sortedDates">
1010 <xsl:for-each select="exslt:node-set($theDates)/*">
1011 <xsl:sort select="." order="descending" />
1012 <xsl:copy-of select="."/>
1013 </xsl:for-each>
1014 </xsl:variable>
1015 <!-- First date is the one we want -->
1016 <xsl:value-of select="func:format-date(exslt:node-set($sortedDates)/*[position()=1])"/>
1017 </xsl:if>
1018 </xsl:for-each>
1019 </xsl:when>
1020 <xsl:when test="/guide or /sections">
1021 <xsl:value-of select="func:format-date(//date[1])"/>
1022 </xsl:when>
1023 </xsl:choose>
1024 </xsl:template>
1025
1026 <xsl:template name="rhcol">
1027 <!-- Right-hand column with date/authors/ads -->
1028 <table border="0" cellspacing="4px" cellpadding="4px">
1029 <!-- Add a "printer-friendly" button when link attribute exists -->
1030 <xsl:if test="/book/@link or /guide/@link">
1031 <tr>
1032 <td class="topsep" align="center">
1033 <p class="altmenu">
1034 <xsl:variable name="PrintTip"><xsl:value-of select="func:gettext('PrintTip')"/></xsl:variable>
1035 <xsl:if test="/book">
1036 <xsl:if test="$full=1">
1037 <a title="{$PrintTip}" class="altlink" href="{/book/@link}?full=1&amp;style=printable"><xsl:value-of select="func:gettext('Print')"/></a>
1038 </xsl:if>
1039 <xsl:if test="$full=0">
1040 <a title="{$PrintTip}" class="altlink" href="{/book/@link}?part={$part}&amp;chap={$chap}&amp;style=printable"><xsl:value-of select="func:gettext('Print')"/></a>
1041 </xsl:if>
1042 </xsl:if>
1043 <xsl:if test="/guide">
1044 <a title="{$PrintTip}" class="altlink" href="{/guide/@link}?style=printable"><xsl:value-of select="func:gettext('Print')"/></a>
1045 </xsl:if>
1046 </p>
1047 </td>
1048 </tr>
1049 </xsl:if>
1050 <xsl:choose>
1051 <xsl:when test="/book/date or /guide/date or /sections/date">
1052 <tr>
1053 <td align="center" class="topsep">
1054 <p class="alttext">
1055 <xsl:call-template name="contentdate"/>
1056 </p>
1057 </td>
1058 </tr>
1059 </xsl:when>
1060 <xsl:when test="/mainpage/date">
1061 <tr>
1062 <td align="center" class="topsep">
1063 <p class="alttext">
1064 <xsl:value-of select="concat(func:gettext('Updated'),' ')"/>
1065 <xsl:value-of select="func:format-date(/mainpage/date)"/>
1066 </p>
1067 </td>
1068 </tr>
1069 </xsl:when>
1070 <xsl:when test="/news/date">
1071 <tr>
1072 <td align="center" class="topsep">
1073 <p class="alttext">
1074 <xsl:value-of select="concat(func:gettext('Updated'),' ')"/>
1075 <xsl:value-of select="func:format-date(/news/date)"/>
1076 </p>
1077 </td>
1078 </tr>
1079 </xsl:when>
1080 </xsl:choose>
1081 <xsl:if test="/book/abstract[normalize-space(.)] or /guide/abstract[normalize-space(.)]">
1082 <tr>
1083 <td class="topsep">
1084 <p class="alttext">
1085 <!-- Abstract (summary) of the document -->
1086 <b><xsl:value-of select="func:gettext('Summary')"/>: </b>
1087 <xsl:apply-templates select="abstract"/>
1088 </p>
1089 </td>
1090 </tr>
1091 </xsl:if>
1092 <xsl:if test="/book/author or /guide/author">
1093 <tr>
1094 <td class="topsep">
1095 <p class="alttext">
1096 <!-- Authors -->
1097 <xsl:apply-templates select="/guide/author|/book/author"/>
1098 </p>
1099 </td>
1100 </tr>
1101 </xsl:if>
1102
1103 <tr lang="en">
1104 <td align="center" class="topsep">
1105 <p class="alttext">
1106 <b>Donate</b> to support our development efforts.
1107 </p>
1108
1109 <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
1110 <input type="hidden" name="cmd" value="_xclick"/>
1111 <input type="hidden" name="business" value="paypal@gentoo.org"/>
1112 <input type="hidden" name="item_name" value="Gentoo Linux Support"/>
1113 <input type="hidden" name="item_number" value="1000"/>
1114 <input type="hidden" name="image_url" value="/images/paypal.png"/>
1115 <input type="hidden" name="no_shipping" value="1"/>
1116 <input type="hidden" name="return" value="http://www.gentoo.org"/>
1117 <input type="hidden" name="cancel_return" value="http://www.gentoo.org"/>
1118
1119 <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!"/>
1120 </form>
1121 </td>
1122 </tr>
1123 <tr lang="en">
1124 <td align="center" class="topsep">
1125 <a href="http://www.vr.org">
1126 <img src="/images/vr-ad.png" width="125" height="144" alt="Gentoo Centric Hosting: vr.org" border="0"/>
1127 </a>
1128 <p class="alttext">
1129 <a href="http://www.vr.org/">VR Hosted</a>
1130 </p>
1131 </td>
1132 </tr>
1133 <tr lang="en">
1134 <td align="center" class="topsep">
1135 <a href="http://www.tek.net" target="_top">
1136 <img src="/images/tek-gentoo.gif" width="125" height="125" alt="Tek Alchemy" border="0"/>
1137 </a>
1138 <p class="alttext">
1139 <a href="http://www.tek.net/">Tek Alchemy</a>
1140 </p>
1141 </td>
1142 </tr>
1143 <tr lang="en">
1144 <td align="center" class="topsep">
1145 <a href="http://www.sevenl.net" target="_top">
1146 <img src="/images/sponsors/sevenl.gif" width="125" height="144" alt="SevenL.net" border="0"/>
1147 </a>
1148 <p class="alttext">
1149 <a href="http://www.sevenl.net/">SevenL.net</a>
1150 </p>
1151 </td>
1152 </tr>
1153 <tr lang="en">
1154 <td align="center" class="topsep">
1155 <a href="http://www.phparch.com/bannerclick.php?AID=68&amp;BID=1&amp;BT=127929" target="_top">
1156 <img src="/images/phpa-gentoo.gif" width="125" height="144" alt="php|architect" border="0"/>
1157 </a>
1158 <p class="alttext">
1159 <a href="http://www.phparch.com/bannerclick.php?AID=68&amp;BID=1&amp;BT=127929">php|architect</a>
1160 </p>
1161 </td>
1162 </tr>
1163 <tr>
1164 <td align="center" class="topsep"/>
1165 </tr>
1166 </table>
1167 </xsl:template>
1168
1169 <xsl:template name="commonHTMLheader">
1170 <xsl:choose>
1171 <xsl:when test="string-length($glang)>1">
1172 <!-- Output html="$LANG" if possible -->
1173 <!-- Do not output default "en" because many non-English pages have no lang attribute
1174 and I'd rather not output any lang at all than send "en" for German pages e.g. -->
1175 <!-- Language code and sub-code are case-insensitive and should be separated by a hyphen -->
1176 <xsl:text disable-output-escaping="yes">
1177 &lt;HTML lang="</xsl:text><xsl:value-of select="translate($glang,'_','-')"/><xsl:text disable-output-escaping="yes">"&gt;
1178 </xsl:text>
1179 </xsl:when>
1180 <xsl:otherwise>
1181 <xsl:text disable-output-escaping="yes">
1182 &lt;HTML&gt;
1183 </xsl:text>
1184 </xsl:otherwise>
1185 </xsl:choose>
1186 <xsl:text disable-output-escaping="yes">
1187 &lt;head&gt;
1188 &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
1189 &lt;link title="new" rel="stylesheet" href="/css/main.css?d=20050605" type="text/css"&gt;
1190 &lt;link REL="shortcut icon" HREF="http://www.gentoo.org/favicon.ico" TYPE="image/x-icon"&gt;
1191 </xsl:text>
1192 </xsl:template>
1193
1194 <xsl:template name="newscontent">
1195 <xsl:param name="thenews"/>
1196 <xsl:param name="summary"/>
1197 <xsl:param name="link"/>
1198
1199 <div class="news">
1200 <p class="newshead" lang="en">
1201 <b><xsl:value-of select="$thenews/title"/></b>
1202 <br/>
1203 <font size="0.90em">
1204 Posted on <xsl:value-of select="func:format-date($thenews/date)"/>
1205 by <xsl:value-of select="$thenews/poster"/>
1206 </font>
1207 </p>
1208
1209 <xsl:choose>
1210 <xsl:when test="$thenews/@category='alpha'">
1211 <img class="newsicon" src="/images/icon-alpha.gif" alt="AlphaServer GS160"/>
1212 </xsl:when>
1213 <xsl:when test="$thenews/@category='kde'">
1214 <img class="newsicon" src="/images/icon-kde.png" alt="KDE"/>
1215 </xsl:when>
1216 <xsl:when test="$thenews/@category='gentoo'">
1217 <img class="newsicon" src="/images/icon-gentoo.png" alt="gentoo"/>
1218 </xsl:when>
1219 <xsl:when test="$thenews/@category='main'">
1220 <img class="newsicon" src="/images/icon-stick.png" alt="stick man"/>
1221 </xsl:when>
1222 <xsl:when test="$thenews/@category='ibm'">
1223 <img class="newsicon" src="/images/icon-ibm.gif" alt="ibm"/>
1224 </xsl:when>
1225 <xsl:when test="$thenews/@category='linux'">
1226 <img class="newsicon" src="/images/icon-penguin.png" alt="tux"/>
1227 </xsl:when>
1228 <xsl:when test="$thenews/@category='moo'">
1229 <img class="newsicon" src="/images/icon-cow.png" alt="Larry the Cow"/>
1230 </xsl:when>
1231 <xsl:when test="$thenews/@category='plans'">
1232 <img class="newsicon" src="/images/icon-clock.png" alt="Clock"/>
1233 </xsl:when>
1234 <xsl:when test="$thenews/@category='nvidia'">
1235 <img class="newsicon" src="/images/icon-nvidia.png" alt="Nvidia"/>
1236 </xsl:when>
1237 <xsl:when test="$thenews/@category='freescale'">
1238 <img class="newsicon" src="/images/icon-freescale.gif" alt="Freescale Semiconductor"/>
1239 </xsl:when>
1240 </xsl:choose>
1241
1242 <div class="newsitem">
1243 <xsl:choose>
1244 <xsl:when test="$thenews/summary and $summary='yes'">
1245 <xsl:apply-templates select="$thenews/summary"/>
1246 <br/>
1247 <a href="{$link}"><b>(full story)</b></a>
1248 </xsl:when>
1249 <xsl:when test="$thenews/body">
1250 <xsl:apply-templates select="$thenews/body"/>
1251 </xsl:when>
1252 </xsl:choose>
1253 </div>
1254 </div>
1255 </xsl:template>
1256
1257
1258 </xsl:stylesheet>

  ViewVC Help
Powered by ViewVC 1.1.13