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