Diff of /main.xsl [a91d37] .. [7f3afe]  Maximize  Restore

  Switch to side-by-side view

--- a/main.xsl
+++ b/main.xsl
@@ -2,213 +2,293 @@
 
 <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: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="no" encoding="utf-8"/>
+
+    <xsl:template match="/">
+
         <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:variable name="page-id" select="/xhtml:html/@id"/>
+        <xsl:variable name="files-prefix">
             <xsl:choose>
-                <xsl:when test="@id = $current-id">
+                <xsl:when test="$language='en'">
+                    <xsl:text></xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:text>../</xsl:text>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+
+        <xsl:processing-instruction name="xml-stylesheet">href="<xsl:value-of select="$files-prefix" />main.css" type="text/css"</xsl:processing-instruction>
+
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$language}">
+            <head>
+                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+                <link rel="stylesheet" type="text/css" href="{$files-prefix}main.css"/>
+                <link href="{$files-prefix}i/favicon.png" rel="shortcut icon" media="all" />
+                <xsl:if test="$language = 'ru'">
+                    <script type="text/javascript" src="script.js"></script>
+                </xsl:if>
+                <title>
                     <xsl:choose>
-                        <xsl:when test="position() != last()">
-                            <li class="current">
-                                <span>
-                                    <xsl:value-of select="."/>
-                                </span>
-                            </li>
+                        <xsl:when test="/xhtml:html/@id != 'index'">
+                            <xsl:value-of select="/xhtml:html/xhtml:head/xhtml:title"/>
+                            <xsl:text> // Maxima CAS</xsl:text>
                         </xsl:when>
                         <xsl:otherwise>
-                            <li class="current" style="border: none">
-                                <span>
-                                    <xsl:value-of select="."/>
-                                </span>
-                            </li>
+                            <xsl:if test="$language = 'en'">
+                                <xsl:text>Maxima, a Computer Algebra System</xsl:text>
+                            </xsl:if>
+                            <xsl:if test="$language = 'ru'">
+                                <xsl:text>�������������� ������������������������ �������������� Maxima</xsl:text>
+                            </xsl:if>
                         </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>
+                <link rel="alternate" type="application/rss+xml" title="�������������� Maxima" href="feed.xml" />
             </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>
+            <body onload="init()">
                 <xsl:choose>
-                    <xsl:when test="$page-id = 'index'">
+                    <xsl:when test="/xhtml:html/@id = 'index'">
                         <h1>
-                            <img src="/i/logo.png" alt="M����" class="mks"/>
+                            <img src="{$files-prefix}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>
+                            <span class="cas">
+                                <xsl:if test="$language = 'en'">
+                                    <span class="maxima">Maxima</span>
+                                    <xsl:text>, a Computer Algebra System</xsl:text>
+                                </xsl:if>
+                                <xsl:if test="$language = 'ru'">
+                                    <xsl:text>�������������� ������������������������ �������������� </xsl:text>
+                                    <span class="maxima">Maxima</span>
+                                </xsl:if>
+                            </span>
                         </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 href="./" title="���� �������������� ����������������">
+                                <img src="{$files-prefix}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 href="./" title="���� �������������� ����������������">
+                                <span class="cas">
+                                <xsl:if test="$language = 'en'">
+                                        <span class="maxima">Maxima</span>
+                                        <xsl:text>, a Computer Algebra System</xsl:text>
+                                    </xsl:if>
+                                    <xsl:if test="$language = 'ru'">
+                                        <xsl:text>�������������� ������������������������ �������������� </xsl:text>
+                                        <span class="maxima">Maxima</span>
+                                    </xsl:if>
+                                </span>
                             </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>
