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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.227 - (hide annotations) (download) (as text)
Tue Jan 22 20:36:55 2008 UTC (6 years, 8 months ago) by neysx
Branch: MAIN
Changes since 1.226: +5 -5 lines
File MIME type: application/xml
s/GWN/GMN/

1 rajiv 1.6 <?xml version="1.0" encoding="UTF-8"?>
2 neysx 1.123 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
3 neysx 1.129 xmlns:exslt="http://exslt.org/common"
4 neysx 1.131 xmlns:func="http://exslt.org/functions"
5 neysx 1.182 xmlns:dyn="http://exslt.org/dynamic"
6 neysx 1.202 xmlns:str="http://exslt.org/strings"
7 neysx 1.189
8     xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
9     exclude-result-prefixes="opensearch"
10    
11 neysx 1.202 extension-element-prefixes="exslt func dyn str" >
12 swift 1.73
13 neysx 1.189 <xsl:output encoding="UTF-8"
14     method="html"
15     indent="yes"
16     doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
17     doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>
18 neysx 1.146
19 swift 1.73 <!-- Include external stylesheets -->
20 neysx 1.215 <xsl:include href="/xsl/content.xsl" />
21     <xsl:include href="/xsl/handbook.xsl" />
22     <xsl:include href="/xsl/inserts.xsl" />
23 swift 1.73
24 neysx 1.221 <xsl:include href="/xsl/mail.xsl" />
25    
26 neysx 1.215 <xsl:include href="/xsl/devmap.xsl" />
27 neysx 1.205
28 neysx 1.224 <xsl:include href="/xsl/doc-struct.xsl" />
29    
30 swift 1.73 <!-- When using <pre>, whitespaces should be preserved -->
31 neysx 1.205 <xsl:preserve-space elements="pre script"/>
32 swift 1.73
33     <!-- Global definition of style parameter -->
34     <xsl:param name="style">0</xsl:param>
35 neysx 1.146 <xsl:param name="newsitemcount">6</xsl:param>
36 swift 1.73
37 neysx 1.163 <!-- Category from metadoc -->
38     <xsl:param name="catid">0</xsl:param>
39    
40 neysx 1.205 <!-- Nick to select on dev map -->
41     <xsl:param name="dev"/>
42    
43 neysx 1.209 <!-- Where is this xsl being run? -->
44     <xsl:param name="httphost">www</xsl:param>
45    
46 swift 1.73 <!-- img tag -->
47     <xsl:template match="img">
48 neysx 1.157 <img src="{@src}" alt=""/>
49 swift 1.73 </xsl:template>
50    
51 neysx 1.165 <xsl:template name="show-disclaimer">
52     <!-- Disclaimer stuff -->
53     <xsl:if test="/*[1][@disclaimer] or /*[1][@redirect]">
54 neysx 1.177 <table class="ncontent" align="center" width="90%" border="2px" cellspacing="0" cellpadding="4px">
55     <xsl:if test="/*[1]/@disclaimer='obsolete'">
56     <xsl:attribute name="style">margin-top:40px;margin-bottom:30px</xsl:attribute>
57     </xsl:if>
58 neysx 1.165 <tr>
59     <td bgcolor="#ddddff">
60     <p class="note">
61     <xsl:if test="/*[1][@disclaimer]">
62 neysx 1.177 <xsl:if test="/*[1]/@disclaimer='obsolete'">
63     <xsl:attribute name="style">font-size:1.3em</xsl:attribute>
64     </xsl:if>
65 neysx 1.165 <b><xsl:value-of select="func:gettext('disclaimer')"/>: </b>
66     <xsl:apply-templates select="func:gettext(/*[1]/@disclaimer)"/>
67     </xsl:if>
68     <xsl:if test="/*[1][@redirect]">
69     <xsl:apply-templates select="func:gettext('redirect')">
70     <xsl:with-param name="paramlink" select="/*[1]/@redirect"/>
71     </xsl:apply-templates>
72     </xsl:if>
73     </p>
74     </td>
75     </tr>
76     </table>
77     </xsl:if>
78     </xsl:template>
79    
80    
81 swift 1.73 <!-- Content of /guide -->
82     <xsl:template name="guidecontent">
83 neysx 1.141 <xsl:if test="$style != 'printable'">
84     <br />
85     </xsl:if>
86 neysx 1.165
87 swift 1.118 <h1>
88 swift 1.73 <xsl:choose>
89     <xsl:when test="/guide/subtitle"><xsl:value-of select="/guide/title"/>: <xsl:value-of select="/guide/subtitle"/></xsl:when>
90     <xsl:otherwise><xsl:value-of select="/guide/title"/></xsl:otherwise>
91     </xsl:choose>
92 swift 1.118 </h1>
93 swift 1.73
94 swift 1.96 <xsl:choose>
95     <xsl:when test="$style = 'printable'">
96     <xsl:apply-templates select="author" />
97 neysx 1.141 <br/>
98     <i><xsl:call-template name="contentdate"/></i>
99 neysx 1.165 <xsl:variable name="outdated">
100     <xsl:call-template name="outdated-translation"/>
101     </xsl:variable>
102     <xsl:if test="string-length($outdated) &gt; 1">
103 neysx 1.212 <br/><b><i><xsl:copy-of select="$outdated"/></i></b>
104 neysx 1.165 </xsl:if>
105 swift 1.96 </xsl:when>
106     <xsl:otherwise>
107 neysx 1.224 <xsl:if test="count(exslt:node-set($doc-struct)//chapter)&gt;1">
108 swift 1.96 <form name="contents" action="http://www.gentoo.org">
109 neysx 1.123 <b><xsl:value-of select="func:gettext('Content')"/></b>:
110 neysx 1.146 <select name="url" size="1" OnChange="location.href=form.url.options[form.url.selectedIndex].value" style="font-family:sans-serif,Arial,Helvetica">
111 neysx 1.224 <xsl:for-each select="exslt:node-set($doc-struct)//chapter">
112     <option value="#doc_chap{position()}"><xsl:number/>. <xsl:value-of select="@title"/></option>
113 swift 1.96 </xsl:for-each>
114     </select>
115     </form>
116 neysx 1.149 </xsl:if>
117 swift 1.96 </xsl:otherwise>
118     </xsl:choose>
119 swift 1.73
120 neysx 1.147 <xsl:choose>
121     <xsl:when test="/guide">
122 neysx 1.215 <xsl:apply-templates select="faqindex|chapter"/>
123 neysx 1.147 </xsl:when>
124     <xsl:when test="/sections">
125     <xsl:apply-templates select="/sections/section"/>
126     </xsl:when>
127     </xsl:choose>
128 swift 1.73 <br/>
129     <xsl:if test="/guide/license">
130     <xsl:apply-templates select="license" />
131     </xsl:if>
132     <br/>
133     </xsl:template>
134    
135     <!-- Layout for documentation -->
136     <xsl:template name="doclayout">
137 neysx 1.192 <xsl:param name="chapnum"/>
138     <xsl:param name="partnum"/>
139 neysx 1.165 <html>
140     <xsl:if test="string-length($glang)>1">
141     <xsl:attribute name="lang"><xsl:value-of select="translate($glang,'_','-')"/></xsl:attribute>
142     </xsl:if>
143     <head>
144     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
145 neysx 1.214 <link title="new" rel="stylesheet" href="{concat($ROOT,'css/main.css')}" type="text/css"/>
146 neysx 1.201 <link REL="shortcut icon" HREF="{concat($ROOT,'favicon.ico')}" TYPE="image/x-icon"/>
147 neysx 1.189
148 neysx 1.190 <!-- Support for opensearch -->
149 neysx 1.189 <link rel="search" type="application/opensearchdescription+xml" href="http://www.gentoo.org/search/www-gentoo-org.xml" title="Gentoo Website"/>
150     <link rel="search" type="application/opensearchdescription+xml" href="http://www.gentoo.org/search/forums-gentoo-org.xml" title="Gentoo Forums"/>
151     <link rel="search" type="application/opensearchdescription+xml" href="http://www.gentoo.org/search/bugs-gentoo-org.xml" title="Gentoo Bugzilla"/>
152 neysx 1.226 <link rel="search" type="application/opensearchdescription+xml" href="http://www.gentoo.org/search/packages-gentoo-org.xml" title="Gentoo Packages"/>
153 neysx 1.218 <link rel="search" type="application/opensearchdescription+xml" href="http://www.gentoo.org/search/archives-gentoo-org.xml" title="Gentoo List Archives"/>
154 neysx 1.189
155 neysx 1.193 <xsl:if test="//glsaindex or //glsa-latest">
156     <link rel="alternate" type="application/rss+xml">
157     <xsl:attribute name="href">
158     <xsl:text>/rdf/en/glsa-index.rdf</xsl:text>
159     <xsl:if test="//glsa-latest">
160     <xsl:text>?num=9</xsl:text>
161     </xsl:if>
162     </xsl:attribute>
163     </link>
164     </xsl:if>
165    
166 neysx 1.189 <xsl:if test="/*[1][@redirect]">
167     <!-- HTML refresh in case redirect is not supported -->
168     <meta http-equiv="Refresh">
169     <xsl:attribute name="content"><xsl:value-of select="concat('15; URL=', /*[1]/@redirect)"/></xsl:attribute>
170     </meta>
171     <xsl:message>
172     <!-- Redirect using http header when supported -->
173     <xsl:value-of select="concat('%%GORG%%Redirect=',/*[1]/@redirect)"/>
174     </xsl:message>
175     </xsl:if>
176 neysx 1.165
177 swift 1.96 <title>
178 swift 1.73 <xsl:choose>
179 swift 1.96 <xsl:when test="/guide/@type='project'">Gentoo Linux Projects</xsl:when>
180     <xsl:when test="/guide/@type='newsletter'">Gentoo Linux Newsletter</xsl:when>
181 neysx 1.147 <xsl:when test="/sections">Gentoo Linux Handbook Page</xsl:when>
182 neysx 1.123 <xsl:otherwise><xsl:value-of select="func:gettext('GLinuxDoc')"/></xsl:otherwise>
183 swift 1.73 </xsl:choose>
184 neysx 1.129 --
185 swift 1.73 <xsl:choose>
186     <xsl:when test="subtitle"><xsl:if test="/guide/@type!='newsletter'"><xsl:value-of select="title"/>:</xsl:if> <xsl:value-of select="subtitle"/></xsl:when>
187     <xsl:otherwise><xsl:value-of select="title"/></xsl:otherwise>
188     </xsl:choose>
189     </title>
190 swift 1.118
191 neysx 1.165 </head>
192 swift 1.118 <xsl:choose>
193     <xsl:when test="$style = 'printable'">
194     <!-- Insert the node-specific content -->
195     <body bgcolor="#ffffff">
196 neysx 1.194 <!-- Test for RTL languages -->
197 neysx 1.208 <xsl:if test="$RTL='Y'">
198 neysx 1.194 <xsl:attribute name="dir">RTL</xsl:attribute>
199     </xsl:if>
200    
201 neysx 1.165 <xsl:call-template name="show-disclaimer"/>
202 neysx 1.192 <xsl:call-template name="content">
203     <xsl:with-param name="chapnum" select="$chapnum"/>
204     <xsl:with-param name="partnum" select="$partnum"/>
205     </xsl:call-template>
206 swift 1.118 </body>
207     </xsl:when>
208     <xsl:otherwise>
209 swift 1.100 <body style="margin:0px;" bgcolor="#ffffff">
210 swift 1.73 <table width="100%" border="0" cellspacing="0" cellpadding="0">
211     <tr>
212     <td valign="top" height="125" bgcolor="#45347b">
213 neysx 1.201 <a href="/"><img border="0" src="{concat($ROOT,'images/gtop-www.jpg')}" alt="Gentoo Logo"/></a>
214 swift 1.73 </td>
215     </tr>
216     <tr>
217     <td valign="top" align="right" colspan="1" bgcolor="#ffffff">
218     <table border="0" cellspacing="0" cellpadding="0" width="100%">
219     <tr>
220 neysx 1.195 <td width="99%" class="content" valign="top">
221 neysx 1.194 <!-- Test for RTL languages -->
222 neysx 1.196 <xsl:choose>
223 neysx 1.208 <xsl:when test="$RTL='Y'">
224 neysx 1.196 <xsl:attribute name="dir">RTL</xsl:attribute>
225     </xsl:when>
226     <xsl:otherwise>
227     <xsl:attribute name="align">left</xsl:attribute>
228     </xsl:otherwise>
229     </xsl:choose>
230 swift 1.73 <!-- Insert the node-specific content -->
231 neysx 1.165 <xsl:call-template name="show-disclaimer"/>
232 neysx 1.192 <xsl:call-template name="content">
233     <xsl:with-param name="chapnum" select="$chapnum"/>
234     <xsl:with-param name="partnum" select="$partnum"/>
235     </xsl:call-template>
236 swift 1.73 </td>
237     <td width="1%" bgcolor="#dddaec" valign="top">
238 neysx 1.146 <xsl:call-template name="rhcol"/>
239 swift 1.73 </td>
240     </tr>
241     </table>
242     </td>
243     </tr>
244     <tr>
245 neysx 1.146 <td colspan="2" align="right" class="infohead">
246 neysx 1.211 <xsl:call-template name="copyright-footer"/>
247 swift 1.73 </td>
248     </tr>
249     </table>
250    
251     </body>
252 swift 1.118 </xsl:otherwise>
253     </xsl:choose>
254 neysx 1.165 </html>
255 swift 1.73 </xsl:template>
256    
257 neysx 1.189
258 neysx 1.224 <xsl:template match="/included|/gleps|/devaway|/uris|/inserts|/glsa-index|opensearch:OpenSearchDescription">
259 neysx 1.189 <xsl:message>
260     <xsl:value-of select="concat('%%GORG%%Redirect=',$link,'?passthru=1')"/>
261     </xsl:message>
262     </xsl:template>
263    
264 swift 1.73 <!-- Guide template -->
265     <xsl:template match="/guide">
266     <xsl:call-template name="doclayout" />
267     </xsl:template>
268    
269     <!-- {Mainpage, News, Email} template -->
270 neysx 1.201 <xsl:template match="/mainpage | /news">
271 neysx 1.165 <html>
272     <xsl:if test="string-length($glang)>1">
273     <xsl:attribute name="lang"><xsl:value-of select="translate($glang,'_','-')"/></xsl:attribute>
274     </xsl:if>
275     <head>
276     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
277 neysx 1.214 <link title="new" rel="stylesheet" href="{concat($ROOT,'css/main.css')}" type="text/css"/>
278 neysx 1.201 <link REL="shortcut icon" HREF="{concat($ROOT,'favicon.ico')}" TYPE="image/x-icon"/>
279 neysx 1.189
280 neysx 1.190 <!-- Support for opensearch -->
281 neysx 1.189 <link rel="search" type="application/opensearchdescription+xml" href="http://www.gentoo.org/search/www-gentoo-org.xml" title="Gentoo Website"/>
282     <link rel="search" type="application/opensearchdescription+xml" href="http://www.gentoo.org/search/forums-gentoo-org.xml" title="Gentoo Forums"/>
283     <link rel="search" type="application/opensearchdescription+xml" href="http://www.gentoo.org/search/bugs-gentoo-org.xml" title="Gentoo Bugzilla"/>
284 neysx 1.224 <link rel="search" type="application/opensearchdescription+xml" href="http://www.gentoo.org/search/packages-gentoo-org.xml" title="Gentoo Packages"/>
285 neysx 1.218 <link rel="search" type="application/opensearchdescription+xml" href="http://www.gentoo.org/search/archives-gentoo-org.xml" title="Gentoo List Archives"/>
286 neysx 1.165
287 neysx 1.226 <xsl:if test="/*[1][@redirect]">
288     <!-- Immediate HTML refresh in case redirect is not supported -->
289     <meta http-equiv="Refresh">
290     <xsl:attribute name="content"><xsl:value-of select="concat('0; URL=', /*[1]/@redirect)"/></xsl:attribute>
291     </meta>
292     <xsl:message>
293     <!-- Redirect using http header when supported -->
294     <xsl:value-of select="concat('%%GORG%%Redirect=',/*[1]/@redirect)"/>
295     </xsl:message>
296     </xsl:if>
297    
298 neysx 1.202 <xsl:if test="/mainpage/newsitems">
299 swift 1.73 <link rel="alternate" type="application/rss+xml" title="Gentoo Linux News RDF" href="http://www.gentoo.org/rdf/en/gentoo-news.rdf" />
300     </xsl:if>
301     <xsl:choose>
302     <xsl:when test="/mainpage | /news">
303 neysx 1.201 <title>
304     Gentoo Linux -- <xsl:value-of select="title"/>
305     </title>
306 swift 1.73 </xsl:when>
307     </xsl:choose>
308 neysx 1.204
309     <xsl:if test="/mainpage/devmap">
310     <xsl:variable name="gkey" select="document('/gmaps-key.xml')/gkey"/>
311     <script src="{concat('http://maps.google.com/maps?file=api&amp;v=2&amp;key=', $gkey)}" type="text/javascript"></script>
312 neysx 1.205
313     <xsl:variable name="selectdev">
314     <xsl:choose>
315     <xsl:when test="string-length(translate($dev,'qwertyuioplkjhgfdsazxcvbnm-_0987654321QWERTYUIOPLKJHGFDSAZXCVBNM',''))=0 and string-length($dev)&lt;24">
316     <xsl:value-of select="translate($dev,'QWERTYUIOPLKJHGFDSAZXCVBNM','qwertyuioplkjhgfdsazxcvbnm')"/>
317     </xsl:when>
318     <xsl:otherwise>NotADev</xsl:otherwise>
319     </xsl:choose>
320     </xsl:variable>
321    
322     <xsl:variable name="newscript" select="str:replace($devmap-js, 'X-PLACEHOLDER', string($selectdev))"/>
323     <script type="text/javascript">//<xsl:comment><xsl:value-of select="$newscript"/>//</xsl:comment></script>
324 neysx 1.204 </xsl:if>
325    
326 neysx 1.165 </head>
327 swift 1.100 <body style="margin:0px;" bgcolor="#000000">
328 drobbins 1.1
329 neysx 1.204 <xsl:if test="/mainpage/devmap">
330     <xsl:attribute name="onload">load()</xsl:attribute>
331     <xsl:attribute name="onunload">GUnload()</xsl:attribute>
332     </xsl:if>
333    
334 swift 1.73 <table border="0" width="100%" cellspacing="0" cellpadding="0">
335 neysx 1.202 <xsl:variable name="tpath" select="str:replace($link, str:replace(concat('/',$glang,'/'),'//','/en/'), '/**/')"/>
336     <xsl:variable name="isEnglish"><xsl:if test="string-length($glang)=0 or $glang='en'">Y</xsl:if></xsl:variable>
337 neysx 1.209 <xsl:variable name="www"><xsl:if test="$httphost!='www'">http://www.gentoo.org</xsl:if></xsl:variable>
338 swift 1.73 <tr>
339     <td valign="top" height="125" width="1%" bgcolor="#45347b">
340 neysx 1.209 <a href="{concat($www,'/')}"><img border="0" src="{concat($ROOT,'images/gtop-www.jpg')}" alt="Gentoo Logo"/></a>
341 swift 1.73 </td>
342 neysx 1.202 <!-- Top bar menu -->
343 neysx 1.149 <td valign="bottom" align="left" bgcolor="#000000" colspan="2" lang="en">
344 swift 1.73 <p class="menu">
345 neysx 1.209 <a class="menulink" href="{concat($www,'/main/en/about.xml')}">
346 neysx 1.202 <xsl:choose>
347     <xsl:when test="$tpath='/main/**/about.xml'">
348     <xsl:attribute name="class">highlight</xsl:attribute>
349     <xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute>
350     </xsl:when>
351     <xsl:when test="not($isEnglish='Y' or document(concat('/main/', $glang, '/about.xml'))/missing)">
352     <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/about.xml')"/></xsl:attribute>
353     </xsl:when>
354     </xsl:choose>
355     About</a>
356     |
357 neysx 1.209 <a class="menulink" href="{concat($www,'/proj/en/index.xml')}">
358 neysx 1.202 <xsl:if test="starts-with($tpath, '/proj/**/')">
359     <xsl:attribute name="class">highlight</xsl:attribute>
360     </xsl:if>
361     Projects</a>
362 neysx 1.146 |
363 neysx 1.209 <a class="menulink" href="{concat($www,'/doc/en/index.xml')}">
364 neysx 1.202 <xsl:choose>
365     <xsl:when test="starts-with($tpath, '/doc/**/')">
366     <xsl:attribute name="class">highlight</xsl:attribute>
367     <xsl:attribute name="href"><xsl:value-of select="str:replace(concat('/doc/',$glang,'/'), '//','/en/')"/></xsl:attribute>
368 swift 1.73 </xsl:when>
369 neysx 1.202 <xsl:when test="not($isEnglish='Y' or document(concat('/doc/', $glang, '/index.xml'))/missing)">
370     <xsl:attribute name="href"><xsl:value-of select="concat('/doc/',$glang,'/index.xml')"/></xsl:attribute>
371     </xsl:when>
372     </xsl:choose>
373     Docs</a>
374 neysx 1.146 | <a class="menulink" href="http://forums.gentoo.org">Forums</a>
375     |
376 neysx 1.209 <a class="menulink" href="{concat($www,'/main/en/lists.xml')}">
377 neysx 1.202 <xsl:choose>
378     <xsl:when test="$tpath='/main/**/lists.xml'">
379     <xsl:attribute name="class">highlight</xsl:attribute>
380     <xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute>
381     </xsl:when>
382     <xsl:when test="not($isEnglish='Y' or document(concat('/main/', $glang, '/lists.xml'))/missing)">
383     <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/lists.xml')"/></xsl:attribute>
384     </xsl:when>
385     </xsl:choose>
386     Lists</a>
387 neysx 1.149 | <a class="menulink" href="http://bugs.gentoo.org">Bugs</a>
388     | <a class="menulink" href="http://www.cafepress.com/officialgentoo/">Store</a>
389     |
390 neysx 1.227 <a class="menulink" href="{concat($www,'/news/en/gmn/')}">
391 neysx 1.202 <xsl:choose>
392 neysx 1.227 <xsl:when test="starts-with($tpath, '/news/**/gmn/')">
393 neysx 1.202 <xsl:attribute name="class">highlight</xsl:attribute>
394     <xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute>
395     </xsl:when>
396 neysx 1.227 <xsl:when test="not($isEnglish='Y' or document(concat('/news/', $glang, '/gmn/index.xml'))/missing)">
397     <xsl:attribute name="href"><xsl:value-of select="concat('/news/',$glang,'/gmn/index.xml')"/></xsl:attribute>
398 neysx 1.202 </xsl:when>
399     </xsl:choose>
400 neysx 1.227 GMN</a>
401 neysx 1.146 |
402 neysx 1.209 <a class="menulink" href="{concat($www,'/main/en/where.xml')}">
403 neysx 1.202 <xsl:choose>
404     <xsl:when test="$tpath='/main/**/where.xml'">
405     <xsl:attribute name="class">highlight</xsl:attribute>
406     <xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute>
407     </xsl:when>
408     <xsl:when test="not($isEnglish='Y' or document(concat('/main/', $glang, '/where.xml'))/missing)">
409     <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/where.xml')"/></xsl:attribute>
410     </xsl:when>
411     </xsl:choose>
412     Get Gentoo!</a>
413 neysx 1.146 |
414 neysx 1.209 <a class="menulink" href="{concat($www,'/main/en/support.xml')}">
415 neysx 1.202 <xsl:choose>
416     <xsl:when test="$tpath='/main/**/support.xml'">
417     <xsl:attribute name="class">highlight</xsl:attribute>
418     <xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute>
419     </xsl:when>
420     <xsl:when test="not($isEnglish='Y' or document(concat('/main/', $glang, '/support.xml'))/missing)">
421     <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/support.xml')"/></xsl:attribute>
422     </xsl:when>
423     </xsl:choose>
424     Support</a>
425 neysx 1.146 |
426 neysx 1.209 <a class="menulink" href="{concat($www,'/main/en/sponsors.xml')}">
427 neysx 1.202 <xsl:choose>
428     <xsl:when test="$tpath='/main/**/sponsors.xml'">
429     <xsl:attribute name="class">highlight</xsl:attribute>
430     <xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute>
431     </xsl:when>
432     <xsl:when test="not($isEnglish='Y' or document(concat('/main/', $glang, '/sponsors.xml'))/missing)">
433     <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/sponsors.xml')"/></xsl:attribute>
434     </xsl:when>
435     </xsl:choose>
436     Sponsors</a>
437 neysx 1.146 | <a class="menulink" href="http://planet.gentoo.org">Planet</a>
438 neysx 1.181 |
439 neysx 1.209 <a class="menulink" href="{concat($www,'/main/en/contact.xml')}">
440 neysx 1.202 <xsl:choose>
441     <xsl:when test="$tpath='/main/**/contact.xml'">
442     <xsl:attribute name="class">highlight</xsl:attribute>
443     <xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute>
444     </xsl:when>
445     <xsl:when test="not($isEnglish='Y' or document(concat('/main/', $glang, '/contact.xml'))/missing)">
446     <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/contact.xml')"/></xsl:attribute>
447     </xsl:when>
448     </xsl:choose>
449     Contact</a>
450 swift 1.73 </p>
451     </td>
452     </tr>
453     <tr>
454     <td valign="top" align="right" width="1%" bgcolor="#dddaec">
455     <table width="100%" cellspacing="0" cellpadding="0" border="0">
456     <tr>
457     <td height="1%" valign="top" align="right">
458 neysx 1.201 <img src="{concat($ROOT,'images/gridtest.gif')}" alt="Gentoo Spaceship"/>
459 swift 1.73 </td>
460     </tr>
461     <tr>
462 neysx 1.149 <td height="99%" valign="top" align="left">
463 swift 1.73 <!--info goes here-->
464     <table cellspacing="0" cellpadding="5" border="0">
465     <tr>
466 neysx 1.149 <td valign="top" class="leftmenu" lang="en">
467 swift 1.73 <p class="altmenu">
468 neysx 1.202 Installation:
469     <br/>
470 neysx 1.209 <a class="altlink" href="{concat($www,'/doc/en/handbook/index.xml')}">
471 neysx 1.202 <xsl:if test="not($isEnglish='Y' or document(concat('/doc/', $glang, '/handbook/index.xml'))/missing)">
472     <xsl:attribute name="href"><xsl:value-of select="concat('/doc/',$glang,'/handbook/index.xml')"/></xsl:attribute>
473     </xsl:if>
474 neysx 1.210 <xsl:text>Gentoo&#xA0;Handbook</xsl:text></a>
475 neysx 1.202 <br/>
476 neysx 1.209 <a class="altlink" href="{concat($www,'/doc/en/index.xml?catid=install#doc_chap2')}">
477 neysx 1.202 <xsl:if test="not($isEnglish='Y' or document(concat('/doc/', $glang, '/index.xml'))/missing)">
478     <xsl:attribute name="href"><xsl:value-of select="concat('/doc/',$glang,'/index.xml?catid=install#doc_chap2')"/></xsl:attribute>
479     </xsl:if>
480 neysx 1.210 <xsl:text>Installation&#xA0;Docs</xsl:text></a>
481 neysx 1.202 <br/><br/>
482     Documentation:
483     <br/>
484 neysx 1.209 <a class="altlink" href="{concat($www,'/doc/en/index.xml')}">
485 neysx 1.202 <xsl:if test="not($isEnglish='Y' or document(concat('/doc/', $glang, '/index.xml'))/missing)">
486     <xsl:attribute name="href"><xsl:value-of select="concat('/doc/',$glang,'/index.xml')"/></xsl:attribute>
487     </xsl:if>
488 neysx 1.210 <xsl:text>Home</xsl:text></a>
489 neysx 1.202 <br/>
490 neysx 1.209 <a class="altlink" href="{concat($www,'/doc/en/list.xml')}">
491 neysx 1.202 <xsl:if test="not($isEnglish='Y' or document(concat('/doc/', $glang, '/list.xml'))/missing)">
492     <xsl:attribute name="href"><xsl:value-of select="concat('/doc/',$glang,'/list.xml')"/></xsl:attribute>
493     </xsl:if>
494 neysx 1.210 <xsl:text>Listing</xsl:text></a>
495 neysx 1.202 <br/>
496 neysx 1.209 <a class="altlink" href="{concat($www,'/main/en/about.xml')}">
497 neysx 1.202 <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/about.xml'))/missing)">
498     <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/about.xml')"/></xsl:attribute>
499     </xsl:if>
500 neysx 1.210 <xsl:text>About&#xA0;Gentoo</xsl:text></a>
501 neysx 1.202 <br/>
502 neysx 1.209 <a class="altlink" href="{concat($www,'/main/en/philosophy.xml')}">
503 neysx 1.202 <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/philosophy.xml'))/missing)">
504     <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/philosophy.xml')"/></xsl:attribute>
505     </xsl:if>
506 neysx 1.210 <xsl:text>Philosophy</xsl:text></a>
507 neysx 1.202 <br/>
508 neysx 1.209 <a class="altlink" href="{concat($www,'/main/en/contract.xml')}">
509 neysx 1.202 <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/contract.xml'))/missing)">
510     <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/contract.xml')"/></xsl:attribute>
511     </xsl:if>
512 neysx 1.210 <xsl:text>Social&#xA0;Contract</xsl:text></a>
513 neysx 1.149 <br/><br/>
514 neysx 1.202 Resources:
515     <br/>
516 neysx 1.210 <a class="altlink" href="http://bugs.gentoo.org">Bug&#xA0;Tracker</a>
517 swift 1.73 <br/>
518 neysx 1.210 <a class="altlink" href="{concat($www,'/proj/en/devrel/roll-call/userinfo.xml')}">Developer&#xA0;List</a>
519 swift 1.162 <br/>
520 neysx 1.210 <a class="altlink" href="http://forums.gentoo.org">Discussion&#xA0;Forums</a>
521 swift 1.73 <br/>
522 neysx 1.210 <a class="altlink" href="http://torrents.gentoo.org/">Gentoo&#xA0;BitTorrents</a>
523 swift 1.162 <br/>
524 neysx 1.210 <a class="altlink" href="{concat($www,'/proj/en/glep/')}">Gentoo&#xA0;Linux Enhancement Proposals</a>
525 swift 1.162 <br/>
526 neysx 1.209 <a class="altlink" href="{concat($www,'/main/en/irc.xml')}">
527 neysx 1.202 <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/irc.xml'))/missing)">
528     <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/irc.xml')"/></xsl:attribute>
529     </xsl:if>
530 neysx 1.210 <xsl:text>IRC&#xA0;Channels</xsl:text></a>
531 neysx 1.202 <br/>
532 neysx 1.209 <a class="altlink" href="{concat($www,'/main/en/lists.xml')}">
533 neysx 1.202 <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/lists.xml'))/missing)">
534     <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/lists.xml')"/></xsl:attribute>
535     </xsl:if>
536 neysx 1.210 <xsl:text>Mailing&#xA0;Lists</xsl:text></a>
537 neysx 1.202 <br/>
538 neysx 1.209 <a class="altlink" href="{concat($www,'/main/en/mirrors.xml')}">
539 neysx 1.202 <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/mirrors.xml'))/missing)">
540     <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/mirrors.xml')"/></xsl:attribute>
541     </xsl:if>
542 neysx 1.210 <xsl:text>Mirrors</xsl:text></a>
543 neysx 1.202 <br/>
544 neysx 1.209 <a class="altlink" href="{concat($www,'/main/en/name-logo.xml')}">
545 neysx 1.202 <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/name-logo.xml'))/missing)">
546     <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/name-logo.xml')"/></xsl:attribute>
547     </xsl:if>
548 neysx 1.210 <xsl:text>Name and Logo Guidelines</xsl:text></a>
549 swift 1.73 <br/>
550 neysx 1.149 <a class="altlink" href="http://packages.gentoo.org/">Online Package Database</a>
551 swift 1.73 <br/>
552 neysx 1.209 <a class="altlink" href="{concat($www,'/security/en/index.xml')}">Security Announcements</a>
553 swift 1.73 <br/>
554 neysx 1.210 <a class="altlink" href="{concat($www,'/proj/en/devrel/staffing-needs/')}">Staffing&#xA0;Needs</a>
555 neysx 1.149 <br/>
556 neysx 1.210 <a class="altlink" href="http://vendors.gentoo.org/">Supporting&#xA0;Vendors</a>
557 neysx 1.202 <br/>
558 neysx 1.210 <a class="altlink" href="http://sources.gentoo.org/">View&#xA0;our&#xA0;CVS</a>
559 neysx 1.202 <br/><br/>
560     Graphics:
561     <br/>
562 neysx 1.209 <a class="altlink" href="{concat($www,'/main/en/graphics.xml')}">
563 neysx 1.202 <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/graphics.xml'))/missing)">
564     <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/graphics.xml')"/></xsl:attribute>
565     </xsl:if>
566 neysx 1.210 <xsl:text>Logos and themes</xsl:text></a>
567 neysx 1.202 <br/>
568 neysx 1.209 <a class="altlink" href="{concat($www,'/main/en/shots.xml')}">
569 neysx 1.202 <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/shots.xml'))/missing)">
570     <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/shots.xml')"/></xsl:attribute>
571     </xsl:if>
572 neysx 1.210 <xsl:text>ScreenShots</xsl:text></a>
573 neysx 1.202 <br/><br/>
574     Miscellaneous Resources:
575     <br/>
576 neysx 1.149 <a class="altlink" href="http://www.cafepress.com/officialgentoo/">Gentoo Linux Store</a>
577     <br/>
578 neysx 1.209 <a class="altlink" href="{concat($www,'/doc/en/articles/')}">IBM dW/Intel article archive</a>
579 swift 1.73 </p>
580     <br/><br />
581     </td>
582     </tr>
583     </table>
584     </td>
585     </tr>
586     </table>
587     </td>
588 neysx 1.146 <!-- Content below top menu and between left menu and ads -->
589     <td valign="top" bgcolor="#ffffff">
590 neysx 1.194 <!-- Test for RTL languages -->
591 neysx 1.208 <xsl:if test="$RTL='Y'">
592 neysx 1.194 <xsl:attribute name="dir">RTL</xsl:attribute>
593     </xsl:if>
594 swift 1.73 <xsl:choose>
595 neysx 1.202 <xsl:when test="/mainpage/newsitems">
596 neysx 1.146 <p class="news">
597 neysx 1.201 <img class="newsicon" src="{concat($ROOT,'images/gentoo-new.gif')}" alt="Gentoo logo"/>
598 neysx 1.149 <span class="newsitem" lang="en">We produce Gentoo Linux, a special flavor of Linux that
599 neysx 1.146 can be automatically optimized and customized for just
600     about any application or need. Extreme performance,
601     configurability and a top-notch user and developer
602     community are all hallmarks of the Gentoo experience.
603     To learn more, read our <b><a href="/main/en/about.xml">about
604     page</a></b>.</span>
605     </p>
606     <xsl:for-each select="document('/dyn/news-index.xml')/uris/uri[position()&lt;=$newsitemcount]/text()">
607 neysx 1.154 <xsl:call-template name="newscontent">
608     <xsl:with-param name="thenews" select="document(.)/news"/>
609     <xsl:with-param name="summary" select="'yes'"/>
610     <xsl:with-param name="link" select="."/>
611     </xsl:call-template>
612 neysx 1.146 </xsl:for-each>
613 neysx 1.181 <!-- Links to older news below news items -->
614     <div class="news">
615     <p class="newshead" lang="en">
616     <b>Older News</b>
617     </p>
618     <ul>
619     <xsl:for-each select="document('/dyn/news-index.xml')/uris/uri[position()&gt;$newsitemcount][position()&lt;20]/text()">
620     <xsl:variable name="newsuri" select="."/>
621     <li><b><a class="altlink" href="{$newsuri}"><xsl:value-of select="document(.)/news/title"/></a></b></li>
622     </xsl:for-each>
623     </ul>
624     </div>
625 swift 1.73 </xsl:when>
626     <xsl:when test="/news">
627 neysx 1.154 <xsl:call-template name="newscontent">
628     <xsl:with-param name="thenews" select="/news"/>
629     <xsl:with-param name="summary" select="no"/>
630     </xsl:call-template>
631 swift 1.73 </xsl:when>
632     </xsl:choose>
633 neysx 1.146 <br/>
634     <table border="0" class="content">
635 klieber 1.107 <tr>
636     <td>
637 neysx 1.204 <xsl:apply-templates select="chapter|devmap"/>
638 klieber 1.107 </td>
639     </tr>
640 neysx 1.146 </table>
641     <br/>
642     <xsl:if test="/mainpage/license">
643     <xsl:apply-templates select="license" />
644     </xsl:if>
645     <br/>
646     <!--content end-->
647 swift 1.73 </td>
648 neysx 1.146 <td width="1%" bgcolor="#dddaec" valign="top">
649     <xsl:call-template name="rhcol"/>
650 swift 1.73 </td>
651     </tr>
652 neysx 1.149 <tr lang="en">
653 neysx 1.146 <td align="right" class="infohead" colspan="3">
654 neysx 1.211 <xsl:call-template name="copyright-footer"/>
655 swift 1.73 </td>
656     </tr>
657 drobbins 1.1 </table>
658 swift 1.73
659     </body>
660 neysx 1.165 </html>
661 swift 1.73 </xsl:template>
662    
663 neysx 1.211 <xsl:template name="copyright-footer">
664     <xsl:variable name="isEnglish">
665     <xsl:if test="string-length($glang)=0 or $glang='en'">Y</xsl:if>
666     </xsl:variable>
667     <xsl:variable name="www">
668     <xsl:if test="$httphost!='www'">http://www.gentoo.org</xsl:if>
669     </xsl:variable>
670     <xsl:variable name="contact">
671     <xsl:choose>
672     <xsl:when test="not($isEnglish='Y' or document(concat('/main/', $glang, '/contact.xml'))/missing)">
673     <xsl:value-of select="concat('/main/', $glang, '/contact.xml')"/>
674     </xsl:when>
675     <xsl:otherwise>/main/en/contact.xml</xsl:otherwise>
676     </xsl:choose>
677     </xsl:variable>
678 neysx 1.220 Copyright 2001-<xsl:value-of select="substring(func:today(),1,4)"/> Gentoo Foundation, Inc. Questions, Comments? <a class="highlight" href="{concat($www, $contact)}">Contact us</a>.
679 neysx 1.211 </xsl:template>
680    
681 swift 1.73 <!-- Mail template -->
682     <xsl:template match="mail">
683 neysx 1.221 <xsl:variable name="mail">
684     <xsl:call-template name="smart-mail">
685     <xsl:with-param name="mail" select="."/>
686     </xsl:call-template>
687 neysx 1.220 </xsl:variable>
688    
689     <xsl:choose>
690 neysx 1.221 <xsl:when test="string-length(exslt:node-set($mail)/mail/@link)>0">
691     <a href="{concat('mailto:',exslt:node-set($mail)/mail/@link)}">
692 neysx 1.220 <xsl:choose>
693     <xsl:when test="name(..)='author'">
694     <xsl:attribute name="class">altlink</xsl:attribute>
695 neysx 1.221 <b><xsl:value-of select="exslt:node-set($mail)/mail/text()"/></b>
696 neysx 1.220 </xsl:when>
697     <xsl:otherwise>
698 neysx 1.221 <xsl:value-of select="exslt:node-set($mail)/mail/text()"/>
699 neysx 1.220 </xsl:otherwise>
700     </xsl:choose>
701     </a>
702     </xsl:when>
703 neysx 1.221 <xsl:otherwise><xsl:value-of select="exslt:node-set($mail)/mail/text()"/></xsl:otherwise>
704 neysx 1.220 </xsl:choose>
705 swift 1.73 </xsl:template>
706    
707     <!-- Author -->
708     <xsl:template match="author">
709 neysx 1.220 <xsl:apply-templates/>
710 neysx 1.146 <xsl:if test="@title">
711 neysx 1.220 <xsl:if test="$style != 'printable'"><br/></xsl:if>
712     <xsl:if test="$style = 'printable'">&#160;</xsl:if>
713 neysx 1.146 <i><xsl:value-of select="@title"/></i>
714     </xsl:if>
715 swift 1.73 <br/>
716 neysx 1.220 <xsl:if test="$style != 'printable' and position() != last()"><br/></xsl:if>
717 swift 1.73 </xsl:template>
718    
719 neysx 1.215 <!-- FAQ Index & Chapter -->
720 neysx 1.224 <xsl:template match="faqindex|chapter|/sections/section">
721     <xsl:if test="not(@test) or dyn:evaluate(@test)">
722     <xsl:variable name="uid" select="generate-id(.)" />
723     <xsl:variable name="chid">
724     <xsl:value-of select="1+count(exslt:node-set($doc-struct)//chapter[@uid=$uid]/preceding-sibling::chapter)"/>
725     </xsl:variable>
726    
727     <xsl:variable name="partnum">
728     <xsl:value-of select="exslt:node-set($doc-struct)//bookpart[descendant::*[@uid=$uid]]/@pos"/>
729     </xsl:variable>
730     <xsl:variable name="chapnum">
731     <xsl:value-of select="exslt:node-set($doc-struct)//bookchap[descendant::*[@uid=$uid]]/@pos"/>
732     </xsl:variable>
733    
734 neysx 1.176 <xsl:choose>
735 neysx 1.224 <xsl:when test="include">
736     <xsl:apply-templates select="document(include/@href)//chapter"/>
737     </xsl:when>
738    
739 neysx 1.176 <xsl:when test="title">
740 neysx 1.224 <xsl:if test="not(position()=1 and title/text()=/mainpage/title)">
741    
742 swift 1.73 <p class="chaphead">
743 neysx 1.224 <xsl:if test="@id">
744     <a name="{@id}"/>
745 neysx 1.176 </xsl:if>
746 neysx 1.224
747     <xsl:choose>
748     <xsl:when test="$TTOP='book' and $full != 0">
749     <a name="book_part{$partnum}_chap{$chapnum}__chap{$chid}"/>
750     </xsl:when>
751     <xsl:otherwise>
752     <a name="doc_chap{$chid}"/>
753     </xsl:otherwise>
754     </xsl:choose>
755    
756     <span class="chapnum">
757     <xsl:choose>
758     <xsl:when test="$TTOP='book'">
759     <xsl:value-of select="$chapnum" />.<xsl:number level="multiple" format="a. " value="$chid"/>
760     </xsl:when>
761     <xsl:otherwise>
762     <xsl:value-of select="$chid"/>.&#160;
763     </xsl:otherwise>
764     </xsl:choose>
765     </span>
766 neysx 1.176 <xsl:value-of select="title"/>
767 drobbins 1.1 </p>
768 neysx 1.224
769     </xsl:if>
770 neysx 1.176 </xsl:when>
771     <xsl:otherwise>
772     <xsl:if test="/guide">
773     <p class="chaphead">
774     <span class="chapnum">
775     <a name="doc_chap{$chid}"><xsl:number/>.</a>
776     </span>
777     </p>
778     </xsl:if>
779     </xsl:otherwise>
780     </xsl:choose>
781 neysx 1.224
782     <xsl:apply-templates select="section|subsection|body"/>
783 neysx 1.215
784     <xsl:if test="name()='faqindex'">
785     <!-- Generate FAQ index -->
786    
787 neysx 1.224 <xsl:for-each select="exslt:node-set($doc-struct)//chapter[position()>1]">
788     <xsl:if test="section[@title]">
789 neysx 1.215 <p class="secthead">
790 neysx 1.224 <xsl:value-of select="@title"/>
791 neysx 1.215 </p>
792     <xsl:variable name="nchap"><xsl:value-of select="1+position()"/></xsl:variable>
793     <ul>
794     <xsl:for-each select="section">
795 neysx 1.224 <xsl:if test="@title">
796 neysx 1.215 <li>
797     <a>
798     <xsl:attribute name="href">
799     <xsl:choose>
800     <xsl:when test="@id">
801     #<xsl:value-of select="@id"/>
802     </xsl:when>
803     <xsl:otherwise>
804     <xsl:value-of select="concat('#doc_chap', $nchap, '_sect')"/><xsl:number/>
805     </xsl:otherwise>
806     </xsl:choose>
807     </xsl:attribute>
808 neysx 1.224 <xsl:value-of select="@title"/>
809 neysx 1.215 </a>
810     </li>
811     </xsl:if>
812     </xsl:for-each>
813     </ul>
814     </xsl:if>
815     </xsl:for-each>
816     </xsl:if>
817 neysx 1.224 </xsl:if>
818 swift 1.73 </xsl:template>
819    
820    
821     <!-- Section template -->
822 neysx 1.224 <xsl:template match="section|/sections/section/subsection">
823     <xsl:if test="not(@test) or dyn:evaluate(@test)">
824    
825     <xsl:variable name="uid" select="generate-id(.)" />
826     <xsl:variable name="chid">
827     <xsl:value-of select="1+count(exslt:node-set($doc-struct)//chapter[descendant::section[@uid=$uid]]/preceding-sibling::chapter)"/>
828     </xsl:variable>
829     <xsl:variable name="seid">
830     <xsl:value-of select="1+count(exslt:node-set($doc-struct)//section[@uid=$uid]/preceding-sibling::section)"/>
831     </xsl:variable>
832    
833     <xsl:variable name="partnum">
834     <xsl:value-of select="exslt:node-set($doc-struct)//bookpart[descendant::*[@uid=$uid]]/@pos"/>
835     </xsl:variable>
836     <xsl:variable name="chapnum">
837     <xsl:value-of select="exslt:node-set($doc-struct)//bookchap[descendant::*[@uid=$uid]]/@pos"/>
838     </xsl:variable>
839    
840     <xsl:choose>
841     <xsl:when test="include">
842     <xsl:apply-templates select="document(include/@href)//section"/>
843     </xsl:when>
844    
845     <xsl:when test="title">
846     <xsl:variable name="sectid">
847     <xsl:choose>
848     <xsl:when test="$TTOP='book' and $full != 0">
849     <xsl:value-of select="concat('book_part', $partnum, '_chap', $chapnum, '__chap', $chid, '_sect', $seid)"/>
850     </xsl:when>
851     <xsl:otherwise>
852     <xsl:value-of select="concat('doc_chap', $chid, '_sect', $seid)"/>
853     </xsl:otherwise>
854     </xsl:choose>
855     </xsl:variable>
856    
857     <p class="secthead">
858     <xsl:if test="@id">
859     <a name="{@id}"/></xsl:if>
860     <a name="{$sectid}"><xsl:value-of select="title"/></a>
861     </p>
862     </xsl:when>
863     </xsl:choose>
864    
865     <xsl:apply-templates select="body"/>
866     </xsl:if>
867 swift 1.73 </xsl:template>
868    
869     <!-- Figure template -->
870     <xsl:template match="figure">
871 neysx 1.224 <xsl:variable name="uid" select="generate-id(.)" />
872     <xsl:variable name="chid">
873     <xsl:value-of select="1+count(exslt:node-set($doc-struct)//chapter[descendant::figure[@uid=$uid]]/preceding-sibling::chapter)"/>
874     </xsl:variable>
875     <xsl:variable name="fignum">
876     <xsl:value-of select="1+count(exslt:node-set($doc-struct)//chapter[descendant::figure[@uid=$uid]]//figure[following::figure[@uid=$uid]])"/>
877     </xsl:variable>
878     <xsl:variable name="figid">
879     <xsl:choose>
880     <xsl:when test="($TTOP = 'book') and ($full != 0)">
881     <xsl:value-of select="concat('book_part', exslt:node-set($doc-struct)//bookpart[descendant::figure[@uid=$uid]]/@pos, '_chap', exslt:node-set($doc-struct)//bookchap[descendant::figure[@uid=$uid]]/@pos, '__chap', $chid, '_fig', $fignum)"/>
882 neysx 1.146 </xsl:when>
883     <xsl:otherwise>
884 neysx 1.224 <xsl:value-of select="concat('doc_chap', $chid, '_fig', $fignum)"/>
885 neysx 1.146 </xsl:otherwise>
886 neysx 1.224 </xsl:choose>
887     </xsl:variable>
888    
889     <xsl:variable name="llink">
890     <xsl:choose>
891     <xsl:when test="starts-with(@link,'http://www.gentoo.org/')">
892     <xsl:value-of select="concat($ROOT, substring-after(@link, 'http://www.gentoo.org/'))"/>
893     </xsl:when>
894     <xsl:when test="starts-with(@link,'/')">
895     <xsl:value-of select="concat($ROOT, substring-after(@link, '/'))"/>
896     </xsl:when>
897     <xsl:otherwise>
898     <xsl:value-of select="@link"/>
899     </xsl:otherwise>
900     </xsl:choose>
901     </xsl:variable>
902     <br/>
903     <a name="{$figid}"/>
904     <table cellspacing="0" cellpadding="0" border="0">
905     <tr>
906     <td bgcolor="#7a5ada">
907     <p class="codetitle">
908     <xsl:choose>
909     <xsl:when test="@caption">
910     <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"/>
911     </xsl:when>
912     <xsl:otherwise>
913     <xsl:value-of select="func:gettext('Figure')"/>&#160;<xsl:value-of select="$chid"/>.<xsl:value-of select="$fignum"/>
914     </xsl:otherwise>
915     </xsl:choose>
916     </p>
917     </td>
918     </tr>
919     <tr>
920     <td align="center" bgcolor="#ddddff">
921 swift 1.73 <xsl:choose>
922 neysx 1.224 <xsl:when test="@short">
923     <img src="{$llink}" alt="Fig. {$fignum}: {@short}"/>
924 swift 1.73 </xsl:when>
925     <xsl:otherwise>
926 neysx 1.224 <img src="{$llink}" alt="Fig. {$fignum}"/>
927 swift 1.73 </xsl:otherwise>
928     </xsl:choose>
929 neysx 1.224 </td>
930     </tr>
931     </table>
932     <br/>
933 swift 1.73 </xsl:template>
934    
935     <!--figure without a caption; just a graphical element-->
936     <xsl:template match="fig">
937 neysx 1.201 <xsl:variable name="llink">
938     <xsl:choose>
939     <xsl:when test="starts-with(@link,'http://www.gentoo.org/')">
940     <xsl:value-of select="concat($ROOT, substring-after(@link, 'http://www.gentoo.org/'))"/>
941     </xsl:when>
942     <xsl:when test="starts-with(@link,'/')">
943     <xsl:value-of select="concat($ROOT, substring-after(@link, '/'))"/>
944     </xsl:when>
945     <xsl:otherwise>
946     <xsl:value-of select="@link"/>
947     </xsl:otherwise>
948     </xsl:choose>
949     </xsl:variable>
950     <center>
951     <xsl:choose>
952     <xsl:when test="@linkto">
953     <a href="{@linkto}"><img border="0" src="{$llink}" alt="{@short}"/></a>
954     </xsl:when>
955     <xsl:otherwise>
956     <img src="{$llink}" alt="{@short}"/>
957     </xsl:otherwise>
958     </xsl:choose>
959     </center>
960 swift 1.73 </xsl:template>
961    
962 neysx 1.204 <xsl:template match="devmap">
963     <h1>Gentoo Developers Map</h1>
964     <p id="map" style="height:460px"/>
965     <br/>
966     <table id="devlinks" style="width:100%"/>
967     </xsl:template>
968    
969 swift 1.73 <!-- Line break -->
970     <xsl:template match="br">
971     <br/>
972     </xsl:template>
973    
974     <!-- Note -->
975     <xsl:template match="note">
976 neysx 1.182 <xsl:if test="not(@test) or dyn:evaluate(@test)">
977     <table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0">
978     <tr>
979     <td bgcolor="#bbffbb">
980     <p class="note">
981     <b><xsl:value-of select="func:gettext('Note')"/>: </b>
982     <xsl:apply-templates/>
983     </p>
984     </td>
985     </tr>
986     </table>
987     </xsl:if>
988 swift 1.73 </xsl:template>
989    
990     <!-- Important item -->
991     <xsl:template match="impo">
992 neysx 1.182 <xsl:if test="not(@test) or dyn:evaluate(@test)">
993     <table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0">
994     <tr>
995     <td bgcolor="#ffffbb">
996     <p class="note">
997     <b><xsl:value-of select="func:gettext('Important')"/>: </b>
998     <xsl:apply-templates/>
999     </p>
1000     </td>
1001     </tr>
1002     </table>
1003     </xsl:if>
1004 swift 1.73 </xsl:template>
1005    
1006     <!-- Warning -->
1007     <xsl:template match="warn">
1008 neysx 1.182 <xsl:if test="not(@test) or dyn:evaluate(@test)">
1009     <table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0">
1010     <tr>
1011     <td bgcolor="#ffbbbb">
1012     <p class="note">
1013     <b><xsl:value-of select="func:gettext('Warning')"/>: </b>
1014     <xsl:apply-templates/>
1015     </p>
1016     </td>
1017     </tr>
1018     </table>
1019     </xsl:if>
1020 swift 1.73 </xsl:template>
1021    
1022     <!-- Code note -->
1023     <xsl:template match="codenote">
1024 neysx 1.146 <span class="comment">
1025     <xsl:if test='not(starts-with(., "("))'>(</xsl:if>
1026     <xsl:apply-templates/>
1027     <xsl:if test='not(starts-with(., "("))'>)</xsl:if>
1028     </span>
1029 swift 1.73 </xsl:template>
1030    
1031     <!-- Regular comment -->
1032     <xsl:template match="comment">
1033 neysx 1.172 <span class="code-comment"><xsl:apply-templates/></span>
1034 swift 1.73 </xsl:template>
1035    
1036 neysx 1.172 <!-- Colour coding inside <pre> -->
1037 swift 1.73 <xsl:template match="i">
1038 neysx 1.172 <span class="code-input"><xsl:apply-templates/></span>
1039     </xsl:template>
1040    
1041     <xsl:template match="var">
1042     <span class="code-variable"><xsl:apply-templates/></span>
1043     </xsl:template>
1044    
1045     <xsl:template match="ident">
1046     <span class="code-identifier"><xsl:apply-templates/></span>
1047 swift 1.73 </xsl:template>
1048    
1049 neysx 1.172 <xsl:template match="keyword">
1050     <span class="code-keyword"><xsl:apply-templates/></span>
1051     </xsl:template>
1052    
1053     <xsl:template match="stmt">
1054     <span class="code-statement"><xsl:apply-templates/></span>
1055     </xsl:template>
1056    
1057     <xsl:template match="const">
1058     <span class="code-constant"><xsl:apply-templates/></span>
1059     </xsl:template>
1060    
1061    
1062 swift 1.73 <!-- Bold -->
1063     <xsl:template match="b">
1064     <b><xsl:apply-templates/></b>
1065     </xsl:template>
1066    
1067 neysx 1.166 <!-- Superscript -->
1068     <xsl:template match="sup">
1069     <sup><xsl:apply-templates/></sup>
1070     </xsl:template>
1071    
1072     <!-- Subscript -->
1073     <xsl:template match="sub">
1074     <sub><xsl:apply-templates/></sub>
1075     </xsl:template>
1076    
1077 swift 1.73 <!-- Brite -->
1078     <xsl:template match="brite">
1079     <font color="#ff0000">
1080     <b><xsl:apply-templates/></b>
1081     </font>
1082     </xsl:template>
1083    
1084     <!-- Body -->
1085     <xsl:template match="body">
1086 neysx 1.182 <xsl:if test="not(@test) or dyn:evaluate(@test)">
1087 neysx 1.224 <xsl:choose>
1088     <xsl:when test="include">
1089     <xsl:apply-templates select="document(include/@href)//body"/>
1090     </xsl:when>
1091     <xsl:otherwise>
1092     <xsl:apply-templates select="./*[not(@test) or dyn:evaluate(@test)]"/>
1093     </xsl:otherwise>
1094     </xsl:choose>
1095 neysx 1.182 </xsl:if>
1096 swift 1.73 </xsl:template>
1097    
1098     <!-- Command or input, not to use inside <pre> -->
1099     <xsl:template match="c">
1100 neysx 1.200 <span class="code" dir="ltr"><xsl:apply-templates/></span>
1101 swift 1.73 </xsl:template>
1102    
1103     <!-- Preserve whitespace, aka Code Listing -->
1104     <xsl:template match="pre">
1105 neysx 1.182 <xsl:if test="not(@test) or dyn:evaluate(@test)">
1106 neysx 1.224 <xsl:variable name="uid" select="generate-id(.)" />
1107     <xsl:variable name="chid">
1108     <xsl:value-of select="1+count(exslt:node-set($doc-struct)//chapter[descendant::pre[@uid=$uid]]/preceding-sibling::chapter)"/>
1109     </xsl:variable>
1110     <xsl:variable name="prenum">
1111     <xsl:value-of select="1+count(exslt:node-set($doc-struct)//chapter[descendant::pre[@uid=$uid]]//pre[following::pre[@uid=$uid]])"/>
1112     </xsl:variable>
1113     <xsl:variable name="preid">
1114     <xsl:choose>
1115     <xsl:when test="($TTOP = 'book') and ($full != 0)">
1116     <xsl:value-of select="concat('book_part', exslt:node-set($doc-struct)//bookpart[descendant::pre[@uid=$uid]]/@pos, '_chap', exslt:node-set($doc-struct)//bookchap[descendant::pre[@uid=$uid]]/@pos, '__chap', $chid, '_pre', $prenum)"/>
1117     </xsl:when>
1118     <xsl:otherwise>
1119     <xsl:value-of select="concat('doc_chap', $chid, '_pre', $prenum)"/>
1120     </xsl:otherwise>
1121     </xsl:choose>
1122     </xsl:variable>
1123    
1124 neysx 1.182 <a name="{$preid}"/>
1125     <table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0">
1126     <tr>
1127     <td bgcolor="#7a5ada">
1128     <p class="codetitle">
1129     <xsl:value-of select="func:gettext('CodeListing')"/>&#160;<xsl:if test="$chid"><xsl:value-of select="$chid"/>.</xsl:if><xsl:value-of select="$prenum"/>
1130     <xsl:if test="@caption">
1131     <xsl:value-of select="func:gettext('SpaceBeforeColon')"/>: <xsl:value-of select="@caption"/>
1132     </xsl:if>
1133     </p>
1134     </td>
1135     </tr>
1136     <tr>
1137 neysx 1.199 <td bgcolor="#eeeeff" align="left" dir="ltr">
1138 neysx 1.182 <pre>
1139     <xsl:apply-templates/>
1140     </pre>
1141     </td>
1142     </tr>
1143     </table>
1144     </xsl:if>
1145 swift 1.73 </xsl:template>
1146    
1147     <!-- Path -->
1148     <xsl:template match="path">
1149 neysx 1.199 <span class="path" dir="ltr"><xsl:apply-templates/></span>
1150 swift 1.73 </xsl:template>
1151    
1152     <!-- Url -->
1153     <xsl:template match="uri">
1154 neysx 1.165 <xsl:param name="paramlink"/>
1155 swift 1.73 <!-- expand templates to handle things like <uri link="http://bar"><c>foo</c></uri> -->
1156     <xsl:choose>
1157     <xsl:when test="@link">
1158 swift 1.87 <xsl:choose>
1159 neysx 1.147 <xsl:when test="($TTOP = 'sections') and (starts-with(@link, '?'))">
1160     <!-- Handbook link pointing to another part/chapter when viewing a single page,
1161     cannot be a link because we have no idea where to link to
1162     Besides, we have no way of knowing the language unless told via a param -->
1163     <xsl:variable name="nolink"><xsl:value-of select="func:gettext('hb_file', $glang)"/></xsl:variable>
1164     <span title="{$nolink}"><font color="#404080">(<xsl:apply-templates/>)</font></span>
1165     </xsl:when>
1166 swift 1.96 <xsl:when test="($TTOP = 'book') and ($full = 0) and (starts-with(@link, '?'))">
1167 neysx 1.112 <!-- Handbook link pointing to another part/chapter, normal case -->
1168 neysx 1.146 <xsl:choose>
1169     <xsl:when test="$style != 'printable'">
1170 neysx 1.186 <a href="{$link}{@link}"><xsl:apply-templates/></a>
1171 neysx 1.146 </xsl:when>
1172     <xsl:otherwise>
1173 neysx 1.186 <a href="{$link}{@link}&amp;style=printable"><xsl:apply-templates/></a>
1174 neysx 1.146 </xsl:otherwise>
1175     </xsl:choose>
1176 swift 1.96 </xsl:when>
1177     <xsl:when test="($TTOP = 'book') and ($full = 1) and (starts-with(@link, '?'))">
1178 blackace 1.98 <!-- Handbook link pointing to another part/chapter
1179 swift 1.96 Handbook is being rendered in a single page (full=1)
1180 neysx 1.112 Hence link needs to be rewritten as a local one
1181 neysx 1.147 i.e. ?part=1&chap=3#doc_chap1 must become #book_part1_chap3__chap1 Case 1a
1182     i.e. ?part=1&chap=3#anID must become #anID Case 1b
1183 neysx 1.112 or ?part=1&chap=3 must become #book_part1_chap3 Case 2
1184     or ?part=2 must become #book_part2 Case 3-->
1185 swift 1.96 <xsl:choose>
1186 neysx 1.112 <xsl:when test="contains(@link, 'chap=') and contains(@link, '#doc_')">
1187 neysx 1.147 <!-- Link points inside a chapter (Case 1a)-->
1188 neysx 1.192 <xsl:variable name="linkpart" select="substring-after(substring-before(@link, '&amp;'), '=')" />
1189     <xsl:variable name="linkchap" select="substring-before(substring-after(substring-after(@link, '&amp;'), '='), '#doc_')" />
1190     <xsl:variable name="linkanch" select="substring-after(@link, '#doc_')" />
1191 neysx 1.112 <a href="#book_part{$linkpart}_chap{$linkchap}__{$linkanch}"><xsl:apply-templates /></a>
1192     </xsl:when>
1193 neysx 1.147 <xsl:when test="contains(@link, 'chap=') and contains(@link, '#')">
1194     <!-- Link points inside a chapter via an ID (Case 1b)
1195     (IDs are expected to be unique throughout a handbook) -->
1196 neysx 1.192 <xsl:variable name="linkanch" select="substring-after(@link, '#')" />
1197 neysx 1.147 <a href="#{$linkanch}"><xsl:apply-templates /></a>
1198     </xsl:when>
1199 neysx 1.112 <xsl:when test="contains(@link, 'chap=')">
1200     <!-- Link points to a chapter (Case 2)-->
1201 neysx 1.192 <xsl:variable name="linkpart" select="substring-after(substring-before(@link, '&amp;'), '=')" />
1202     <xsl:variable name="linkchap" select="substring-after(substring-after(@link, '&amp;'), '=')" />
1203 swift 1.96 <a href="#book_part{$linkpart}_chap{$linkchap}"><xsl:apply-templates /></a>
1204     </xsl:when>
1205     <xsl:otherwise>
1206 neysx 1.112 <!-- Link points to a part (Case 3)-->
1207 neysx 1.192 <xsl:variable name="linkpart" select="substring-after(@link, '=')" />
1208 swift 1.96 <a href="#book_part{$linkpart}"><xsl:apply-templates/></a>
1209     </xsl:otherwise>
1210     </xsl:choose>
1211     </xsl:when>
1212     <xsl:when test="($TTOP = 'book') and ($full = 1) and (starts-with(@link, '#'))">
1213 neysx 1.147 <!-- Handbook link pointing to another place in same part/chapter
1214 swift 1.96 Handbook is being rendered in a single page (full=1)
1215 blackace 1.98 Hence link needs to be rewritten as an internal one that is unique
1216 swift 1.96 for the whole handbook, i.e.
1217     #doc_part1_chap3 becomes #book_{UNIQUEID}_part1_chap3, but
1218 neysx 1.147 #anything_else_like_an_ID is left unchanged (IDs are expected to be unique throughout a handbook)-->
1219 swift 1.96 <xsl:choose>
1220     <xsl:when test="starts-with(@link, '#doc_')">
1221 neysx 1.192 <xsl:variable name="locallink" select="substring-after(@link, 'doc_')" />
1222 neysx 1.224 <xsl:variable name="bodyid" select="generate-id(ancestor::body)"/>
1223     <a href="{concat('#book_part',exslt:node-set($doc-struct)//bookpart[descendant::body[@uid=$bodyid]]/@pos,'_chap',exslt:node-set($doc-struct)//bookchap[descendant::body[@uid=$bodyid]]/@pos,'__',$locallink)}"><xsl:apply-templates /></a>
1224 swift 1.96 </xsl:when>
1225     <xsl:otherwise>
1226     <a href="{@link}"><xsl:apply-templates/></a>
1227     </xsl:otherwise>
1228     </xsl:choose>
1229 swift 1.87 </xsl:when>
1230     <xsl:otherwise>
1231 neysx 1.165 <xsl:variable name="theurl">
1232     <xsl:choose>
1233     <xsl:when test="@link"><xsl:value-of select="@link" /></xsl:when>
1234     <xsl:otherwise><xsl:value-of select="text()" /></xsl:otherwise>
1235     </xsl:choose>
1236     </xsl:variable>
1237    
1238     <xsl:variable name="thelink">
1239     <xsl:choose>
1240     <xsl:when test="name(..)='insert' and $theurl='$redirect' and $paramlink"><xsl:value-of select="$paramlink" /></xsl:when>
1241     <xsl:when test="name(..)='insert' and $theurl='$originalversion' and $paramlink">
1242     <xsl:variable name="temp">
1243     <xsl:value-of select="$paramlink"/>
1244     <xsl:if test="$style = 'printable'">&amp;style=printable</xsl:if>
1245     <xsl:if test="$full != '0'">&amp;full=1</xsl:if>
1246     <xsl:if test="$part != '0'">&amp;part=<xsl:value-of select="$part"/></xsl:if>
1247     <xsl:if test="$chap != '0'">&amp;chap=<xsl:value-of select="$chap"/></xsl:if>
1248     </xsl:variable>
1249     <xsl:choose>
1250     <xsl:when test="contains($temp, '&amp;')">
1251     <xsl:value-of select="concat(substring-before($temp,'&amp;'), '?', substring-after($temp,'&amp;'))"/>
1252     </xsl:when>
1253     <xsl:otherwise>
1254     <xsl:value-of select="$temp"/>
1255     </xsl:otherwise>
1256     </xsl:choose>
1257     </xsl:when>
1258     <xsl:otherwise><xsl:value-of select="$theurl" /></xsl:otherwise>
1259     </xsl:choose>
1260     </xsl:variable>
1261    
1262 neysx 1.209 <!-- Strip http://www.gentoo.org from links if running on www.g.o
1263     Has no effect on actual www.g.o but helps when surfing on a local copy as long as httphost is set to www as well
1264 neysx 1.180 Rewrite http://www.gentoo.org/cgi-bin/viewcvs/ to use sources.gentoo.org/
1265 neysx 1.159 -->
1266 neysx 1.146 <xsl:variable name="llink">
1267     <xsl:choose>
1268 neysx 1.180 <xsl:when test="starts-with($thelink, 'http://www.gentoo.org/cgi-bin/viewcvs.cgi')"><xsl:value-of select="concat('http://sources.gentoo.org/viewcvs.py', substring-after($thelink, 'http://www.gentoo.org/cgi-bin/viewcvs.cgi'))" /></xsl:when>
1269     <xsl:when test="starts-with($thelink, '/cgi-bin/viewcvs.cgi')"><xsl:value-of select="concat('http://sources.gentoo.org/viewcvs.py', substring-after($thelink, '/cgi-bin/viewcvs.cgi'))" /></xsl:when>
1270 neysx 1.209 <xsl:when test="$httphost='www' and starts-with($thelink, 'http://www.gentoo.org/')"><xsl:value-of select="substring-after($thelink, 'http://www.gentoo.org')" /></xsl:when>
1271     <xsl:when test="not($httphost='www') and starts-with($thelink, '/') and not(starts-with($thelink, '/~'))"><xsl:value-of select="concat('http://www.gentoo.org', $thelink)" /></xsl:when>
1272 neysx 1.163 <!-- Add catid to links to /doc/LL/index.xml -->
1273 neysx 1.165 <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')">
1274     <xsl:value-of select="concat($thelink, '?catid=', $catid)"/>
1275 neysx 1.163 </xsl:when>
1276 neysx 1.165 <xsl:otherwise><xsl:value-of select="$thelink" /></xsl:otherwise>
1277 neysx 1.146 </xsl:choose>
1278     </xsl:variable>
1279    
1280     <!-- Now, insert style=printable in the URL if necessary -->
1281     <xsl:variable name="alink">
1282     <xsl:choose>
1283     <xsl:when test="$style != 'printable' or contains($llink, 'style=printable')">
1284     <!-- Not printable style or style=printable already in URL, copy link -->
1285     <xsl:value-of select="$llink" />
1286     </xsl:when>
1287     <xsl:when test="contains($llink, '://')">
1288     <!-- External link, copy link -->
1289     <xsl:value-of select="$llink" />
1290     </xsl:when>
1291     <xsl:when test="starts-with($llink, '#')">
1292     <!-- Anchor, copy link -->
1293     <xsl:value-of select="$llink" />
1294     </xsl:when>
1295     <xsl:otherwise>
1296     <!-- We should have eliminated all other cases,
1297     style printable, local link, then insert ?style=printable -->
1298     <xsl:choose>
1299     <xsl:when test="starts-with($llink, '?')">
1300     <xsl:value-of select="concat( '?style=printable&amp;', substring-after($llink, '?'))" />
1301     </xsl:when>
1302     <xsl:when test="contains($llink, '.xml?')">
1303     <xsl:value-of select="concat(substring-before($llink, '.xml?'), '.xml?style=printable&amp;', substring-after($llink, '.xml?'))" />
1304     </xsl:when>
1305     <xsl:when test="contains($llink, '.xml#')">
1306     <xsl:value-of select="concat(substring-before($llink, '.xml#'), '.xml?style=printable#', substring-after($llink, '.xml#'))" />
1307     </xsl:when>
1308     <xsl:when test="substring-after($llink, '.xml') = ''">
1309     <xsl:value-of select="concat($llink, '?style=printable')" />
1310     </xsl:when>
1311     <xsl:otherwise>
1312     <!-- Have I forgotten anything?
1313     Copy link -->
1314     <xsl:value-of select="$llink" />
1315     </xsl:otherwise>
1316     </xsl:choose>
1317     </xsl:otherwise>
1318     </xsl:choose>
1319     </xsl:variable>
1320     <a href="{$alink}"><xsl:apply-templates/></a>
1321 swift 1.87 </xsl:otherwise>
1322     </xsl:choose>
1323 swift 1.73 </xsl:when>
1324     <xsl:otherwise>
1325     <xsl:variable name="loc" select="."/>
1326     <a href="{$loc}"><xsl:apply-templates/></a>
1327     </xsl:otherwise>
1328     </xsl:choose>
1329     </xsl:template>
1330    
1331     <!-- Paragraph -->
1332     <xsl:template match="p">
1333     <xsl:param name="chid"/>
1334 neysx 1.182 <xsl:if test="not(@test) or dyn:evaluate(@test)">
1335 neysx 1.166 <p>
1336     <!-- Keep this for old files with <p class="secthead"> -->
1337     <xsl:if test="@class">
1338     <xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute>
1339     </xsl:if>
1340    
1341     <xsl:if test="@by">
1342     <xsl:attribute name="class">epigraph</xsl:attribute>
1343     </xsl:if>
1344    
1345     <xsl:apply-templates>
1346     <xsl:with-param name="chid" select="$chid"/>
1347     </xsl:apply-templates>
1348    
1349     <xsl:if test="@by">
1350     <br/><br/><span class="episig">—<xsl:value-of select="@by"/></span><br/><br/>
1351     </xsl:if>
1352     </p>
1353 neysx 1.182 </xsl:if>
1354 swift 1.73 </xsl:template>
1355    
1356     <!-- Emphasize -->
1357     <xsl:template match="e">
1358     <span class="emphasis"><xsl:apply-templates/></span>
1359     </xsl:template>
1360    
1361     <!-- Table -->
1362     <xsl:template match="table">
1363 neysx 1.182 <xsl:if test="not(@test) or dyn:evaluate(@test)">
1364     <table class="ntable">
1365     <xsl:apply-templates/>
1366     </table>
1367     </xsl:if>
1368 swift 1.73 </xsl:template>
1369    
1370     <!-- Table Row -->
1371     <xsl:template match="tr">
1372 neysx 1.182 <xsl:if test="not(@test) or dyn:evaluate(@test)">
1373     <tr>
1374     <xsl:if test="@id">
1375     <xsl:attribute name="id">
1376     <xsl:value-of select="@id"/>
1377     </xsl:attribute>
1378     </xsl:if>
1379     <xsl:apply-templates/>
1380     </tr>
1381 neysx 1.158 </xsl:if>
1382 swift 1.73 </xsl:template>
1383    
1384 neysx 1.169 <xsl:template match="tcolumn">
1385     <col width="{@width}"/>
1386     </xsl:template>
1387    
1388 swift 1.73 <!-- Table Item -->
1389     <xsl:template match="ti">
1390 neysx 1.146 <td class="tableinfo">
1391 neysx 1.175 <xsl:if test="@align='center' or @align='right'">
1392     <xsl:attribute name="style"><xsl:value-of select="concat('text-align:',@align)"/></xsl:attribute>
1393     </xsl:if>
1394 neysx 1.169 <xsl:if test="@colspan">
1395     <xsl:attribute name="colspan"><xsl:value-of select="@colspan"/></xsl:attribute>
1396     </xsl:if>
1397     <xsl:if test="@rowspan">
1398     <xsl:attribute name="rowspan"><xsl:value-of select="@rowspan"/></xsl:attribute>
1399     </xsl:if>
1400 swift 1.73 <xsl:apply-templates/>
1401     </td>
1402     </xsl:template>
1403    
1404 neysx 1.166 <!-- Table Heading, no idea why <th> hasn't been used -->
1405 swift 1.73 <xsl:template match="th">
1406 neysx 1.146 <td class="infohead">
1407 neysx 1.166 <xsl:if test="@colspan">
1408     <xsl:attribute name="colspan"><xsl:value-of select="@colspan"/></xsl:attribute>
1409     <!-- Center only when item spans several columns as
1410     centering all <th> might disrupt some pages.
1411     We might want to use a plain html <th> tag later.
1412     Tip: to center a single-cell title, use <th colspan="1">
1413     -->
1414     <xsl:attribute name="style">text-align:center</xsl:attribute>
1415     </xsl:if>
1416     <xsl:if test="@rowspan">
1417     <xsl:attribute name="rowspan"><xsl:value-of select="@rowspan"/></xsl:attribute>
1418     </xsl:if>
1419 swift 1.73 <b>
1420     <xsl:apply-templates/>
1421     </b>
1422     </td>
1423     </xsl:template>
1424    
1425     <!-- Unnumbered List -->
1426     <xsl:template match="ul">
1427 neysx 1.182 <xsl:if test="not(@test) or dyn:evaluate(@test)">
1428     <ul>
1429     <xsl:apply-templates/>
1430     </ul>
1431     </xsl:if>
1432 swift 1.73 </xsl:template>
1433    
1434     <!-- Ordered List -->
1435     <xsl:template match="ol">
1436 neysx 1.182 <xsl:if test="not(@test) or dyn:evaluate(@test)">
1437     <ol>
1438     <xsl:apply-templates/>
1439     </ol>
1440     </xsl:if>
1441 swift 1.73 </xsl:template>
1442    
1443     <!-- List Item -->
1444     <xsl:template match="li">
1445 neysx 1.182 <xsl:if test="not(@test) or dyn:evaluate(@test)">
1446     <li>
1447     <xsl:apply-templates/>
1448     </li>
1449     </xsl:if>
1450 swift 1.73 </xsl:template>
1451    
1452 neysx 1.166 <!-- Definition Lists -->
1453     <xsl:template match="dl">
1454     <dl><xsl:apply-templates/></dl>
1455     </xsl:template>
1456    
1457     <xsl:template match="dt">
1458     <dt><xsl:apply-templates/></dt>
1459     </xsl:template>
1460    
1461     <xsl:template match="dd">
1462     <dd><xsl:apply-templates/></dd>
1463     </xsl:template>
1464    
1465 swift 1.73 <!-- NOP -->
1466     <xsl:template match="ignoreinemail">
1467     <xsl:apply-templates/>
1468     </xsl:template>
1469    
1470     <!-- NOP -->
1471     <xsl:template match="ignoreinguide">
1472     </xsl:template>
1473    
1474     <!-- License Tag -->
1475 swift 1.61 <xsl:template match="license">
1476 neysx 1.146 <p class="copyright">
1477 neysx 1.194 <!-- Test for RTL languages -->
1478 neysx 1.208 <xsl:if test="$RTL='Y'">
1479 neysx 1.194 <xsl:attribute name="dir">RTL</xsl:attribute>
1480     </xsl:if>
1481 neysx 1.130 <xsl:apply-templates select="func:gettext('License')"/>
1482 neysx 1.146 </p>
1483 neysx 1.151 <xsl:comment>
1484     &lt;rdf:RDF xmlns="http://web.resource.org/cc/"
1485     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
1486 neysx 1.152 &lt;License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/"&gt;
1487 neysx 1.151 &lt;permits rdf:resource="http://web.resource.org/cc/Reproduction" /&gt;
1488     &lt;permits rdf:resource="http://web.resource.org/cc/Distribution" /&gt;
1489     &lt;requires rdf:resource="http://web.resource.org/cc/Notice" /&gt;
1490     &lt;requires rdf:resource="http://web.resource.org/cc/Attribution" /&gt;
1491     &lt;permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /&gt;
1492     &lt;requires rdf:resource="http://web.resource.org/cc/ShareAlike" /&gt;
1493     &lt;/License&gt;
1494     &lt;/rdf:RDF&gt;
1495     </xsl:comment>
1496 swift 1.61 </xsl:template>
1497 klieber 1.25
1498 neysx 1.207 <!-- GLEP index -->
1499     <xsl:template match="glepindex">
1500     <table class="ntable">
1501     <tr>
1502     <td class="infohead">Number</td><td class="infohead">Type</td><td class="infohead">Status</td><td class="infohead">Title</td>
1503     </tr>
1504     <xsl:apply-templates select="document(@index)/gleps/glep">
1505     <xsl:with-param name="status" select="string(@status)"/>
1506     </xsl:apply-templates>
1507     </table>
1508     </xsl:template>
1509    
1510     <!-- One GLEP table row -->
1511     <xsl:template match="glep">
1512     <xsl:param name="status" select="''"/>
1513     <xsl:if test="string-length($status)=0 or contains($status, @status)">
1514     <tr>
1515     <td class="tableinfo"><a href="{@file}"><xsl:value-of select="@id"/></a></td>
1516     <td class="tableinfo"><xsl:value-of select="@type"/></td>
1517     <td class="tableinfo"><xsl:value-of select="@status"/></td>
1518     <td class="tableinfo"><xsl:apply-templates select="node()"/></td>
1519     </tr>
1520     </xsl:if>
1521     </xsl:template>
1522    
1523    
1524 blackace 1.98 <!-- GLSA Index -->
1525     <xsl:template match="glsaindex">
1526     <xsl:apply-templates select="document('/dyn/glsa-index.xml')/guide/chapter[1]/section[1]/body"/>
1527     </xsl:template>
1528    
1529 swift 1.119 <!-- GLSA Latest (max 10) -->
1530     <xsl:template match="glsa-latest">
1531     <xsl:variable name="src" select="'/dyn/glsa-index.xml'"/>
1532     <table>
1533     <xsl:for-each select="document($src)/guide/chapter[1]/section[1]/body/table[1]/tr[position()&lt;11]">
1534     <tr><xsl:apply-templates/></tr>
1535     </xsl:for-each>
1536     </table>
1537     </xsl:template>
1538    
1539 neysx 1.141
1540 neysx 1.165 <!-- Compare versions between two documents, scan handbooks if need be -->
1541     <xsl:template name="compare-versions">
1542     <xsl:param name="original"/>
1543     <xsl:param name="translation"/>
1544 neysx 1.224
1545     <xsl:choose>
1546     <xsl:when test="$original/doc-struct/@type != $translation/doc-struct/@type">
1547     <xsl:text>NoOriginal</xsl:text>
1548     </xsl:when>
1549    
1550     <xsl:when test="/book and $full='0' and $chap != '0' and $part != '0' and not($original/doc-struct/bookpart[@pos=$part]/bookchap[@pos=$chap])">
1551     <xsl:text>NoOriginal</xsl:text>
1552     </xsl:when>
1553    
1554     <xsl:otherwise>
1555     <xsl:variable name="orig-versions">
1556     <xsl:for-each select="$original//version">
1557     <xsl:value-of select="concat(.,' ')"/>
1558     </xsl:for-each>
1559     </xsl:variable>
1560    
1561     <xsl:variable name="trans-versions">
1562     <xsl:for-each select="$translation//version">
1563     <xsl:value-of select="concat(.,' ')"/>
1564     </xsl:for-each>
1565     </xsl:variable>
1566    
1567     <xsl:if test="$orig-versions != $trans-versions">Different</xsl:if>
1568     </xsl:otherwise>
1569     </xsl:choose>
1570    
1571 neysx 1.165 </xsl:template>
1572    
1573     <xsl:template name="maxdate">
1574 neysx 1.224 <xsl:param name="thedoc"/>
1575     <xsl:for-each select="$thedoc//date">
1576     <xsl:sort select="." order="descending" />
1577     <xsl:if test="position()=1"><xsl:value-of select="."/></xsl:if>
1578     </xsl:for-each>
1579 neysx 1.165 </xsl:template>
1580    
1581     <xsl:template name="contentdate">
1582     <xsl:variable name="docdate">
1583     <xsl:call-template name="maxdate">
1584 neysx 1.224 <xsl:with-param name="thedoc" select="exslt:node-set($doc-struct)"/>
1585 neysx 1.165 </xsl:call-template>
1586     </xsl:variable>
1587    
1588     <xsl:choose>
1589     <xsl:when test="func:gettext('Updated')/docdate">
1590     <xsl:apply-templates select="func:gettext('Updated')">
1591     <xsl:with-param name="docdate" select="$docdate"/>
1592     </xsl:apply-templates>
1593 neysx 1.147 </xsl:when>
1594 neysx 1.165 <xsl:otherwise>
1595     <xsl:value-of select="concat(func:gettext('Updated'),' ')"/> <xsl:copy-of select="func:format-date($docdate)"/>
1596     </xsl:otherwise>
1597 neysx 1.141 </xsl:choose>
1598     </xsl:template>
1599    
1600 neysx 1.165 <xsl:template name="outdated-translation">
1601 neysx 1.202 <!-- Add mention that translation is outdated whenever possible in /main and /doc-->
1602 neysx 1.213 <xsl:if test="$glang != '' and not (//*[1]/@metadoc = 'yes') and (starts-with($link, '/doc/') or starts-with($link, '/main/') or (starts-with($link, '/proj/') and contains($link, '/gdp/'))) and not(starts-with($link, '/doc/en/') or starts-with($link, '/main/en/') or starts-with($link, '/proj/en/'))">
1603 neysx 1.165 <!-- We have a translation, is it up-to-date? -->
1604     <xsl:variable name="metadoc" select="document(concat('/doc/', $glang, '/metadoc.xml'))"/>
1605     <xsl:variable name="fileid" select="$metadoc/metadoc/files/file[text()=$link]/@id"/>
1606     <xsl:choose>
1607     <xsl:when test="not($fileid)">
1608     <!-- File is not even listed in local metadoc.xml -->
1609     <xsl:value-of select="func:gettext('NoIndex')"/>
1610     </xsl:when>
1611     <xsl:otherwise>
1612     <xsl:variable name="pmetadoc" select="document($metadoc/metadoc/@parent)"/>
1613     <xsl:choose>
1614     <xsl:when test="not($pmetadoc/metadoc/files/file[@id=$fileid])">
1615     <!-- File is not listed in original metadoc.xml -->
1616     <xsl:value-of select="func:gettext('NoOriginal')"/>
1617     </xsl:when>
1618     <xsl:otherwise>
1619     <!-- Document is listed in both local metadoc.xml and English one, compare version numbers -->
1620     <xsl:variable name="pfile" select="$pmetadoc/metadoc/files/file[@id=$fileid]"/>
1621 neysx 1.224
1622     <xsl:variable name="orig-struct" xmlns="">
1623     <xsl:call-template name="build-doc-struct">
1624     <xsl:with-param name="doc" select="document($pfile)"/>
1625     </xsl:call-template>
1626     </xsl:variable>
1627    
1628 neysx 1.165 <xsl:variable name="versions">
1629     <xsl:call-template name="compare-versions">
1630 neysx 1.224 <xsl:with-param name="translation" select ="exslt:node-set($doc-struct)"/>
1631     <xsl:with-param name="original" select ="exslt:node-set($orig-struct)"/>
1632 neysx 1.165 </xsl:call-template>
1633     </xsl:variable>
1634 neysx 1.224
1635 neysx 1.222 <xsl:choose>
1636 neysx 1.224 <xsl:when test="$versions = 'Different'">
1637 neysx 1.222 <xsl:variable name="pdocdate">
1638     <xsl:call-template name="maxdate">
1639 neysx 1.224 <xsl:with-param name="thedoc" select="exslt:node-set($orig-struct)"/>
1640 neysx 1.222 </xsl:call-template>
1641     </xsl:variable>
1642     <xsl:variable name="res">
1643     <xsl:apply-templates select="func:gettext('Outdated')">
1644     <xsl:with-param name="docdate" select="$pdocdate"/>
1645     <xsl:with-param name="paramlink" select="$pfile"/>
1646     </xsl:apply-templates>
1647     </xsl:variable>
1648     <xsl:copy-of select="$res"/>
1649     </xsl:when>
1650 neysx 1.224 <xsl:when test="contains($versions,'NoOriginal')">
1651     <xsl:value-of select="func:gettext('NoOriginal')"/>
1652     </xsl:when>
1653 neysx 1.222 </xsl:choose>
1654 neysx 1.165 </xsl:otherwise>
1655     </xsl:choose>
1656     </xsl:otherwise>
1657     </xsl:choose>
1658     </xsl:if>
1659     </xsl:template>
1660    
1661     <xsl:template match="docdate">
1662     <xsl:param name="docdate"/>
1663     <xsl:copy-of select="func:format-date($docdate)"/>
1664     </xsl:template>
1665    
1666    
1667 neysx 1.146 <xsl:template name="rhcol">
1668     <!-- Right-hand column with date/authors/ads -->
1669 neysx 1.220
1670     <xsl:variable name="images">
1671     <!-- Source images from www.gentoo.org when on another server to
1672     prevent missing images after an update -->
1673     <xsl:choose>
1674     <xsl:when test="$httphost != 'www'">http://www.gentoo.org/</xsl:when>
1675     <xsl:otherwise>
1676     <xsl:value-of select="$ROOT"/>
1677     </xsl:otherwise>
1678     </xsl:choose>
1679     </xsl:variable>
1680    
1681 neysx 1.146 <table border="0" cellspacing="4px" cellpadding="4px">
1682     <!-- Add a "printer-friendly" button when link attribute exists -->
1683 neysx 1.186 <xsl:if test="/book or /guide">
1684 neysx 1.146 <tr>
1685     <td class="topsep" align="center">
1686     <p class="altmenu">
1687 neysx 1.161 <xsl:variable name="PrintTip"><xsl:value-of select="func:gettext('PrintTip')"/></xsl:variable>
1688     <xsl:variable name="href">
1689     <xsl:choose>
1690     <xsl:when test="/book and $full != 0">
1691 neysx 1.186 <xsl:value-of select="concat($link, '?full=1&amp;style=printable')"/>
1692 neysx 1.161 </xsl:when>
1693     <xsl:when test="/book">
1694 neysx 1.186 <xsl:value-of select="concat($link, '?style=printable')"/>
1695 neysx 1.161 <xsl:if test="$part != '0'">&amp;part=<xsl:value-of select="$part"/></xsl:if>
1696     <xsl:if test="$chap != '0'">&amp;chap=<xsl:value-of select="$chap"/></xsl:if>
1697     </xsl:when>
1698     <xsl:when test="/guide">
1699 neysx 1.186 <xsl:value-of select="concat($link, '?style=printable')"/>
1700 neysx 1.161 </xsl:when>
1701     </xsl:choose>
1702     </xsl:variable>
1703     <a title="{$PrintTip}" class="altlink" href="{$href}"><xsl:value-of select="func:gettext('Print')"/></a>
1704 neysx 1.146 </p>
1705     </td>
1706     </tr>
1707     </xsl:if>
1708 neysx 1.197 <xsl:if test="/book/date or /guide/date or /sections/date or /mainpage/date or /news/date">
1709     <tr>
1710     <td class="topsep">
1711     <!-- Test for RTL languages -->
1712     <xsl:choose>
1713 neysx 1.208 <xsl:when test="$RTL='Y'">
1714 neysx 1.197 <xsl:attribute name="dir">RTL</xsl:attribute>
1715     </xsl:when>
1716     <xsl:otherwise>
1717     <xsl:attribute name="align">center</xsl:attribute>
1718     </xsl:otherwise>
1719     </xsl:choose>
1720    
1721     <p class="alttext">
1722     <xsl:call-template name="contentdate"/>
1723     </p>
1724     </td>
1725     </tr>
1726 neysx 1.202 <xsl:if test="/book/date or /guide/date or /sections/date or /mainpage/date">
1727 neysx 1.165 <xsl:variable name="outdated">
1728     <xsl:call-template name="outdated-translation"/>
1729     </xsl:variable>
1730     <xsl:if test="string-length($outdated) &gt; 1">
1731     <tr>
1732 neysx 1.197 <td class="topsep">
1733     <!-- Test for RTL languages -->
1734     <xsl:choose>
1735 neysx 1.208 <xsl:when test="$RTL='Y'">
1736 neysx 1.197 <xsl:attribute name="dir">RTL</xsl:attribute>
1737     </xsl:when>
1738     <xsl:otherwise>
1739     <xsl:attribute name="align">left</xsl:attribute>
1740     </xsl:otherwise>
1741     </xsl:choose>
1742    
1743 neysx 1.165 <p class="alttext">
1744 neysx 1.212 <b><xsl:copy-of select="$outdated"/></b>
1745 neysx 1.165 </p>
1746     </td>
1747     </tr>
1748     </xsl:if>
1749 neysx 1.197 </xsl:if>
1750     </xsl:if>
1751 neysx 1.187 <xsl:if test="abstract or document(include/@href)/*[1]/abstract">
1752 neysx 1.146 <tr>
1753 neysx 1.197 <td class="topsep">
1754     <!-- Test for RTL languages -->
1755     <xsl:choose>
1756 neysx 1.208 <xsl:when test="$RTL='Y'">
1757 neysx 1.197 <xsl:attribute name="dir">RTL</xsl:attribute>
1758     </xsl:when>
1759     <xsl:otherwise>
1760     <xsl:attribute name="align">left</xsl:attribute>
1761     </xsl:otherwise>
1762     </xsl:choose>
1763    
1764 neysx 1.146 <p class="alttext">
1765     <!-- Abstract (summary) of the document -->
1766     <b><xsl:value-of select="func:gettext('Summary')"/>: </b>
1767 neysx 1.187 <xsl:choose>
1768     <xsl:when test="abstract">
1769     <xsl:value-of select="abstract" />
1770     </xsl:when>
1771     <xsl:otherwise>
1772     <xsl:value-of select="document(include/@href)/*[1]/abstract" />
1773     </xsl:otherwise>
1774     </xsl:choose>
1775 neysx 1.146 </p>
1776     </td>
1777     </tr>
1778     </xsl:if>
1779     <xsl:if test="/book/author or /guide/author">
1780     <tr>
1781 neysx 1.166 <td align="left" class="topsep">
1782 neysx 1.146 <p class="alttext">
1783     <!-- Authors -->
1784     <xsl:apply-templates select="/guide/author|/book/author"/>
1785     </p>
1786     </td>
1787     </tr>
1788     </xsl:if>
1789    
1790 neysx 1.149 <tr lang="en">
1791 neysx 1.146 <td align="center" class="topsep">
1792     <p class="alttext">
1793     <b>Donate</b> to support our development efforts.
1794     </p>
1795    
1796     <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
1797     <input type="hidden" name="cmd" value="_xclick"/>
1798     <input type="hidden" name="business" value="paypal@gentoo.org"/>
1799     <input type="hidden" name="item_name" value="Gentoo Linux Support"/>
1800     <input type="hidden" name="item_number" value="1000"/>
1801     <input type="hidden" name="image_url" value="/images/paypal.png"/>
1802     <input type="hidden" name="no_shipping" value="1"/>
1803     <input type="hidden" name="return" value="http://www.gentoo.org"/>
1804     <input type="hidden" name="cancel_return" value="http://www.gentoo.org"/>
1805    
1806 neysx 1.174 <input type="image" src="http://images.paypal.com/images/x-click-but21.gif" name="submit" alt="Donate to Gentoo"/>
1807 neysx 1.146 </form>
1808     </td>
1809     </tr>
1810 neysx 1.149 <tr lang="en">
1811     <td align="center" class="topsep">
1812     <a href="http://www.vr.org">
1813 neysx 1.220 <img src="{concat($images,'images/vr-ad.png')}" width="125" height="144" alt="Gentoo Centric Hosting: vr.org" border="0"/>
1814 neysx 1.146 </a>
1815 neysx 1.149 <p class="alttext">
1816     <a href="http://www.vr.org/">VR Hosted</a>
1817     </p>
1818     </td>
1819 neysx 1.146 </tr>
1820 neysx 1.149 <tr lang="en">
1821     <td align="center" class="topsep">
1822 swift 1.148 <a href="http://www.tek.net" target="_top">
1823 neysx 1.220 <img src="{concat($images,'images/tek-gentoo.gif')}" width="125" height="125" alt="Tek Alchemy" border="0"/>
1824 neysx 1.146 </a>
1825 swift 1.148 <p class="alttext">
1826     <a href="http://www.tek.net/">Tek Alchemy</a>
1827     </p>
1828 neysx 1.149 </td>
1829 neysx 1.146 </tr>
1830 neysx 1.149 <tr lang="en">
1831 neysx 1.146 <td align="center" class="topsep">
1832     <a href="http://www.sevenl.net" target="_top">
1833 neysx 1.220 <img src="{concat($images,'images/sponsors/sevenl.gif')}" width="125" height="144" alt="SevenL.net" border="0"/>
1834 neysx 1.146 </a>
1835     <p class="alttext">
1836 swift 1.148 <a href="http://www.sevenl.net/">SevenL.net</a>
1837 neysx 1.146 </p>
1838     </td>
1839     </tr>
1840 neysx 1.149 <tr lang="en">
1841     <td align="center" class="topsep">
1842 solar 1.216 <a href="http://www.gni.com" target="_top">
1843 neysx 1.220 <img src="{concat($images,'images/gni_logo.png')}" width="125" alt="Global Netoptex Inc." border="0"/>
1844 swift 1.148 </a>
1845     <p class="alttext">
1846 solar 1.216 <a href="http://www.gni.com">Global Netoptex Inc.</a>
1847 swift 1.148 </p>
1848 neysx 1.149 </td>
1849     </tr>
1850 neysx 1.146 <tr>
1851     <td align="center" class="topsep"/>
1852     </tr>
1853     </table>
1854     </xsl:template>
1855    
1856 neysx 1.154 <xsl:template name="newscontent">
1857     <xsl:param name="thenews"/>
1858     <xsl:param name="summary"/>
1859     <xsl:param name="link"/>
1860    
1861     <div class="news">
1862     <p class="newshead" lang="en">
1863     <b><xsl:value-of select="$thenews/title"/></b>
1864     <br/>
1865     <font size="0.90em">
1866 neysx 1.164 Posted on <xsl:copy-of select="func:format-date($thenews/date)"/>
1867 neysx 1.225 <xsl:variable name="poster">
1868     <xsl:call-template name="smart-mail">
1869     <xsl:with-param name="mail" select="$thenews/poster"/>
1870     </xsl:call-template>
1871     </xsl:variable>
1872     by <xsl:value-of select="$poster"/>
1873 neysx 1.154 </font>
1874     </p>
1875    
1876     <xsl:choose>
1877     <xsl:when test="$thenews/@category='alpha'">
1878     <img class="newsicon" src="/images/icon-alpha.gif" alt="AlphaServer GS160"/>
1879     </xsl:when>
1880     <xsl:when test="$thenews/@category='kde'">
1881     <img class="newsicon" src="/images/icon-kde.png" alt="KDE"/>
1882     </xsl:when>
1883     <xsl:when test="$thenews/@category='gentoo'">
1884     <img class="newsicon" src="/images/icon-gentoo.png" alt="gentoo"/>
1885     </xsl:when>
1886     <xsl:when test="$thenews/@category='main'">
1887     <img class="newsicon" src="/images/icon-stick.png" alt="stick man"/>
1888     </xsl:when>
1889     <xsl:when test="$thenews/@category='ibm'">
1890     <img class="newsicon" src="/images/icon-ibm.gif" alt="ibm"/>
1891     </xsl:when>
1892     <xsl:when test="$thenews/@category='linux'">
1893     <img class="newsicon" src="/images/icon-penguin.png" alt="tux"/>
1894     </xsl:when>
1895     <xsl:when test="$thenews/@category='moo'">
1896     <img class="newsicon" src="/images/icon-cow.png" alt="Larry the Cow"/>
1897     </xsl:when>
1898     <xsl:when test="$thenews/@category='plans'">
1899     <img class="newsicon" src="/images/icon-clock.png" alt="Clock"/>
1900     </xsl:when>
1901     <xsl:when test="$thenews/@category='nvidia'">
1902     <img class="newsicon" src="/images/icon-nvidia.png" alt="Nvidia"/>
1903     </xsl:when>
1904     <xsl:when test="$thenews/@category='freescale'">
1905     <img class="newsicon" src="/images/icon-freescale.gif" alt="Freescale Semiconductor"/>
1906     </xsl:when>
1907     </xsl:choose>
1908    
1909     <div class="newsitem">
1910     <xsl:choose>
1911     <xsl:when test="$thenews/summary and $summary='yes'">
1912     <xsl:apply-templates select="$thenews/summary"/>
1913     <br/>
1914     <a href="{$link}"><b>(full story)</b></a>
1915     </xsl:when>
1916     <xsl:when test="$thenews/body">
1917     <xsl:apply-templates select="$thenews/body"/>
1918     </xsl:when>
1919     </xsl:choose>
1920     </div>
1921     </div>
1922     </xsl:template>
1923    
1924 drobbins 1.1 </xsl:stylesheet>

  ViewVC Help
Powered by ViewVC 1.1.20