Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[1d7bcd]: main.xsl Maximize Restore History

Download this file

main.xsl    233 lines (219 with data), 11.5 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" method="xml" indent="no" omit-xml-declaration="yes" encoding="utf-8"/>
<xsl:template name="get-string" xmlns="http://www.w3.org/1999/xhtml">
<xsl:param name="id"/>
<xsl:variable name="language" select="/xhtml:html/@xml:lang"/>
<xsl:value-of select="document('i18n.xml')/*/message[@id=$id and @xml:lang=$language]"/>
</xsl:template>
<xsl:template name="get-html" xmlns="http://www.w3.org/1999/xhtml">
<xsl:param name="id"/>
<xsl:variable name="language" select="/xhtml:html/@xml:lang"/>
<xsl:copy-of select="document('i18n.xml')/*/html[@id=$id and @xml:lang=$language]/*"/>
</xsl:template>
<xsl:template name="build-navigation" xmlns="http://www.w3.org/1999/xhtml">
<xsl:param name="current-id"/>
<xsl:variable name="language" select="/xhtml:html/@xml:lang"/>
<xsl:for-each select="document('i18n.xml')/*/link[@xml:lang=$language]">
<xsl:choose>
<xsl:when test="@id = $current-id">
<xsl:choose>
<xsl:when test="position() != last()">
<li class="current">
<span>
<xsl:value-of select="."/>
</span>
</li>
</xsl:when>
<xsl:otherwise>
<li class="current" style="border: none">
<span>
<xsl:value-of select="."/>
</span>
</li>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="position() != last()">
<li>
<a href="{@url}">
<xsl:value-of select="."/>
</a>
</li>
</xsl:when>
<xsl:otherwise>
<li style="border: none">
<a href="{@url}">
<xsl:value-of select="."/>
</a>
</li>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:template>
<xsl:template name="build-lang-navigation" xmlns="http://www.w3.org/1999/xhtml">
<xsl:variable name="language" select="/xhtml:html/@xml:lang"/>
<p class="langnav">
<xsl:for-each select="document('i18n.xml')/*/language[@xml:lang != $language]">
<a href="{@url}" xml:lang="{@xml:lang}">
<xsl:value-of select="."/>
</a>
<xsl:if test="position() != last()">
<xsl:text>&#x00a0;�� </xsl:text>
</xsl:if>
</xsl:for-each>
</p>
</xsl:template>
<xsl:template match="/">
<xsl:comment>This file is authomatically generated with XSLT</xsl:comment>
<xsl:variable name="page-id" select="/xhtml:html/@id"/>
<xsl:variable name="description" select="/xhtml:html/xhtml:head/xhtml:meta[@name='description']/@content"/>
<xsl:variable name="uri" select="/xhtml:html/xhtml:head/xhtml:meta[@name='DC.identifier']/@content"/>
<xsl:variable name="keywords" select="/xhtml:html/xhtml:head/xhtml:meta[@name='keywords']/@content"/>
<xsl:variable name="title" select="/xhtml:html/xhtml:head/xhtml:title"/>
<xsl:variable name="language" select="/xhtml:html/@xml:lang"/>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$language}">
<xsl:variable name="copyright">
<xsl:call-template name="get-string">
<xsl:with-param name="id" select="'copyright'"/>
</xsl:call-template>
</xsl:variable>
<head>
<xsl:variable name="feed-title">
<xsl:call-template name="get-string">
<xsl:with-param name="id" select="'feed-title'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="feed-location">
<xsl:call-template name="get-string">
<xsl:with-param name="id" select="'feed-location'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="al-beshenov">
<xsl:call-template name="get-string">
<xsl:with-param name="id" select="'al-beshenov'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="development-team">
<xsl:call-template name="get-string">
<xsl:with-param name="id" select="'development-team'"/>
</xsl:call-template>
</xsl:variable>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="/main.css"/>
<link href="/i/favicon.png" rel="shortcut icon" media="all"/>
<title>
<xsl:value-of select="$title"/>
<xsl:if test="$page-id != 'index'">
<xsl:text> // Maxima CAS</xsl:text>
</xsl:if>
</title>
<link rel="alternate" type="application/rss+xml" title="{$feed-title}" href="{$feed-location}"/>
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"/>
<link rel="schema.DCTERMS" href="http://purl.org/dc/terms/"/>
<meta name="DC.contributor" content="{$development-team}"/>
<meta name="DC.creator" content="{$al-beshenov}"/>
<xsl:if test="$description">
<meta name="DC.description" content="{$description}"/>
</xsl:if>
<meta name="DC.format" scheme="DCTERMS.IMT" content="text/html"/>
<xsl:if test="$uri">
<meta name="DC.identifier" scheme="DCTERMS.URI" content="{$uri}"/>
</xsl:if>
<meta name="DC.language" scheme="DCTERMS.RFC1766" content="{$language}"/>
<meta name="DC.publisher" content="{$al-beshenov}"/>
<meta name="DC.rights" content="{$copyright}"/>
<xsl:if test="$keywords">
<meta name="DC.subject" content="{$keywords}"/>
</xsl:if>
<meta name="DC.title" content="{$title}"/>
<meta name="DC.type" scheme="DCTERMS.DCMIType" content="Text"/>
<meta name="copyright" content="{$copyright}"/>
<xsl:if test="$description">
<meta name="description" content="{$description}"/>
</xsl:if>
<xsl:if test="$keywords">
<meta name="keywords" content="{$keywords}"/>
</xsl:if>
</head>
<body>
<xsl:call-template name="build-lang-navigation"/>
<xsl:variable name="homelink">
<xsl:choose>
<xsl:when test="$language = 'en'">
<xsl:text>/</xsl:text>
</xsl:when>
<xsl:when test="$language = 'es'">
<xsl:text>/es/</xsl:text>
</xsl:when>
<xsl:when test="$language = 'ru'">
<xsl:text>/ru/</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="$page-id = 'index'">
<h1>
<img src="/i/logo.png" alt="M����" class="mks"/>
<xsl:text> </xsl:text>
<xsl:call-template name="get-string">
<xsl:with-param name="id" select="'maxima-cas'"/>
</xsl:call-template>
</h1>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="main-page">
<xsl:call-template name="get-string">
<xsl:with-param name="id" select="'main-page'"/>
</xsl:call-template>
</xsl:variable>
<h1>
<a href="{$homelink}" title="{$main-page}">
<img src="/i/logo.png" alt="M����" class="mks"/>
</a>
<xsl:text> </xsl:text>
<a href="{$homelink}" title="{$main-page}">
<xsl:call-template name="get-string">
<xsl:with-param name="id" select="'maxima-cas'"/>
</xsl:call-template>
</a>
</h1>
</xsl:otherwise>
</xsl:choose>
<p style="clear: both; padding: 0; margin: 0; font-size: 0"> </p>
<ul class="nav">
<xsl:call-template name="build-navigation">
<xsl:with-param name="current-id" select="$page-id"/>
</xsl:call-template>
<li class="sflink">
<a href="http://sourceforge.net/projects/maxima" title="Project page at SourceForge.net">
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=4933&amp;type=10" alt="Get Maxima -- GPL CAS based on DOE-MACSYMA at SourceForge.net. Fast, secure and Free Open Source software downloads" />
</a>
</li>
</ul>
<div class="body">
<xsl:if test="($page-id != 'index') and $title">
<h2 style="padding-top: 0; margin-top: 0">
<xsl:value-of select="/xhtml:html/xhtml:head/xhtml:title"/>
</h2>
</xsl:if>
<xsl:for-each select="/xhtml:html/xhtml:body/*">
<xsl:copy-of select="."/>
</xsl:for-each>
</div>
<div class="footer">
<!--<p>
<xsl:value-of select="$copyright"/>
</p>-->
<xsl:call-template name="get-html">
<xsl:with-param name="id" select="'contact-webmaster'"/>
</xsl:call-template>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>