+
+                    <xsl:if test="$language = 'en'">
+                        <!--<xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'news'">
+                                <li class="current">News&#x00a0;<a href="feed.xml" class="rss">RSS</a></li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="news.html">News</a>&#x00a0;<a href="feed.xml" class="rss">RSS</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>-->
+                        <li><a href="http://maxima.sourceforge.net/wiki/index.php/Maxima%20FAQ">FAQ</a></li>
+                        <xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'documentation'">
+                                <li class="current">Documentation</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="documentation.html">Documentation</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        <xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'screenshots'">
+                                <li class="current">Screen Shots</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="screenshots.html">Screen Shots</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        <xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'download'">
+                                <li class="current">Download</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="download.html">Download</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        <li><a href="http://sourceforge.net/tracker/?group_id=4933&amp;atid=104933">Report Bugs</a></li>
+                        <li><a href="http://sourceforge.net/projects/maxima">SourceForge Project Page</a></li>
+                        <!--<xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'misc'">
+                                <li class="current">Misc</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="misc.html">Misc</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>-->
+                        <xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = '3rdpartycode'">
+                                <li class="current">Third Party Maxima Code</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="3rdpartycode.html">Third Party Maxima Code</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        <xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'relatedprojects'">
+                                <li class="current">Related Projects</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="relatedprojects.html">Related Projects</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        <xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'lisp'">
+                                <li class="current">Lisp Links</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="lisp.html">Lisp Links</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        <xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'compalg'">
+                                <li class="current">Computer Algebra</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="compalg.html">Computer Algebra</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        <li><a href="http://maxima.sourceforge.net/wiki/">Wiki</a></li>
+                        <xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'maximalist'">
+                                <li class="current">Mail Lists</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="maximalist.html">Mail Lists</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                    </xsl:if>
+
+                    <xsl:if test="$language = 'ru'">
+                        <!--<xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'news'">
+                                <li class="current">��������������&#x00a0;<a href="feed.xml" class="rss">RSS</a></li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="news.html">��������������</a>&#x00a0;<a href="feed.xml" class="rss">RSS</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>-->
+                        <xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'download'">
+                                <li class="current">����������������</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="download.html">����������������</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        <xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'documentation'">
+                                <li class="current">������������������������</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="documentation.html">������������������������</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        <xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'screenshots'">
+                                <li class="current">������������ ������������</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="screenshots.html">������������ ������������</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        <xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'faq'">
+                                <li class="current">������������ ���� ���������� �������������������� ��������������</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="faq.html">������������ ���� ���������� �������������������� ��������������</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        <xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = '3rdpartycode'">
+                                <li class="current">���������������������������� ������������</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="3rdpartycode.html">���������������������������� ������������</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        <xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'relatedprojects'">
+                                <li class="current">������������������ ��������������</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="relatedprojects.html">������������������ ��������������</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        <xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'lisp'">
+                                <li class="current">������������ ���� LISP</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="lisp.html">������������ ���� LISP</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        <xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'compalg'">
+                                <li class="current">������������������������ ��������������</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="compalg.html">������������������������ ��������������</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        <xsl:choose>
+                            <xsl:when test="/xhtml:html/@id = 'maximalist'">
+                                <li class="current">������������ ����������������</li>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <li><a href="maximalist.html">������������ ����������������</a></li>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                    </xsl:if>
+
+                    <xsl:if test="$language = 'en'">
+                        <li style="margin-top: 2em" class="langlink">
+                            <a href="./es/" xml:lang="es">Espa��ol</a>
+                        </li>
+                        <li class="langlink">
+                            <a href="./ru/" xml:lang="ru">��������������</a>
+                        </li>
+                    </xsl:if>
+                    <xsl:if test="$language = 'es'">
+                        <li style="margin-top: 2em" class="langlink">
+                            <a href="../" xml:lang="en">English</a>
+                        </li>
+                        <li class="langlink">
+                            <a href="../ru/" xml:lang="ru">��������������</a>
+                        </li>
+                    </xsl:if>
+                    <xsl:if test="$language = 'ru'">
+                        <li style="margin-top: 2em" class="langlink">
+                            <a href="../" xml:lang="en">English</a>
+                        </li>
+                        <li class="langlink">
+                            <a href="../es/" xml:lang="es">Espa��ol</a>
+                        </li>
+                    </xsl:if>
+
                 </ul>
+
                 <div class="body">
-                    <xsl:if test="($page-id != 'index') and $title">
+                    <xsl:if test="/xhtml:html/xhtml:head/xhtml:title">
                         <h2 style="padding-top: 0; margin-top: 0">
                             <xsl:value-of select="/xhtml:html/xhtml:head/xhtml:title"/>
                         </h2>
@@ -217,16 +297,26 @@
                         <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>
+                    <xsl:if test="$language = 'ru'">
+                        <p>
+                            <xsl:text>�� 2007���2008 </xsl:text>
+                            <a href="http://beshenov.ru/">�������������� ��������������</a>
+                            <xsl:text>, ���������������� �������������� ������������ ���������� Maxima.</xsl:text>
+                            <br/>
+                            <xsl:text>����������: </xsl:text>
+                            <a href="mailto:al@beshenov.ru">al@beshenov.ru</a>
+                            <xsl:text>.</xsl:text>
+                        </p>
+                    </xsl:if>
+                    <xsl:if test="$language = 'en'">
+                        <p>
+                            <xsl:text>�� 2002���2008 Maxima developement team.</xsl:text>
+                        </p>
+                    </xsl:if>
                 </div>
             </body>
         </html>
     </xsl:template>
-
-</xsl:stylesheet>
+</xsl:stylesheet>

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks