Gentoo Archives: gentoo-commits

From: "Xavier Neys (neysx)" <neysx@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in xml/htdocs/xsl: guide2.xsl menu.xml menu.xsl
Date: Wed, 31 Dec 2008 16:17:47
Message-Id: E1LI3lP-0002nM-U4@stork.gentoo.org
1 neysx 08/12/31 16:17:43
2
3 Modified: guide2.xsl
4 Added: menu.xml menu.xsl
5 Log:
6 Reorganised menu from #252157 taken out of guide.xsl into its own xml/xsl
7
8 Revision Changes Path
9 1.40 xml/htdocs/xsl/guide2.xsl
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/guide2.xsl?rev=1.40&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/guide2.xsl?rev=1.40&content-type=text/plain
13 diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/guide2.xsl?r1=1.39&r2=1.40
14
15 Index: guide2.xsl
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/guide2.xsl,v
18 retrieving revision 1.39
19 retrieving revision 1.40
20 diff -u -r1.39 -r1.40
21 --- guide2.xsl 23 Nov 2008 09:04:46 -0000 1.39
22 +++ guide2.xsl 31 Dec 2008 16:17:43 -0000 1.40
23 @@ -5,7 +5,7 @@
24 xmlns:dyn="http://exslt.org/dynamic"
25 xmlns:str="http://exslt.org/strings"
26
27 - xmlns:feed="http://www.w3.org/2005/Atom"
28 + xmlns:feed="http://www.w3.org/2005/Atom"
29
30 xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
31 exclude-result-prefixes="opensearch feed"
32 @@ -25,6 +25,8 @@
33
34 <xsl:include href="/xsl/mail.xsl" />
35
36 +<xsl:include href="/xsl/menu.xsl" />
37 +
38 <xsl:include href="/xsl/devmap.xsl" />
39
40 <xsl:include href="/xsl/doc-struct.xsl" />
41 @@ -153,7 +155,7 @@
42 <link rel="search" type="application/opensearchdescription+xml" href="http://www.gentoo.org/search/bugs-gentoo-org.xml" title="Gentoo Bugzilla"/>
43 <link rel="search" type="application/opensearchdescription+xml" href="http://www.gentoo.org/search/packages-gentoo-org.xml" title="Gentoo Packages"/>
44 <link rel="search" type="application/opensearchdescription+xml" href="http://www.gentoo.org/search/archives-gentoo-org.xml" title="Gentoo List Archives"/>
45 -
46 +
47 <xsl:if test="//glsaindex or //glsa-latest">
48 <link rel="alternate" type="application/rss+xml">
49 <xsl:attribute name="href">
50 @@ -174,7 +176,7 @@
51 <!-- Redirect using http header when supported -->
52 <xsl:value-of select="concat('%%GORG%%Redirect=',/*[1]/@redirect)"/>
53 </xsl:message>
54 - </xsl:if>
55 + </xsl:if>
56
57 <title>
58 <xsl:choose>
59 @@ -285,7 +287,7 @@
60 <link rel="search" type="application/opensearchdescription+xml" href="http://www.gentoo.org/search/bugs-gentoo-org.xml" title="Gentoo Bugzilla"/>
61 <link rel="search" type="application/opensearchdescription+xml" href="http://www.gentoo.org/search/packages-gentoo-org.xml" title="Gentoo Packages"/>
62 <link rel="search" type="application/opensearchdescription+xml" href="http://www.gentoo.org/search/archives-gentoo-org.xml" title="Gentoo List Archives"/>
63 -
64 +
65 <xsl:if test="/*[1][@redirect]">
66 <!-- Immediate HTML refresh in case redirect is not supported -->
67 <meta http-equiv="Refresh">
68 @@ -295,7 +297,7 @@
69 <!-- Redirect using http header when supported -->
70 <xsl:value-of select="concat('%%GORG%%Redirect=',/*[1]/@redirect)"/>
71 </xsl:message>
72 - </xsl:if>
73 + </xsl:if>
74
75 <xsl:if test="/mainpage/newsitems">
76 <link rel="alternate" type="application/rss+xml" title="Gentoo Linux News RDF" href="http://www.gentoo.org/rdf/en/gentoo-news.rdf" />
77 @@ -324,7 +326,7 @@
78 <xsl:variable name="newscript" select="str:replace($devmap-js, 'X-PLACEHOLDER', string($selectdev))"/>
79 <script type="text/javascript">//<xsl:comment><xsl:value-of select="$newscript"/>//</xsl:comment></script>
80 </xsl:if>
81 -
82 +
83 </head>
84 <body style="margin:0px;" bgcolor="#000000">
85
86 @@ -334,8 +336,6 @@
87 </xsl:if>
88
89 <table border="0" width="100%" cellspacing="0" cellpadding="0">
90 - <xsl:variable name="tpath" select="str:replace($link, str:replace(concat('/',$glang,'/'),'//','/en/'), '/**/')"/>
91 - <xsl:variable name="isEnglish"><xsl:if test="string-length($glang)=0 or $glang='en'">Y</xsl:if></xsl:variable>
92 <xsl:variable name="www"><xsl:if test="$httphost!='www'">http://www.gentoo.org</xsl:if></xsl:variable>
93 <tr>
94 <td valign="top" height="125" width="1%" bgcolor="#45347b">
95 @@ -344,111 +344,7 @@
96 <!-- Top bar menu -->
97 <td valign="bottom" align="left" bgcolor="#000000" colspan="2" lang="en">
98 <p class="menu">
99 - <a class="menulink" href="{concat($www,'/main/en/about.xml')}">
100 - <xsl:choose>
101 - <xsl:when test="$tpath='/main/**/about.xml'">
102 - <xsl:attribute name="class">highlight</xsl:attribute>
103 - <xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute>
104 - </xsl:when>
105 - <xsl:when test="not($isEnglish='Y' or document(concat('/main/', $glang, '/about.xml'))/missing)">
106 - <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/about.xml')"/></xsl:attribute>
107 - </xsl:when>
108 - </xsl:choose>
109 - About</a>
110 - |
111 - <a class="menulink" href="{concat($www,'/proj/en/index.xml')}">
112 - <xsl:if test="starts-with($tpath, '/proj/**/')">
113 - <xsl:attribute name="class">highlight</xsl:attribute>
114 - </xsl:if>
115 - Projects</a>
116 - |
117 - <a class="menulink" href="{concat($www,'/doc/en/index.xml')}">
118 - <xsl:choose>
119 - <xsl:when test="starts-with($tpath, '/doc/**/')">
120 - <xsl:attribute name="class">highlight</xsl:attribute>
121 - <xsl:attribute name="href"><xsl:value-of select="str:replace(concat('/doc/',$glang,'/'), '//','/en/')"/></xsl:attribute>
122 - </xsl:when>
123 - <xsl:when test="not($isEnglish='Y' or document(concat('/doc/', $glang, '/index.xml'))/missing)">
124 - <xsl:attribute name="href"><xsl:value-of select="concat('/doc/',$glang,'/index.xml')"/></xsl:attribute>
125 - </xsl:when>
126 - </xsl:choose>
127 - Docs</a>
128 - | <a class="menulink" href="http://forums.gentoo.org">Forums</a>
129 - |
130 - <a class="menulink" href="{concat($www,'/main/en/lists.xml')}">
131 - <xsl:choose>
132 - <xsl:when test="$tpath='/main/**/lists.xml'">
133 - <xsl:attribute name="class">highlight</xsl:attribute>
134 - <xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute>
135 - </xsl:when>
136 - <xsl:when test="not($isEnglish='Y' or document(concat('/main/', $glang, '/lists.xml'))/missing)">
137 - <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/lists.xml')"/></xsl:attribute>
138 - </xsl:when>
139 - </xsl:choose>
140 - Lists</a>
141 - | <a class="menulink" href="http://bugs.gentoo.org">Bugs</a>
142 - | <a class="menulink" href="http://www.cafepress.com/officialgentoo/">Store</a>
143 - |
144 - <a class="menulink" href="{concat($www,'/news/en/gmn/')}">
145 - <xsl:choose>
146 - <xsl:when test="starts-with($tpath, '/news/**/gmn/')">
147 - <xsl:attribute name="class">highlight</xsl:attribute>
148 - <xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute>
149 - </xsl:when>
150 - <xsl:when test="not($isEnglish='Y' or document(concat('/news/', $glang, '/gmn/index.xml'))/missing)">
151 - <xsl:attribute name="href"><xsl:value-of select="concat('/news/',$glang,'/gmn/index.xml')"/></xsl:attribute>
152 - </xsl:when>
153 - </xsl:choose>
154 - GMN</a>
155 - |
156 - <a class="menulink" href="{concat($www,'/main/en/where.xml')}">
157 - <xsl:choose>
158 - <xsl:when test="$tpath='/main/**/where.xml'">
159 - <xsl:attribute name="class">highlight</xsl:attribute>
160 - <xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute>
161 - </xsl:when>
162 - <xsl:when test="not($isEnglish='Y' or document(concat('/main/', $glang, '/where.xml'))/missing)">
163 - <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/where.xml')"/></xsl:attribute>
164 - </xsl:when>
165 - </xsl:choose>
166 - Get Gentoo!</a>
167 - |
168 - <a class="menulink" href="{concat($www,'/main/en/support.xml')}">
169 - <xsl:choose>
170 - <xsl:when test="$tpath='/main/**/support.xml'">
171 - <xsl:attribute name="class">highlight</xsl:attribute>
172 - <xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute>
173 - </xsl:when>
174 - <xsl:when test="not($isEnglish='Y' or document(concat('/main/', $glang, '/support.xml'))/missing)">
175 - <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/support.xml')"/></xsl:attribute>
176 - </xsl:when>
177 - </xsl:choose>
178 - Support</a>
179 - |
180 - <a class="menulink" href="{concat($www,'/main/en/sponsors.xml')}">
181 - <xsl:choose>
182 - <xsl:when test="$tpath='/main/**/sponsors.xml'">
183 - <xsl:attribute name="class">highlight</xsl:attribute>
184 - <xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute>
185 - </xsl:when>
186 - <xsl:when test="not($isEnglish='Y' or document(concat('/main/', $glang, '/sponsors.xml'))/missing)">
187 - <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/sponsors.xml')"/></xsl:attribute>
188 - </xsl:when>
189 - </xsl:choose>
190 - Sponsors</a>
191 - | <a class="menulink" href="http://planet.gentoo.org">Planet</a>
192 - |
193 - <a class="menulink" href="{concat($www,'/main/en/contact.xml')}">
194 - <xsl:choose>
195 - <xsl:when test="$tpath='/main/**/contact.xml'">
196 - <xsl:attribute name="class">highlight</xsl:attribute>
197 - <xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute>
198 - </xsl:when>
199 - <xsl:when test="not($isEnglish='Y' or document(concat('/main/', $glang, '/contact.xml'))/missing)">
200 - <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/contact.xml')"/></xsl:attribute>
201 - </xsl:when>
202 - </xsl:choose>
203 - Contact</a>
204 + <xsl:apply-templates select="document('/xsl/menu.xml')//group[@top='Y']"/>
205 </p>
206 </td>
207 </tr>
208 @@ -467,119 +363,9 @@
209 <tr>
210 <td valign="top" class="leftmenu" lang="en">
211 <p class="altmenu">
212 - Installation:
213 - <br/>
214 - <a class="altlink" href="{concat($www,'/doc/en/handbook/index.xml')}">
215 - <xsl:if test="not($isEnglish='Y' or document(concat('/doc/', $glang, '/handbook/index.xml'))/missing)">
216 - <xsl:attribute name="href"><xsl:value-of select="concat('/doc/',$glang,'/handbook/index.xml')"/></xsl:attribute>
217 - </xsl:if>
218 - <xsl:text>Gentoo&#xA0;Handbook</xsl:text></a>
219 - <br/>
220 - <a class="altlink" href="{concat($www,'/doc/en/index.xml?catid=install#doc_chap2')}">
221 - <xsl:if test="not($isEnglish='Y' or document(concat('/doc/', $glang, '/index.xml'))/missing)">
222 - <xsl:attribute name="href"><xsl:value-of select="concat('/doc/',$glang,'/index.xml?catid=install#doc_chap2')"/></xsl:attribute>
223 - </xsl:if>
224 - <xsl:text>Installation&#xA0;Docs</xsl:text></a>
225 - <br/><br/>
226 - Documentation:
227 - <br/>
228 - <a class="altlink" href="{concat($www,'/doc/en/index.xml')}">
229 - <xsl:if test="not($isEnglish='Y' or document(concat('/doc/', $glang, '/index.xml'))/missing)">
230 - <xsl:attribute name="href"><xsl:value-of select="concat('/doc/',$glang,'/index.xml')"/></xsl:attribute>
231 - </xsl:if>
232 - <xsl:text>Home</xsl:text></a>
233 - <br/>
234 - <a class="altlink" href="{concat($www,'/doc/en/list.xml')}">
235 - <xsl:if test="not($isEnglish='Y' or document(concat('/doc/', $glang, '/list.xml'))/missing)">
236 - <xsl:attribute name="href"><xsl:value-of select="concat('/doc/',$glang,'/list.xml')"/></xsl:attribute>
237 - </xsl:if>
238 - <xsl:text>Listing</xsl:text></a>
239 - <br/>
240 - <a class="altlink" href="{concat($www,'/main/en/about.xml')}">
241 - <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/about.xml'))/missing)">
242 - <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/about.xml')"/></xsl:attribute>
243 - </xsl:if>
244 - <xsl:text>About&#xA0;Gentoo</xsl:text></a>
245 - <br/>
246 - <a class="altlink" href="{concat($www,'/main/en/philosophy.xml')}">
247 - <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/philosophy.xml'))/missing)">
248 - <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/philosophy.xml')"/></xsl:attribute>
249 - </xsl:if>
250 - <xsl:text>Philosophy</xsl:text></a>
251 - <br/>
252 - <a class="altlink" href="{concat($www,'/main/en/contract.xml')}">
253 - <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/contract.xml'))/missing)">
254 - <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/contract.xml')"/></xsl:attribute>
255 - </xsl:if>
256 - <xsl:text>Social&#xA0;Contract</xsl:text></a>
257 - <br/><br/>
258 - Resources:
259 - <br/>
260 - <a class="altlink" href="http://bugs.gentoo.org">Bug&#xA0;Tracker</a>
261 - <br/>
262 - <a class="altlink" href="{concat($www,'/proj/en/devrel/roll-call/userinfo.xml')}">Developer&#xA0;List</a>
263 - <br/>
264 - <a class="altlink" href="http://forums.gentoo.org">Discussion&#xA0;Forums</a>
265 - <br/>
266 - <a class="altlink" href="http://torrents.gentoo.org/">Gentoo&#xA0;BitTorrents</a>
267 - <br/>
268 - <a class="altlink" href="{concat($www,'/proj/en/glep/')}">Gentoo&#xA0;Linux Enhancement Proposals</a>
269 - <br/>
270 - <a class="altlink" href="{concat($www,'/main/en/irc.xml')}">
271 - <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/irc.xml'))/missing)">
272 - <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/irc.xml')"/></xsl:attribute>
273 - </xsl:if>
274 - <xsl:text>IRC&#xA0;Channels</xsl:text></a>
275 - <br/>
276 - <a class="altlink" href="{concat($www,'/main/en/lists.xml')}">
277 - <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/lists.xml'))/missing)">
278 - <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/lists.xml')"/></xsl:attribute>
279 - </xsl:if>
280 - <xsl:text>Mailing&#xA0;Lists</xsl:text></a>
281 - <br/>
282 - <a class="altlink" href="{concat($www,'/main/en/mirrors.xml')}">
283 - <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/mirrors.xml'))/missing)">
284 - <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/mirrors.xml')"/></xsl:attribute>
285 - </xsl:if>
286 - <xsl:text>Mirrors</xsl:text></a>
287 - <br/>
288 - <a class="altlink" href="{concat($www,'/main/en/name-logo.xml')}">
289 - <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/name-logo.xml'))/missing)">
290 - <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/name-logo.xml')"/></xsl:attribute>
291 - </xsl:if>
292 - <xsl:text>Name and Logo Guidelines</xsl:text></a>
293 - <br/>
294 - <a class="altlink" href="http://packages.gentoo.org/">Online Package Database</a>
295 - <br/>
296 - <a class="altlink" href="{concat($www,'/security/en/index.xml')}">Security Announcements</a>
297 - <br/>
298 - <a class="altlink" href="{concat($www,'/proj/en/devrel/staffing-needs/')}">Staffing&#xA0;Needs</a>
299 - <br/>
300 - <a class="altlink" href="http://vendors.gentoo.org/">Supporting&#xA0;Vendors</a>
301 - <br/>
302 - <a class="altlink" href="http://sources.gentoo.org/">View&#xA0;our&#xA0;Sources</a>
303 - <br/><br/>
304 - Graphics:
305 - <br/>
306 - <a class="altlink" href="{concat($www,'/main/en/graphics.xml')}">
307 - <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/graphics.xml'))/missing)">
308 - <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/graphics.xml')"/></xsl:attribute>
309 - </xsl:if>
310 - <xsl:text>Logos and themes</xsl:text></a>
311 - <br/>
312 - <a class="altlink" href="{concat($www,'/main/en/shots.xml')}">
313 - <xsl:if test="not($isEnglish='Y' or document(concat('/main/', $glang, '/shots.xml'))/missing)">
314 - <xsl:attribute name="href"><xsl:value-of select="concat('/main/',$glang,'/shots.xml')"/></xsl:attribute>
315 - </xsl:if>
316 - <xsl:text>ScreenShots</xsl:text></a>
317 - <br/><br/>
318 - Miscellaneous Resources:
319 - <br/>
320 - <a class="altlink" href="http://www.cafepress.com/officialgentoo/">Gentoo Linux Store</a>
321 - <br/>
322 - <a class="altlink" href="{concat($www,'/doc/en/articles/')}">IBM dW/Intel article archive</a>
323 + <xsl:apply-templates select="document('/xsl/menu.xml')//group[@top='N']"/>
324 </p>
325 - <br/><br />
326 + <br/><br/>
327 </td>
328 </tr>
329 </table>
330 @@ -605,15 +391,6 @@
331 To learn more, read our <b><a href="/main/en/about.xml">about
332 page</a></b>.</span>
333 </p>
334 -<!--
335 - <xsl:for-each select="document('/dyn/news-index.xml')/uris/uri[position()&lt;=$newsitemcount]/text()">
336 - <xsl:call-template name="newscontent">
337 - <xsl:with-param name="thenews" select="document(.)/news"/>
338 - <xsl:with-param name="summary" select="'yes'"/>
339 - <xsl:with-param name="link" select="."/>
340 - </xsl:call-template>
341 - </xsl:for-each>
342 --->
343
344 <xsl:variable name="GLSAs" select="document('/dyn/glsa-index2.xml')"/>
345 <xsl:variable name="new-packages" select="document('/dyn/new-packages.xml')"/>
346 @@ -734,7 +511,7 @@
347 </xsl:variable>
348
349 <!-- Display news items -->
350 -
351 +
352 <xsl:for-each select="exslt:node-set($all-news0)/news/newsitem">
353 <xsl:sort select="@date" order="descending"/>
354
355 @@ -776,7 +553,7 @@
356 <xsl:for-each select="$planet//item[substring(pubDate,1,16)=$pubDate and not(contains(link, 'http://www.gentoo.org/news'))]">
357 <tr>
358 <xsl:choose>
359 - <xsl:when test="contains(title,': ')">
360 + <xsl:when test="contains(title,': ')">
361 <ti><xsl:value-of select="substring-before(title,': ')"/></ti>
362 <ti><uri link="{link}"><xsl:value-of select="substring-after(title,': ')"/></uri></ti>
363 </xsl:when>
364 @@ -1347,7 +1124,7 @@
365 </xsl:otherwise>
366 </xsl:choose>
367 </xsl:variable>
368 -
369 +
370 <a name="{$preid}"/>
371 <table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0">
372 <tr>
373 @@ -1799,10 +1576,10 @@
374
375 <xsl:template name="maxdate">
376 <xsl:param name="thedoc"/>
377 - <xsl:for-each select="$thedoc//date">
378 + <xsl:for-each select="$thedoc//date">
379 <xsl:sort select="." order="descending" />
380 <xsl:if test="position()=1"><xsl:value-of select="."/></xsl:if>
381 - </xsl:for-each>
382 + </xsl:for-each>
383 </xsl:template>
384
385 <xsl:template name="contentdate">
386 @@ -1811,7 +1588,7 @@
387 <xsl:with-param name="thedoc" select="exslt:node-set($doc-struct)"/>
388 </xsl:call-template>
389 </xsl:variable>
390 -
391 +
392 <xsl:choose>
393 <xsl:when test="func:gettext('Updated')/docdate">
394 <xsl:apply-templates select="func:gettext('Updated')">
395 @@ -2133,7 +1910,7 @@
396 <font size="0.90em">
397 <xsl:choose>
398 <xsl:when test="$thenews/until">
399 - Posted between <xsl:copy-of select="func:format-date($thenews/date)"/> and <xsl:copy-of select="func:format-date($thenews/until)"/>
400 + Posted between <xsl:copy-of select="func:format-date($thenews/date)"/> and <xsl:copy-of select="func:format-date($thenews/until)"/>
401 </xsl:when>
402 <xsl:otherwise>
403 Posted on <xsl:copy-of select="func:format-date($thenews/date)"/>
404 @@ -2147,7 +1924,7 @@
405 by <xsl:value-of select="$poster"/>
406 </font>
407 </p>
408 -
409 +
410 <xsl:choose>
411 <xsl:when test="$thenews/@category='alpha'">
412 <img class="newsicon" src="/images/icon-alpha.gif" alt="AlphaServer GS160"/>
413 @@ -2183,7 +1960,7 @@
414 <img class="newsicon" src="/images/G-Earth.jpg" alt="Planet Earth"/>
415 </xsl:when>
416 </xsl:choose>
417 -
418 +
419 <div class="newsitem">
420 <xsl:choose>
421 <xsl:when test="$thenews/summary and $summary='yes'">
422
423
424
425 1.1 xml/htdocs/xsl/menu.xml
426
427 file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/menu.xml?rev=1.1&view=markup
428 plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/menu.xml?rev=1.1&content-type=text/plain
429
430 Index: menu.xml
431 ===================================================================
432 <?xml version='1.0' encoding='UTF-8'?>
433 <!DOCTYPE menu [
434 <!ELEMENT menu (group+)>
435 <!ELEMENT group (item+)>
436 <!ATTLIST group top (Y|N) 'N'
437 title CDATA #IMPLIED>
438 <!ELEMENT item EMPTY>
439 <!ATTLIST item href CDATA #REQUIRED
440 label CDATA #REQUIRED
441 param CDATA #IMPLIED>
442 ]>
443
444 <menu>
445
446 <group top='Y'>
447 <item href="/main/en/about.xml" label="About"/>
448 <item href="/proj/en/" label="Projects"/>
449 <item href="/doc/en/" label="Docs"/>
450 <item href="http://forums.gentoo.org/" label="Forums"/>
451 <item href="/main/en/lists.xml" label="Lists"/>
452 <item href="http://bugs.gentoo.org/" label="Bugs"/>
453 <item href="/news/en/gmn/" label="GMN"/>
454 <item href="/main/en/where.xml" label="Get Gentoo!"/>
455 <item href="/main/en/support.xml" label="Support"/>
456 <item href="http://planet.gentoo.org/" label="Planet"/>
457 </group>
458
459 <group title="About">
460 <item href="/main/en/about.xml" label="About Gentoo"/>
461 <item href="/main/en/philosophy.xml" label="Philosophy"/>
462 <item href="/main/en/contract.xml" label="Social Contract"/>
463 <item href="/main/en/name-logo.xml" label="Name and Logo Guidelines"/>
464 <item href="/main/en/graphics.xml" label="Logos and themes"/>
465 <item href="/main/en/shots.xml" label="Screenshots"/>
466 </group>
467
468 <group title="News">
469 <item href="/security/en/" label="Security Announcements"/>
470 <item href="/news/en/gmn/" label="Monthly Newsletter"/>
471 </group>
472
473 <group title="Get Started">
474 <item href="/doc/en/handbook/" label="Gentoo Handbook"/>
475 <item href="/doc/en/" label="Installation Docs" param="?catid=install#doc_chap2"/>
476 <item href="/main/en/where.xml" label="Downloads"/>
477 </group>
478
479 <group title="Documentation">
480 <item href="/doc/en/handbook/" label="Gentoo Handbook"/>
481 <item href="/doc/en/list.xml" label="Documentation List" param="?desc=1"/>
482 <item href="/doc/en/articles/" label="IBM dW/Intel article archive"/>
483 </group>
484
485 <group title="Get Gentoo">
486 <item href="/main/en/where.xml" label="Downloads"/>
487 <item href="/main/en/mirrors2.xml" label="Mirrors"/>
488 <item href="http://torrents.gentoo.org/" label="Torrents"/>
489 </group>
490
491 <group title="Community">
492 <item href="http://forums.gentoo.org/" label="Discussion Forums"/>
493 <item href="/main/en/irc.xml" label="IRC Channels"/>
494 <item href="/main/en/lists.xml" label="Mailing Lists"/>
495 <item href="http://bugs.gentoo.org" label="Report Issues"/>
496 <item href="http://planet.gentoo.org" label="Planet (Blogs)"/>
497 <item href="http://packages.gentoo.org/" label="Online Package Database"/>
498 <item href="/main/en/contact.xml" label="Contact Us"/>
499 <item href="http://vendors.gentoo.org/" label="Supporting Vendors"/>
500 <item href="/main/en/sponsors.xml" label="Sponsors"/>
501 </group>
502
503 <group title="Get Involved">
504 <item href="http://bugs.gentoo.org" label="Report Issues"/>
505 <item href="/proj/en/devrel/staffing-needs/" label="Help Wanted"/>
506 <item href="http://forums.gentoo.org/" label="Discussion Forums"/>
507 <item href="/main/en/irc.xml" label="IRC Channels"/>
508 <item href="/main/en/lists.xml" label="Mailing Lists"/>
509 <item href="/proj/en/userrel/adopt-a-dev/" label="Offer Resources"/>
510 <item href="/proj/en/glep/" label="Enhancement Proposals (GLEPs)"/>
511 </group>
512
513 <group title="Other">
514 <item href="/proj/en/devrel/roll-call/userinfo.xml" label="Developer&#xA0;List"/>
515 <item href="/proj/en/devrel/roll-call/devmap.xml" label="Developer&#xA0;Map"/>
516 <item href="http://www.cafepress.com/officialgentoo/" label="Gentoo Store"/>
517 <item href="/proj/en/" label="Projects"/>
518 </group>
519
520 </menu>
521
522
523
524 1.1 xml/htdocs/xsl/menu.xsl
525
526 file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/menu.xsl?rev=1.1&view=markup
527 plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/menu.xsl?rev=1.1&content-type=text/plain
528
529 Index: menu.xsl
530 ===================================================================
531 <?xml version="1.0" encoding="UTF-8"?>
532 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
533 xmlns:exslt="http://exslt.org/common"
534 xmlns:func="http://exslt.org/functions"
535 xmlns:dyn="http://exslt.org/dynamic"
536 xmlns:str="http://exslt.org/strings"
537
538 extension-element-prefixes="exslt func dyn str" >
539
540 <xsl:template match="/menu/group">
541 <xsl:if test="@title and @top='N'">
542 <xsl:value-of select="@title"/><br/>
543 </xsl:if>
544 <xsl:apply-templates/>
545 </xsl:template>
546
547 <xsl:template match="/menu/group/item">
548 <xsl:variable name="www"><xsl:if test="$httphost!='www'">http://www.gentoo.org</xsl:if></xsl:variable>
549
550 <xsl:variable name="href">
551 <xsl:choose>
552 <xsl:when test="not(starts-with(@href, '/'))">
553 <xsl:value-of select="@href"/>
554 </xsl:when>
555 <xsl:when test="string-length($glang)=0 or $glang='en'">
556 <xsl:value-of select="concat($www, @href)"/>
557 </xsl:when>
558 <xsl:when test="(substring(@href,string-length(@href))='/') and not(document(concat(substring-before(@href,'/en/'), '/', $glang, '/', substring-after(@href,'/en/'), 'index.xml'))/missing)">
559 <xsl:value-of select="concat($www, substring-before(@href,'/en/'), '/', $glang, '/', substring-after(@href,'/en/'))"/>
560 </xsl:when>
561 <xsl:when test="not (substring(@href,string-length(@href))='/') and not(document(concat(substring-before(@href,'/en/'), '/', $glang, '/', substring-after(@href,'/en/')))/missing)">
562 <xsl:value-of select="concat($www, substring-before(@href,'/en/'), '/', $glang, '/', substring-after(@href,'/en/'))"/>
563 </xsl:when>
564 <xsl:otherwise>
565 <xsl:value-of select="concat($www, @href)"/>
566 </xsl:otherwise>
567 </xsl:choose>
568 </xsl:variable>
569
570 <xsl:choose>
571 <xsl:when test="../@top='N'">
572 <a class="altlink" href="{concat($href,@param)}"><xsl:value-of select="@label"/></a>
573 <br/><xsl:if test="not(following-sibling::item)"><br/></xsl:if>
574 </xsl:when>
575 <xsl:otherwise>
576 <a class="menulink" href="{concat($href,@param)}">
577 <xsl:if test="starts-with($link, $href)">
578 <xsl:attribute name="class">highlight</xsl:attribute>
579 </xsl:if>
580 <xsl:value-of select="@label"/>
581 </a>
582 <xsl:if test="following-sibling::item"> | </xsl:if>
583 </xsl:otherwise>
584 </xsl:choose>
585 </xsl:template>
586
587 </xsl:stylesheet>