[Toss-devel-svn] SF.net SVN: toss:[1381] trunk/Toss
Status: Beta
Brought to you by:
lukaszkaiser
|
From: <luk...@us...> - 2011-03-23 14:18:20
|
Revision: 1381
http://toss.svn.sourceforge.net/toss/?rev=1381&view=rev
Author: lukaszkaiser
Date: 2011-03-23 14:18:12 +0000 (Wed, 23 Mar 2011)
Log Message:
-----------
Branching-based monotonicity, some www cleanup.
Modified Paths:
--------------
trunk/Toss/GGP/Makefile
trunk/Toss/Play/Heuristic.ml
trunk/Toss/www/ideas.xml
trunk/Toss/www/xsl/books.xsl
trunk/Toss/www/xsl/main.xsl
trunk/Toss/www/xsl/publications.xsl
Added Paths:
-----------
trunk/Toss/www/xsl/bibtex.xsl
trunk/Toss/www/xsl/common.xsl
trunk/Toss/www/xsl/layout-games.xsl
trunk/Toss/www/xsl/layout.xsl
Removed Paths:
-------------
trunk/Toss/www/style.css
trunk/Toss/www/xsl/include/
trunk/Toss/www/xsl/main.xsl~
trunk/Toss/www/xsl/publications-games-past.xsl
Modified: trunk/Toss/GGP/Makefile
===================================================================
--- trunk/Toss/GGP/Makefile 2011-03-23 13:00:03 UTC (rev 1380)
+++ trunk/Toss/GGP/Makefile 2011-03-23 14:18:12 UTC (rev 1381)
@@ -16,11 +16,13 @@
GDLTestDebug:
%.black: examples/%.gdl ../TossServer
+ make -C ..
OCAMLRUNPARAM=b; export OCAMLRUNPARAM; ../TossServer -d 2 &
java -jar gamecontroller-cli.jar play $< 600 10 1 -random 1 -remote 2 toss localhost 8110 1 | grep results
killall -v TossServer
%.white: examples/%.gdl ../TossServer
+ make -C ..
OCAMLRUNPARAM=b; export OCAMLRUNPARAM; ../TossServer -d 2 &
java -jar gamecontroller-cli.jar play $< 600 10 1 -random 2 -remote 1 toss localhost 8110 1 | grep results
killall -v TossServer
Modified: trunk/Toss/Play/Heuristic.ml
===================================================================
--- trunk/Toss/Play/Heuristic.ml 2011-03-23 13:00:03 UTC (rev 1380)
+++ trunk/Toss/Play/Heuristic.ml 2011-03-23 14:18:12 UTC (rev 1381)
@@ -1008,9 +1008,10 @@
Aux.Strings.union posi_poff_rels nega_poff_rels in
let frels = Aux.Strings.union indef_frels
(Aux.Strings.union posi_frels nega_frels) in
- let monotonic = !use_monotonic &&
- Aux.Strings.is_empty
- (Aux.Strings.inter all_poff_rels indef_frels) in
+ let moves = match struc with | None -> [||] | Some strc ->
+ Move.gen_moves Move.cGRID_SIZE rules strc graph.(0) in
+ let monotonic = !use_monotonic && (Array.length moves > 60 ||
+ Aux.Strings.is_empty (Aux.Strings.inter all_poff_rels indef_frels)) in
(* {{{ log entry *)
if !debug_level > 1 then (
Printf.printf
Modified: trunk/Toss/www/ideas.xml
===================================================================
--- trunk/Toss/www/ideas.xml 2011-03-23 13:00:03 UTC (rev 1380)
+++ trunk/Toss/www/ideas.xml 2011-03-23 14:18:12 UTC (rev 1381)
@@ -85,7 +85,6 @@
project, but it can become very interesting in the last phase!
<br/><br/></par>
<par><em>Possible Mentors (in order of preference):</em>
- Michał Wójcik, Tobias Ganzow,
Łukasz Stafiniak, Łukasz Kaiser
</par>
</section>
@@ -121,7 +120,7 @@
and to be able to use and debug them in parallel.
<br/><br/></par>
<par><em>Possible Mentors (in order of preference):</em>
- Łukasz Kaiser, Tobias Ganzow, Łukasz Stafiniak
+ Łukasz Kaiser, Łukasz Stafiniak
</par>
</section>
@@ -160,7 +159,7 @@
interface design is necessary, and a lot of testing to make it right.
<br/><br/></par>
<par><em>Possible Mentors (in order of preference):</em>
- Dietmar Berwanger, Michał Wójcik, Diana Fischer
+ Łukasz Kaiser, Łukasz Stafiniak
</par>
</section>
@@ -198,7 +197,7 @@
their optimization techniques or constraint solving will be helpful.
<br/><br/></par>
<par><em>Possible Mentors (in order of preference):</em>
- Tobias Ganzow, Łukasz Kaiser, Łukasz Stafiniak
+ Łukasz Kaiser, Łukasz Stafiniak
</par>
</section>
@@ -312,7 +311,7 @@
to hard, depending on how much effort one makes to adapt automatic play.
<br/><br/></par>
<par><em>Possible Mentors (in order of preference):</em>
- Łukasz Kaiser, Dietmar Berwanger, Tobias Ganzow
+ Łukasz Kaiser
</par>
</section>
Deleted: trunk/Toss/www/style.css
===================================================================
--- trunk/Toss/www/style.css 2011-03-23 13:00:03 UTC (rev 1380)
+++ trunk/Toss/www/style.css 2011-03-23 14:18:12 UTC (rev 1381)
@@ -1,90 +0,0 @@
-/* General */
-
-html {
- height: 100%;
-}
-
-body {
- /* background-color: #222222; */
- /* height: 60%; */
- /* width: 90%; */
-}
-
-#top {
- margin-left: 13%;
- margin-right: 13%;
- font-size: 4em;
- font-family: Times, serif;
- color: #787878;
- font-weight: bold;
- background-color: #ffffff;
- padding: 5px;
-}
-
-#tossi {
- float: right;
- margin-top: 0em;
-}
-
-#bottom {
- margin-left: 13%;
- margin-right: 13%;
- background-color: #ffffff;
- text-align: right;
- padding: 5px;
- padding-top: 3em;
-}
-
-#sidebar {
- text-align: center;
- margin-left: 13%;
- margin-right: 13%;
- border-width: 5px 0px 5px 0px;
- border-color: #787878;
- border-style: solid;
- background-color: #ffffff;
- padding: 10px 0px 10px 0px;
-}
-
-
-/* Content */
-
-.main {
- margin-left: 13%;
- margin-right: 13%;
- height: 100%;
- background-color: #ffffff;
- padding: 20px;
-}
-
-.main h1 {
- text-align: center;
-}
-
-.main a, a:link, a:active, a:visited, a:hover {
- color: #787878; /*#b2cde0;*/
-}
-
-.nav-sep {
- background-color: #787878;
- width: 5px;
-}
-
-.iface {
- border-width: 1px;
- border-color: #787878;
- border-style: solid
-}
-
-#sidebar a {
- font-size: 1.2em;
- font-weight: bold;
- color: #787878;
- width: 100%;
- margin: 1em;
-}
-
-#sidebar a:hover {
- text-decoration: none;
- color: black;
-}
Copied: trunk/Toss/www/xsl/bibtex.xsl (from rev 1380, trunk/Toss/www/xsl/include/bibtex.xsl)
===================================================================
--- trunk/Toss/www/xsl/bibtex.xsl (rev 0)
+++ trunk/Toss/www/xsl/bibtex.xsl 2011-03-23 14:18:12 UTC (rev 1381)
@@ -0,0 +1,461 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xsl:stylesheet SYSTEM "xhtml1-lat1.ent">
+
+<xsl:stylesheet version="1.0"
+ xmlns:bibtex="http://bibtexml.sf.net/"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:strip-space elements="*"/>
+
+<xsl:template match="bibtex:file">
+ <table class="bibtex-bibliography">
+ <xsl:apply-templates select="*" mode="number">
+ <xsl:sort select="@id" data-type="text"/>
+ </xsl:apply-templates>
+ </table>
+</xsl:template>
+
+<xsl:template match="bibtex:file" mode="number">
+ <table class="bibtex-bibliography">
+ <xsl:apply-templates select="*" mode="number">
+ <xsl:sort select="@id" data-type="text"/>
+ </xsl:apply-templates>
+ </table>
+</xsl:template>
+
+<xsl:template match="bibtex:file" mode="id">
+ <table class="bibtex-bibliography">
+ <xsl:apply-templates select="*" mode="id">
+ <xsl:sort select="@id" data-type="text"/>
+ </xsl:apply-templates>
+ </table>
+</xsl:template>
+
+<xsl:template match="bibtex:entry">
+ <xsl:param name="index"/>
+ <tr>
+ <td class="index">
+ <xsl:text>[</xsl:text>
+ <xsl:value-of select="$index"/>
+ <xsl:text>]</xsl:text>
+ </td>
+ <td class="entry">
+ <xsl:apply-templates select="*"/>
+ </td>
+ </tr>
+</xsl:template>
+
+<xsl:template match="bibtex:entry" mode="number">
+ <xsl:apply-templates select=".">
+ <xsl:with-param name="index" select="position()"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="bibtex:entry" mode="id">
+ <xsl:apply-templates select=".">
+ <xsl:with-param name="index" select="@id"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="bibtex:book|bibtex:inbook|bibtex:booklet|
+ bibtex:proceedings|
+ bibtex:manual|bibtex:techreport|
+ bibtex:unpublished|bibtex:misc">
+ <xsl:apply-templates select="bibtex:authors|bibtex:editors"/>
+ <xsl:text>. </xsl:text>
+ <xsl:apply-templates select="bibtex:title">
+ <xsl:with-param name="type">book</xsl:with-param>
+ </xsl:apply-templates>
+ <xsl:if test="not(substring(bibtex:title, string-length(bibtex:title)) = '.' or substring(bibtex:title, string-length(bibtex:title)) = '!' or substring(bibtex:title, string-length(bibtex:title)) = '?')">
+ <xsl:text>.</xsl:text>
+ </xsl:if>
+ <xsl:text> </xsl:text>
+ <xsl:if test="../bibtex:techreport">
+ <xsl:text>Technical Report. </xsl:text>
+ </xsl:if>
+ <xsl:call-template name="publisher"/>
+</xsl:template>
+
+<xsl:template match="bibtex:mastersthesis|bibtex:phdthesis">
+ <xsl:apply-templates select="bibtex:authors"/>
+ <xsl:text>. </xsl:text>
+ <xsl:apply-templates select="bibtex:chapter"/>
+ <xsl:apply-templates select="bibtex:title">
+ <xsl:with-param name="type">book</xsl:with-param>
+ </xsl:apply-templates>
+ <xsl:if test="not(substring(bibtex:title, string-length(bibtex:title)) = '.' or substring(bibtex:title, string-length(bibtex:title)) = '!' or substring(bibtex:title, string-length(bibtex:title)) = '?')">
+ <xsl:text>.</xsl:text>
+ </xsl:if>
+ <xsl:text> </xsl:text>
+ <xsl:if test="../bibtex:phdthesis">
+ <xsl:text>PhD thesis</xsl:text>
+ </xsl:if>
+ <xsl:if test="../bibtex:mastersthesis">
+ <xsl:text>Master's thesis</xsl:text>
+ </xsl:if>
+ <xsl:if test="bibtex:school">
+ <xsl:text>, </xsl:text>
+ <xsl:apply-templates select="bibtex:school"/>
+ </xsl:if>
+ <xsl:if test="bibtex:year">
+ <xsl:text>, </xsl:text>
+ <xsl:apply-templates select="bibtex:year"/>
+ </xsl:if>
+ <xsl:text>.</xsl:text>
+ <xsl:if test="not(bibtex:year)">
+ <xsl:text> </xsl:text>
+ <xsl:text>To appear.</xsl:text>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="bibtex:article">
+ <xsl:apply-templates select="bibtex:authors"/>
+ <xsl:text>. </xsl:text>
+ <xsl:apply-templates select="bibtex:title">
+ <xsl:with-param name="type">article</xsl:with-param>
+ </xsl:apply-templates>
+ <xsl:if test="not(substring(bibtex:title, string-length(bibtex:title)) = '.' or substring(bibtex:title, string-length(bibtex:title)) = '!' or substring(bibtex:title, string-length(bibtex:title)) = '?')">
+ <xsl:text>.</xsl:text>
+ </xsl:if>
+ <xsl:text> </xsl:text>
+ <em>
+ <xsl:apply-templates select="bibtex:journal"/>
+ </em>
+ <!-- <xsl:apply-templates select="bibtex:editors"/> -->
+ <xsl:call-template name="journal-volume"/>
+ <!-- <xsl:apply-templates select="bibtex:series"/> -->
+ <xsl:apply-templates select="bibtex:pages"/>
+ <xsl:if test="bibtex:year">
+ <xsl:text>, </xsl:text>
+ <xsl:apply-templates select="bibtex:year"/>
+ </xsl:if>
+ <xsl:text>.</xsl:text>
+ <xsl:if test="not(bibtex:year)">
+ <!-- previously, 'To appear' would be output automagically;
+ changed this to output of the bibtex-field note -->
+ <xsl:if test="bibtex:note">
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates select="bibtex:note"/>
+ <!--<xsl:text>To appear.</xsl:text>-->
+ </xsl:if>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="bibtex:incollection">
+ <xsl:apply-templates select="bibtex:authors"/>
+ <xsl:text>. </xsl:text>
+ <xsl:apply-templates select="bibtex:title">
+ <xsl:with-param name="type">incollection</xsl:with-param>
+ </xsl:apply-templates>
+ <xsl:if test="not(substring(bibtex:title, string-length(bibtex:title)) = '.' or substring(bibtex:title, string-length(bibtex:title)) = '!' or substring(bibtex:title, string-length(bibtex:title)) = '?')">
+ </xsl:if>
+ <xsl:if test="bibtex:booktitle">
+ <xsl:text>. In </xsl:text>
+ <em>
+ <xsl:apply-templates select="bibtex:booktitle"/>
+ </em>
+ </xsl:if>
+ <xsl:apply-templates select="bibtex:editors"/>
+ <xsl:apply-templates select="bibtex:volume"/>
+ <xsl:apply-templates select="bibtex:series"/>
+ <xsl:apply-templates select="bibtex:pages"/>
+ <xsl:choose>
+ <xsl:when test="bibtex:year and not(bibtex:publisher|bibtex:howpublished|bibtex:institution)">
+ <xsl:text>, </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>. </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="publisher"/>
+</xsl:template>
+
+<xsl:template match="bibtex:inproceedings|bibtex:conference">
+ <xsl:apply-templates select="bibtex:authors"/>
+ <xsl:text>. </xsl:text>
+ <xsl:apply-templates select="bibtex:title">
+ <xsl:with-param name="type">inproceedings</xsl:with-param>
+ </xsl:apply-templates>
+ <xsl:if test="not(substring(bibtex:title, string-length(bibtex:title)) = '.' or substring(bibtex:title, string-length(bibtex:title)) = '!' or substring(bibtex:title, string-length(bibtex:title)) = '?')">
+ <xsl:text>.</xsl:text>
+ </xsl:if>
+ <xsl:text> In </xsl:text>
+ <em>
+ <xsl:apply-templates select="bibtex:booktitle"/>
+ </em>
+ <xsl:apply-templates select="bibtex:editors"/>
+ <xsl:apply-templates select="bibtex:volume"/>
+ <xsl:apply-templates select="bibtex:series"/>
+ <xsl:apply-templates select="bibtex:pages"/>
+ <xsl:if test="bibtex:address">
+ <xsl:text>, </xsl:text>
+ <xsl:apply-templates select="bibtex:address"/>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="bibtex:year and not(bibtex:publisher|bibtex:howpublished|bibtex:institution)">
+ <xsl:text>, </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>. </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="publisherofproceedings" />
+</xsl:template>
+
+
+<xsl:template match="bibtex:abstract|bibtex:url"/>
+
+<xsl:template match="bibtex:authors">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="bibtex:editors">
+ <xsl:choose>
+ <xsl:when test="../bibtex:authors">
+ <xsl:text> (</xsl:text>
+ <xsl:apply-templates />
+ <xsl:text>, Ed</xsl:text>
+ <xsl:if test="count(bibtex:person)>1"><xsl:text>s</xsl:text></xsl:if>
+ <xsl:text>.)</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ <xsl:text> (Ed</xsl:text>
+ <xsl:if test="count(bibtex:person)>1"><xsl:text>s</xsl:text></xsl:if>
+ <xsl:text>.)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="bibtex:person">
+ <!-- Special treatment for the last author -->
+ <xsl:choose>
+ <xsl:when test="position()=last() and bibtex:last='Others'">
+ <xsl:text>et al.</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="position()=last() and not(position()=1)">
+ <xsl:text>and </xsl:text>
+ </xsl:if>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!-- don't print a comma if there are only two authors and for the last author -->
+ <xsl:choose>
+ <xsl:when test="count(../bibtex:person)=2 and position()=1">
+ <xsl:text> </xsl:text>
+ </xsl:when>
+ <xsl:when test="position()=last()">
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>, </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="bibtex:person/bibtex:last|bibtex:person/bibtex:prelast">
+ <xsl:apply-templates/>
+ <xsl:if test="not(position()=last())">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="bibtex:person/bibtex:first|bibtex:person/bibtex:middle">
+ <xsl:value-of select="substring(.,1,1)"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<xsl:template match="bibtex:title" name="title">
+ <xsl:param name="type">article</xsl:param>
+
+ <xsl:choose>
+ <xsl:when test="../bibtex:url">
+ <xsl:variable name="url" select="../bibtex:url"/>
+ <a href="{$url}" class="bibtex-title {$type}"><xsl:apply-templates/></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <span class="bibtex-title {$type}"><xsl:apply-templates/></span>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="journal-volume">
+ <xsl:if test="bibtex:volume">
+ <xsl:text>, vol. </xsl:text>
+ <xsl:value-of select="bibtex:volume"/>
+ <xsl:if test="bibtex:number">
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="bibtex:number"/>
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="bibtex:volume">
+ <xsl:text>, vol. </xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text> of</xsl:text>
+</xsl:template>
+
+<xsl:template match="bibtex:number">
+ <xsl:apply-templates />
+</xsl:template>
+
+<xsl:template match="bibtex:doi|bibtex:isbn|bibtex:issn|bibtex:lccn">
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select='substring-after(name(.),"bibtex:")'/>
+ <xsl:text>:</xsl:text>
+ <xsl:apply-templates />
+</xsl:template>
+
+<xsl:template match="bibtex:year|bibtex:publisher|
+ bibtex:institution|bibtex:booktitle|
+ bibtex:organization|bibtex:journal|
+ bibtex:address|bibtex:school|
+ bibtex:howpublished">
+ <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="bibtex:series">
+ <xsl:if test="not(../bibtex:volume)">
+ <xsl:text>,</xsl:text>
+ </xsl:if>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="bibtex:pages">
+ <xsl:text>, pp. </xsl:text>
+ <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="bibtex:chapter">
+ <xsl:text>`</xsl:text>
+ <xsl:apply-templates />
+ <xsl:text>' in </xsl:text>
+</xsl:template>
+
+<xsl:template name="publisher">
+ <xsl:if test="bibtex:publisher|bibtex:howpublished|bibtex:institution">
+ <xsl:apply-templates select="bibtex:publisher|bibtex:howpublished|bibtex:institution"/>
+ <xsl:if test="bibtex:address">
+ <xsl:text>, </xsl:text>
+ <xsl:apply-templates select="bibtex:address"/>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="bibtex:year">
+ <xsl:text>, </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>. </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="bibtex:year">
+ <xsl:apply-templates select="bibtex:year"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>To appear</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>.</xsl:text>
+</xsl:template>
+
+<xsl:template name="publisherofproceedings">
+ <xsl:if test="bibtex:publisher|bibtex:howpublished|bibtex:institution">
+ <xsl:apply-templates select="bibtex:publisher|bibtex:howpublished|bibtex:institution"/>
+ <xsl:choose>
+ <xsl:when test="bibtex:year">
+ <xsl:text>, </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>. </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="bibtex:year">
+ <xsl:apply-templates select="bibtex:year"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>To appear</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>.</xsl:text>
+</xsl:template>
+
+<xsl:template match="bibtex:abstract">
+ <xsl:copy-of select="node()"/>
+</xsl:template>
+
+<xsl:template match="bibtex:note">
+ <xsl:copy-of select="node()"/>
+</xsl:template>
+
+
+<!-- Handling bibtex-output -->
+
+<xsl:template match="bibtex:entry" mode="bibtex">
+ <xsl:apply-templates mode="bibtex"/>
+</xsl:template>
+
+<xsl:template match="bibtex:entry/*/bibtex:abstract" mode="bibtex"/>
+
+<xsl:template match="bibtex:entry/bibtex:*" mode="bibtex">
+ <xsl:text>@</xsl:text>
+ <xsl:value-of select='substring-after(name(),"bibtex:")'/>
+ <xsl:text>{</xsl:text>
+ <xsl:value-of select="../@id"/>
+ <xsl:text>,</xsl:text>
+ <br/>
+ <!-- <xsl:text>
</xsl:text> -->
+ <xsl:apply-templates mode="bibtex"/>
+ <xsl:text>}</xsl:text>
+ <br/>
+ <!-- <xsl:text>
</xsl:text> -->
+</xsl:template>
+
+<xsl:template match="bibtex:entry/*/bibtex:authors" mode="bibtex">
+
+ <xsl:text>author = {</xsl:text>
+ <xsl:apply-templates mode="bibtex"/>
+ <xsl:text>},</xsl:text>
+ <br/>
+</xsl:template>
+
+<xsl:template match="bibtex:entry/*/bibtex:editors" mode="bibtex">
+
+ <xsl:text>editor = {</xsl:text>
+ <xsl:apply-templates mode="bibtex"/>
+ <xsl:text>},</xsl:text>
+ <br/>
+</xsl:template>
+
+<xsl:template match="bibtex:person" mode="bibtex">
+ <xsl:apply-templates mode="bibtex"/>
+ <xsl:if test="not(position()=last())">
+ <xsl:text> and </xsl:text>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="bibtex:person/*" mode="bibtex">
+ <xsl:apply-templates mode="bibtex"/>
+ <xsl:if test="not(position()=last())">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+</xsl:template>
+
+<!-- All other bibtex tags. -->
+<xsl:template match="bibtex:entry/*/bibtex:*" mode="bibtex">
+
+ <xsl:value-of select='substring-after(name(),"bibtex:")'/>
+ <xsl:text> = {</xsl:text>
+ <xsl:apply-templates mode="bibtex"/>
+ <xsl:text>},</xsl:text>
+ <br/>
+</xsl:template>
+
+</xsl:stylesheet>
Modified: trunk/Toss/www/xsl/books.xsl
===================================================================
--- trunk/Toss/www/xsl/books.xsl 2011-03-23 13:00:03 UTC (rev 1380)
+++ trunk/Toss/www/xsl/books.xsl 2011-03-23 14:18:12 UTC (rev 1381)
@@ -7,8 +7,8 @@
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
-<xsl:include href="include/layout.xsl"/>
-<xsl:include href="include/bibtex.xsl"/>
+<xsl:include href="layout.xsl"/>
+<xsl:include href="bibtex.xsl"/>
<xsl:template match="books">
<xsl:apply-templates select="include"/>
Copied: trunk/Toss/www/xsl/common.xsl (from rev 1380, trunk/Toss/www/xsl/include/common.xsl)
===================================================================
--- trunk/Toss/www/xsl/common.xsl (rev 0)
+++ trunk/Toss/www/xsl/common.xsl 2011-03-23 14:18:12 UTC (rev 1381)
@@ -0,0 +1,235 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xsl:stylesheet SYSTEM "xhtml1-lat1.ent">
+
+<xsl:stylesheet
+ version='1.0'
+ xmlns:bibtex='http://bibtexml.sf.net/'
+ xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
+ xmlns="http://www.w3.org/1999/xhtml">
+
+<xsl:preserve-space elements="par item"/>
+
+<xsl:template match="html">
+ <xsl:copy-of select="node()"/>
+</xsl:template>
+
+<xsl:template match="section">
+ <xsl:choose>
+ <xsl:when test="@id">
+ <h3 id="{@id}"><xsl:value-of select="@title"/></h3>
+ </xsl:when>
+ <xsl:otherwise>
+ <h3><xsl:value-of select="@title"/></h3>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates />
+</xsl:template>
+
+<xsl:template match="subsection">
+ <h4><xsl:value-of select="@title"/></h4>
+ <xsl:apply-templates />
+</xsl:template>
+
+<xsl:template match="enumerate">
+ <ol>
+ <xsl:apply-templates />
+ </ol>
+</xsl:template>
+
+<xsl:template match="itemize">
+ <xsl:variable name="style-mod">
+ <xsl:if test="@style='none'">list-style: none;</xsl:if>
+ <xsl:if test="@style='no-indent'">list-style: none; margin-left: 0px;</xsl:if>
+ </xsl:variable>
+ <ul style="{$style-mod}">
+ <xsl:choose>
+ <xsl:when test="@type='sort'">
+ <xsl:for-each select="item">
+ <xsl:sort select="."/>
+ <li class="{@new}"><xsl:apply-templates /></li>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:when test="@type='sort-after-first-space'">
+ <xsl:for-each select="item">
+ <xsl:sort select="substring-after(., ' ')"/>
+ <li class="{@new}"><xsl:apply-templates /></li>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </ul>
+</xsl:template>
+
+<xsl:template match="item">
+ <li class="{@new}"><xsl:apply-templates /></li>
+</xsl:template>
+
+<xsl:template match="games-section">
+ <xsl:choose>
+ <xsl:when test="$lang='de'">
+ <h3><a href="http://tplay.org">Online Spielen gegen Toss</a></h3>
+ <xsl:apply-templates />
+ <p><a href="http://tplay.org">Weitere Spiele</a></p>
+ </xsl:when>
+ <xsl:when test="$lang='pl'">
+ <h3><a href="http://tplay.org">Zagraj Online z Tossem</a></h3>
+ <xsl:apply-templates />
+ <p><a href="http://tplay.org">Więcej gier</a></p>
+ </xsl:when>
+ <xsl:when test="$lang='fr'">
+ <h3><a href="http://tplay.org">Jouez en Ligne contre Toss</a></h3>
+ <xsl:apply-templates />
+ <p><a href="http://tplay.org">Plus de Jeux</a></p>
+ </xsl:when>
+ <xsl:otherwise>
+ <h3><a href="http://tplay.org">Play Online Against Toss</a></h3>
+ <xsl:apply-templates />
+ <p><a href="http://tplay.org">More Games</a></p>
+ </xsl:otherwise>
+ </xsl:choose>
+
+</xsl:template>
+
+<xsl:template match="game-div">
+ <div class="game-div"><xsl:apply-templates /></div>
+</xsl:template>
+
+<xsl:template match="ggp-game">
+ <a href="http://euklid.inf.tu-dresden.de:8180/ggpserver/public/view_state.jsp?matchID={@match_id}&stepNumber=1&seconds=1"><xsl:value-of select="@name" /></a>
+ (<xsl:value-of select="@match_id" />)
+</xsl:template>
+
+<xsl:template match="em">
+ <em><xsl:apply-templates /></em>
+</xsl:template>
+
+<xsl:template match="strong">
+ <strong><xsl:apply-templates /></strong>
+</xsl:template>
+
+<xsl:template match="br">
+ <br/>
+</xsl:template>
+
+
+<xsl:template match="lecture-title">
+
+ <xsl:variable name="index" select="count(../preceding-sibling::*)"/> <!-- position() of the parent (ie of /item)-->
+
+ <xsl:choose>
+ <xsl:when test="link/@inactive">
+ <xsl:apply-templates />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="title[@lang='de']">
+ <a href="{link}" ><xsl:value-of select="title[@lang='de']"/><!-- link to the lecture page--></a>
+ <xsl:if test="./grade"> <!-- If there are evaluation data-->
+ <span style="margin-left: 2em"> </span>
+ <a href="#" onclick="{concat('show_lecture_title(',$index , ')')}; return false;" rel="nofollow" class="evaluation"> <!-- call show_lecture($index) from main.js which changes the attribute 'display' of span with id='lecture_title$index'-->
+ Studentische Bewertung
+ </a>
+ <span style="display: none; margin-left: 2em; font-size: 90%" id="{concat('lecture_title', $index)}"><!---->Vorlesung:
+ <xsl:value-of select="grade[@tograde='lecture' and @part='int']"></xsl:value-of>,<xsl:value-of select="grade[@tograde='lecture' and @part='frac']"></xsl:value-of>
+ <span style="margin-left: 1em">Dozent: </span>
+ <xsl:value-of select="grade[@tograde='docent' and @part='int']"></xsl:value-of>,<xsl:value-of select="grade[@tograde='docent' and @part='frac']"></xsl:value-of>
+ </span>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="title[@lang='en']">
+ <a href="{link}" ><xsl:value-of select="title[@lang='en']"/></a>
+ <xsl:if test="./grade"> <!-- If there are evaluation data-->
+ <span style="margin-left: 2em"> </span>
+ <a href="#" onclick="{concat('show_lecture_title(',$index , ')')}; return false;" rel="nofollow" class="evaluation">
+ Students' Evaluation
+ </a>
+ <span style="display: none; margin-left: 2em; font-size: 90%" id="{concat('lecture_title', $index)}">lecture:
+ <xsl:value-of select="grade[@tograde='lecture' and @part='int']"></xsl:value-of>.<xsl:value-of select="grade[@tograde='lecture' and @part='frac']"></xsl:value-of>
+ <span style="margin-left: 1em">docent: </span>
+ <xsl:value-of select="grade[@tograde='docent' and @part='int']"></xsl:value-of>.<xsl:value-of select="grade[@tograde='docent' and @part='frac']"></xsl:value-of>
+ </span>
+ </xsl:if>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<xsl:template match="a">
+ <xsl:choose>
+ <xsl:when test="@inactive">
+ <xsl:apply-templates />
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="{@href}"><xsl:apply-templates /></a>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="quote">
+ <blockquote><xsl:apply-templates /></blockquote>
+</xsl:template>
+
+<xsl:template match="image">
+ <div class="image">
+ <img src="{$topdir}/img/{@src}" alt="{@title}"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="game-link">
+ <xsl:choose>
+ <xsl:when test="$lang='de'">
+ <a href="http://tplay.org/index.html?game={@game}"
+ title="Spiel {@game}" class="game-link" id="game-link-{@game}">
+ <img class="game-img" src="{$topdir}/img/{@game}.png"
+ alt="{@game}-Brett" id="game-img-{@game}" />
+ </a>
+ </xsl:when>
+ <xsl:when test="$lang='pl'">
+ <a href="http://tplay.org/index.html?game={@game}"
+ title="Graj w {@game}" class="game-link" id="game-link-{@game}">
+ <img class="game-img" src="{$topdir}/img/{@game}.png"
+ alt="Plansza {@game}" id="game-img-{@game}" />
+ </a>
+ </xsl:when>
+ <xsl:when test="$lang='fr'">
+ <a href="http://tplay.org/index.html?game={@game}"
+ title="Jouez au {@game}" class="game-link" id="game-link-{@game}">
+ <img class="game-img" src="{$topdir}/img/{@game}.png"
+ alt="Bord de {@game}" id="game-img-{@game}" />
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="http://tplay.org/index.html?game={@game}"
+ title="Play {@game}" class="game-link" id="game-link-{@game}">
+ <img class="game-img" src="{$topdir}/img/{@game}.png"
+ alt="{@game} Board" id="game-img-{@game}" />
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="flag">
+ <img src="/img/flags/{@country}.gif" alt="{@country}"/>
+
+</xsl:template>
+
+<xsl:template name="mail">
+ <xsl:param name="user"/>
+ <xsl:param name="domain"/>
+ <xsl:param name="title" select="''"/>
+
+ <xsl:choose>
+ <xsl:when test="$title">
+ <script type="text/javascript">begin_mailto("<xsl:value-of select="$user"/>", "<xsl:value-of select="$domain"/>", "true");</script><xsl:value-of select="$title"/><script type="text/javascript">end_mailto();</script>
+ </xsl:when>
+ <xsl:otherwise>
+ <script type="text/javascript">begin_mailto("<xsl:value-of select="$user"/>", "<xsl:value-of select="$domain"/>");</script><xsl:value-of select="$user"/> [AT] <xsl:value-of select="$domain"/><script type="text/javascript">end_mailto();</script>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
Copied: trunk/Toss/www/xsl/layout-games.xsl (from rev 1380, trunk/Toss/www/xsl/include/layout-games.xsl)
===================================================================
--- trunk/Toss/www/xsl/layout-games.xsl (rev 0)
+++ trunk/Toss/www/xsl/layout-games.xsl 2011-03-23 14:18:12 UTC (rev 1381)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xsl:stylesheet SYSTEM "xhtml1-lat1.ent">
+
+<xsl:stylesheet
+ version='1.0'
+ xmlns:bibtex='http://bibtexml.sf.net/'
+ xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
+ xmlns="http://www.w3.org/1999/xhtml">
+
+<xsl:output
+ method="xml" version="1.0"
+ media-type="text/xml"
+ omit-xml-declaration = "yes"
+ doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+ indent="yes"
+ encoding="UTF-8"/>
+
+
+<!-- do not output processing instructions -->
+<xsl:template match="processing-instruction()"/>
+
+
+<xsl:template match="/">
+ <!-- XHTML-output -->
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <link rel="stylesheet" type="text/css" href="/styles/common.css" media="all"/>
+ <link rel="stylesheet" type="text/css" href="/styles/screen.css" media="screen"/>
+ <link rel="stylesheet" type="text/css" href="/styles/print.css" media="print"/>
+ <link rel="shortcut icon" href="/img/favicon-games.ico"/>
+
+ <!-- check whether a title is given in xml file, use parameter otherwise -->
+ <xsl:choose>
+ <xsl:when test="/*/title/@html">
+ <title>GAMES - <xsl:value-of select="/*/title/@html"/></title>
+ </xsl:when>
+ <xsl:when test="/*/title">
+ <title>GAMES - <xsl:value-of select="/*/title"/></title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>GAMES - <xsl:value-of select="$title"/></title>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <script src="/scripts/main.js" type="text/javascript"/>
+ </head>
+ <body onload="gload()" onunload="gunload()">
+ <div id="page">
+ <div id="header">
+ <div id="headerlogo">
+ <a href="/"><div id="games-logo"></div></a>
+ </div>
+ <a href="http://www.esf.org/"><div id="esf-logo"></div></a>
+ <!-- <xsl:call-template name="navigation"/> -->
+ </div>
+
+ <div id="container" class="with-sidebar">
+ <div id="primary">
+ <div id="content">
+ <xsl:apply-templates/>
+ </div>
+ </div>
+ <div id="secondary">
+ <div id="sidebar">
+ <xsl:call-template name="navigation"/>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="footer">
+ © <xsl:value-of select="$year"/> <a href="http://www.logic.rwth-aachen.de">Mathematische Grundlagen der Informatik</a>, RWTH Aachen
+ (<a id="disclaimer" href="http://www.rwth-aachen.de/disclaimer">Disclaimer</a>)
+ </div>
+ </body>
+ </html>
+</xsl:template>
+
+<xsl:template name="navigation">
+ <div class="childnav" id="menu">
+ <div class="childnav-top"></div>
+ <xsl:call-template name="menu">
+ <xsl:with-param name="document" select="/"/>
+ <xsl:with-param name="menu" select="document('../../Games/navigation.xml')/navigation/menu"/>
+ </xsl:call-template>
+ </div>
+</xsl:template>
+
+<xsl:template name="menu">
+ <xsl:param name="document"/>
+ <xsl:param name="menu"/>
+ <xsl:param name="level" select="'top'"/>
+
+ <ul>
+ <xsl:for-each select="$menu/*">
+ <xsl:variable name="id">
+ <xsl:value-of select="@id"/>
+ </xsl:variable>
+ <xsl:variable name="selected">
+ <xsl:for-each select="$document/*/history/*">
+ <xsl:if test="$id=@id">selected</xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:variable name="menu-title">
+ <xsl:for-each select="$document/*/history/*">
+ <xsl:if test="$id=@id">menu-title</xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="name()='item'">
+ <li class="{$selected}">
+ <xsl:choose>
+ <xsl:when test="@href">
+ <a href="{@href}" class="menu-{$level}"><xsl:value-of select="."/><xsl:copy-of select="*"/></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <span class="menu-{$level}"><xsl:value-of select="."/><xsl:copy-of select="*"/></span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </li>
+ </xsl:when>
+ <xsl:when test="name()='menu'">
+ <li class="{$selected}">
+ <xsl:choose>
+ <xsl:when test="@href">
+ <!--
+ <xsl:choose>
+ <xsl:when test="@id='Authors'">
+ <xsl:if test="$document/*/history/*[@id='PastPublications']">
+ <a href="{@href}" class="{$menu-title} menu-{$level}"><xsl:value-of select="@title"/></a>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ -->
+ <a href="{@href}" class="{$menu-title} menu-{$level}"><xsl:value-of select="@title"/></a>
+ <!--
+ </xsl:otherwise>
+ </xsl:choose>
+ -->
+ </xsl:when>
+ <xsl:otherwise>
+ <span class="{$menu-title} menu-{$level}"><xsl:value-of select="@title"/></span>
+ </xsl:otherwise>
+ </xsl:choose>
+ <!--
+ <xsl:choose>
+ <xsl:when test="@id='Authors'">
+ <xsl:if test="contains($selected, 'selected')">
+ <xsl:if test="$document/*/history/*[@id='AuthorMenu']">
+ <xsl:call-template name="author-menu-prevgames"/>
+ </xsl:if>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ -->
+ <xsl:choose>
+ <xsl:when test="contains($level, 'sub')">
+ <xsl:call-template name="menu">
+ <xsl:with-param name="document" select="$document"/>
+ <xsl:with-param name="menu" select="."/>
+ <xsl:with-param name="level" select="concat('sub',$level)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="menu">
+ <xsl:with-param name="document" select="$document"/>
+ <xsl:with-param name="menu" select="."/>
+ <xsl:with-param name="level" select="'sub'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ <!--
+ </xsl:otherwise>
+ </xsl:choose>
+ -->
+ </li>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </ul>
+</xsl:template>
+
+
+<xsl:template name="author-menu-prevgames">
+ <ul>
+ <li>
+ <ul>
+ <xsl:for-each select="document('../../Games/History/PastPublications/people.xml')/people/person[@type='researcher']">
+ <xsl:sort select="@id"/>
+ <li class="item-prevgames-author">
+ <a href="/History/PastPublications/{@id}.html" class="menu-sub"><xsl:value-of select="normalize-space(concat(first,' ',middle,' ',prelast,' ',last))"/></a>
+ </li>
+ </xsl:for-each>
+
+ <xsl:for-each select="document('../../Games/History/PastPublications/people.xml')/people/person[@type='young']">
+ <xsl:sort select="@id"/>
+ <xsl:variable name="author" select="last"/>
+ <xsl:if test="document('../../Games/History/PastPublications/all.xml')/bibtex:file/bibtex:entry/*/*/bibtex:person[bibtex:last=$author]">
+ <li class="item-prevgames-author">
+ <a href="/History/PastPublications/{@id}.html" class="menu-sub"><xsl:value-of select="normalize-space(concat(first,' ',middle,' ',prelast,' ',last))"/></a>
+ </li>
+ </xsl:if>
+ </xsl:for-each>
+ </ul>
+ </li>
+ </ul>
+</xsl:template>
+
+</xsl:stylesheet>
Copied: trunk/Toss/www/xsl/layout.xsl (from rev 1380, trunk/Toss/www/xsl/include/layout.xsl)
===================================================================
--- trunk/Toss/www/xsl/layout.xsl (rev 0)
+++ trunk/Toss/www/xsl/layout.xsl 2011-03-23 14:18:12 UTC (rev 1381)
@@ -0,0 +1,335 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xsl:stylesheet SYSTEM "xhtml1-lat1.ent">
+
+<xsl:stylesheet
+ version='1.0'
+ xmlns:bibtex='http://bibtexml.sf.net/'
+ xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
+ xmlns="http://www.w3.org/1999/xhtml">
+
+<xsl:output
+ method="xml" version="1.0"
+ media-type="text/xml"
+ omit-xml-declaration = "yes"
+ doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+ doctype-system="http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"
+ indent="yes"
+ encoding="UTF-8"/>
+
+
+<!-- do not output processing instructions -->
+<xsl:template match="processing-instruction()"/>
+
+
+<xsl:template match="/">
+ <!-- XHTML-output -->
+ <html xmlns='http://www.w3.org/1999/xhtml'
+ xmlns:dc='http://purl.org/dc/elements/1.1/'
+ xmlns:foaf='http://xmlns.com/foaf/0.1/'
+ xml:lang="{$lang}"
+ lang="{$lang}">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <link rel="stylesheet" type="text/css" href="{$topdir}/styles/common.css" media="all"/>
+ <link rel="stylesheet" type="text/css" href="{$topdir}/styles/screen.css" media="screen"/>
+ <link rel="stylesheet" type="text/css" href="{$topdir}/styles/print.css" media="print"/>
+ <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Ubuntu:regular,bold"/>
+ <link rel="shortcut icon" href="{$topdir}/img/favicon.ico"/>
+
+ <!-- check whether a title is given in xml file, use parameter otherwise -->
+ <xsl:choose>
+ <xsl:when test="/*/title/@html">
+ <title><xsl:value-of select="/*/title/@html"/></title>
+ </xsl:when>
+ <xsl:when test="/*/title/@nomgi">
+ <title><xsl:value-of select="/*/title"/></title>
+ </xsl:when>
+ <xsl:when test="/*/title">
+ <title><xsl:value-of select="/*/title"/></title>
+ </xsl:when>
+ <!-- if title is "Publications" check whether author is given -->
+ <xsl:when test="$title='Publications' and $author='all'">
+ <xsl:if test="$lang='de'">
+ <title>Publikationen</title>
+ </xsl:if>
+ <xsl:if test="$lang='en'">
+ <title>Publications</title>
+ </xsl:if>
+ <xsl:if test="$lang='pl'">
+ <title>Publikacje</title>
+ </xsl:if>
+ <xsl:if test="$lang='fr'">
+ <title>Publications</title>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="$title='Publications' and $author!='all'">
+ <xsl:variable name="fullname" select="normalize-space(concat(document('../people.xml')/people/person[@id=$author]/first,' ',document('../people.xml')/people/person[@id=$author]/last))"/>
+ <xsl:if test="$lang='de'">
+ <title>Publikationen: <xsl:value-of select="$fullname"/></title>
+ </xsl:if>
+ <xsl:if test="$lang='en'">
+ <title>Publications: <xsl:value-of select="$fullname"/></title>
+ </xsl:if>
+ <xsl:if test="$lang='pl'">
+ <title>Publikacje: <xsl:value-of select="$fullname"/></title>
+ </xsl:if>
+ <xsl:if test="$lang='fr'">
+ <title>Publications de <xsl:value-of select="$fullname"/></title>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <title><xsl:value-of select="$title"/></title>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="//googlemap">
+ <script src="{$topdir}/scripts/map.js" type="text/javascript"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <script src="{$topdir}/scripts/nomap.js" type="text/javascript"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <script src="{$topdir}/scripts/main.js" type="text/javascript"/>
+ <!-- <script src="{$topdir}/scripts/portal.js" type="text/javascript"/> -->
+ </head>
+ <body onload="gload()" onunload="gunload()">
+ <div id="page">
+ <div id="header">
+ <div id="headerlogo">
+ <a href="http://toss.sourceforge.net" id="logo"></a>
+ <div id="mgi-title">
+ <xsl:choose>
+ <xsl:when test="$lang='de'">
+ <h3></h3> <!-- no title for now -->
+ </xsl:when>
+ <xsl:otherwise>
+ <h3></h3> <!-- no title for now -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+ </div>
+ <a href="http://toss.sourceforge.net" id="left-logo">Toss</a>
+ <xsl:call-template name="langselect"/>
+ </div>
+
+ <div id="container" class="with-sidebar">
+ <div id="primary">
+ <div id="content">
+ <xsl:apply-templates/>
+ </div>
+ </div>
+ <div id="secondary">
+ <div id="sidebar">
+ <xsl:call-template name="navigation"/>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div id="footer">
+ © <xsl:value-of select="$year"/> Toss Team
+ </div>
+ </body>
+ </html>
+</xsl:template>
+
+<xsl:template name="langselect">
+ <div id="parentnav">
+ <ul>
+ <xsl:if test="$lang='de'">
+ <li class="selected"><span>Deutsch</span></li>
+ <li>
+ <a href="{concat(substring-before($uri,'.'),'.html.en')}">English</a>
+ </li>
+ <li>
+ <a href="{concat(substring-before($uri,'.'),'.html.fr')}">Français</a>
+ </li>
+ <li>
+ <a href="{concat(substring-before($uri,'.'),'.html.pl')}">Polski</a>
+ </li>
+ </xsl:if>
+ <xsl:if test="$lang='en'">
+ <li>
+ <a href="{concat(substring-before($uri,'.'),'.html.de')}">Deutsch</a>
+ </li>
+ <li class="selected"><span>English</span></li>
+ <li>
+ <a href="{concat(substring-before($uri,'.'),'.html.fr')}">Français</a>
+ </li>
+ <li>
+ <a href="{concat(substring-before($uri,'.'),'.html.pl')}">Polski</a>
+ </li>
+ </xsl:if>
+ <xsl:if test="$lang='pl'">
+ <li>
+ <a href="{concat(substring-before($uri,'.'),'.html.de')}">Deutsch</a>
+ </li>
+ <li>
+ <a href="{concat(substring-before($uri,'.'),'.html.en')}">English</a>
+ </li>
+ <li>
+ <a href="{concat(substring-before($uri,'.'),'.html.fr')}">Français</a>
+ </li>
+ <li class="selected"><span>Polski</span></li>
+ </xsl:if>
+ <xsl:if test="$lang='fr'">
+ <li>
+ <a href="{concat(substring-before($uri,'.'),'.html.de')}">Deutsch</a>
+ </li>
+ <li>
+ <a href="{concat(substring-before($uri,'.'),'.html.en')}">English</a>
+ </li>
+ <li class="selected"><span>Français</span></li>
+ <li>
+ <a href="{concat(substring-before($uri,'.'),'.html.pl')}">Polski</a>
+ </li>
+ </xsl:if>
+ </ul>
+ </div>
+</xsl:template>
+
+<xsl:template name="navigation">
+ <div class="childnav" id="menu">
+ <div class="childnav-top"></div>
+ <xsl:call-template name="menu">
+ <xsl:with-param name="document" select="/"/>
+ <xsl:with-param name="menu" select="document('../navigation.xml')/navigation/menu[contains(@lang,$lang)]"/>
+ </xsl:call-template>
+ </div>
+</xsl:template>
+
+<xsl:template name="menu">
+ <xsl:param name="document"/>
+ <xsl:param name="menu"/>
+ <xsl:param name="level" select="'top'"/>
+
+ <ul>
+ <xsl:for-each select="$menu/*">
+ <xsl:variable name="id">
+ <xsl:value-of select="@id"/>
+ </xsl:variable>
+ <xsl:variable name="selected">
+ <xsl:for-each select="$document/*/history/*">
+ <xsl:if test="$id=@id">selected</xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="name()='item'">
+ <li class="{$selected}">
+ <xsl:choose>
+ <xsl:when test="@href">
+ <a href="{@href}" class="menu-{$level}"><xsl:value-of select="."/><xsl:copy-of select="*"/></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <span class="menu-{$level}"><xsl:value-of select="."/><xsl:copy-of select="*"/></span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </li>
+ </xsl:when>
+ <xsl:when test="name()='menu'">
+ <li class="{$selected}">
+ <xsl:choose>
+ <xsl:when test="@href">
+ <a href="{@href}" class="menu-title menu-{$level}"><xsl:value-of select="@title"/></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <span class="menu-title menu-{$level}"><xsl:value-of select="@title"/></span>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="@id='Publications'">
+ <xsl:call-template name="author-menu"/>
+ </xsl:when>
+ <xsl:when test="@id='People'">
+ <xsl:call-template name="people-menu"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="menu">
+ <xsl:with-param name="document" select="$document"/>
+ <xsl:with-param name="menu" select="."/>
+ <xsl:with-param name="level" select="'sub'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </li>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </ul>
+</xsl:template>
+
+<xsl:template name="people-menu">
+ <ul>
+ <xsl:for-each select="document('../people.xml')/people/person[@type='prof']">
+ <xsl:variable name="fullname" select="normalize-space(concat(first,' ',last))"/>
+ <xsl:if test="homepage and not(homepage='')">
+ <li>
+ <a href="{homepage}"><xsl:value-of select="$fullname"/></a>
+ </li>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="document('../people.xml')/people/person[@type='assistant']">
+ <xsl:sort select="@id"/>
+
+ <xsl:variable name="fullname" select="normalize-space(concat(first,' ',last))"/>
+ <xsl:if test="homepage and not(homepage='')">
+ <li>
+ <a href="{homepage}"><xsl:value-of select="$fullname"/></a>
+ </li>
+ </xsl:if>
+ </xsl:for-each>
+ </ul>
+</xsl:template>
+
+<xsl:template name="author-menu">
+ <ul>
+ <li>
+ <xsl:if test="$lang='en'">
+ <span class="menu-title menu-sub">Current Members</span>
+ </xsl:if>
+ <xsl:if test="$lang='de'">
+ <span class="menu-title menu-sub">Aktuelle Mitarbeiter</span>
+ </xsl:if>
+ <ul>
+ <xsl:for-each select="document('../people.xml')/people/person[@type='prof']">
+ <li>
+ <a href="{$topdir}/Publications/{@id}.html.{$lang}" class="menu-sub"><xsl:value-of select="normalize-space(concat(first,' ',last))"/></a>
+ </li>
+ </xsl:for-each>
+ <xsl:for-each select="document('../people.xml')/people/person[@type='assistant']">
+ <xsl:sort select="@id"/>
+
+ <xsl:variable name="author" select="last"/>
+ <xsl:if test="document('../Publications/all.xml')/bibtex:file/bibtex:entry/*/*/bibtex:person[bibtex:last=$author]">
+ <li>
+ <a href="{$topdir}/Publications/{@id}.html.{$lang}" class="menu-sub"><xsl:value-of select="normalize-space(concat(first,' ',last))"/></a>
+ </li>
+ </xsl:if>
+ </xsl:for-each>
+ </ul>
+ </li>
+ <li>
+ <xsl:if test="$lang='en'">
+ <span class="menu-title menu-sub">Former Members</span>
+ </xsl:if>
+ <xsl:if test="$lang='de'">
+ <span class="menu-title menu-sub">Ehemalige Mitarbeiter</span>
+ </xsl:if>
+ <ul>
+ <xsl:for-each select="document('../people.xml')/people/person[@type='former-member']">
+ <xsl:sort select="@id"/>
+
+ <xsl:variable name="author" select="last"/>
+ <xsl:if test="document('../Publications/all.xml')/bibtex:file/bibtex:entry/*/*/bibtex:person[bibtex:last=$author]">
+ <li>
+ <a href="{$topdir}/Publications/{@id}.html.{$lang}" class="menu-sub"><xsl:value-of select="normalize-space(concat(first,' ',last))"/></a>
+ </li>
+ </xsl:if>
+ </xsl:for-each>
+ </ul>
+ </li>
+ </ul>
+</xsl:template>
+
+</xsl:stylesheet>
Modified: trunk/Toss/www/xsl/main.xsl
===================================================================
--- trunk/Toss/www/xsl/main.xsl 2011-03-23 13:00:03 UTC (rev 1380)
+++ trunk/Toss/www/xsl/main.xsl 2011-03-23 14:18:12 UTC (rev 1381)
@@ -8,9 +8,9 @@
xmlns="http://www.w3.org/1999/xhtml">
-<xsl:include href="include/layout.xsl"/>
-<xsl:include href="include/common.xsl"/>
-<xsl:include href="include/bibtex.xsl"/>
+<xsl:include href="layout.xsl"/>
+<xsl:include href="common.xsl"/>
+<xsl:include href="bibtex.xsl"/>
<xsl:template match="page">
<div class="title">
Deleted: trunk/Toss/www/xsl/main.xsl~
===================================================================
--- trunk/Toss/www/xsl/main.xsl~ 2011-03-23 13:00:03 UTC (rev 1380)
+++ trunk/Toss/www/xsl/main.xsl~ 2011-03-23 14:18:12 UTC (rev 1381)
@@ -1,953 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE xsl:stylesheet SYSTEM "xhtml1-lat1.ent">
-
-<xsl:stylesheet
- version='1.0'
- xmlns:bibtex='http://bibtexml.sf.net/'
- xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
- xmlns="http://www.w3.org/1999/xhtml">
-
-
-<xsl:include href="include/layout.xsl"/>
-<xsl:include href="include/common.xsl"/>
-<xsl:include href="include/bibtex.xsl"/>
-
-<xsl:template match="page">
- <div class="title">
- <h1 property="dc:title"><xsl:value-of select="title"/></h1>
- <xsl:if test="subtitle">
- <h2><xsl:value-of select="subtitle"/></h2>
- </xsl:if>
- </div>
- <!--
- <xsl:apply-templates select="news"/>
- <xsl:apply-templates select="section|people"/>
- -->
- <xsl:apply-templates select="news|section|list-of-people|FMTpeople"/>
- <xsl:apply-templates select="contact"/>
-</xsl:template>
-
-<xsl:template match="course|seminar">
- <div class="title">
- <h1 property="dc:title"><xsl:value-of select="title"/></h1>
- <h2><xsl:value-of select="semester|subtitle"/></h2>
-<!--
- <xsl:if test="$lang='en'">
- <p><em>The content on this page is partially available in German only.</em></p>
- </xsl:if>
--->
- </div>
-
-<!--
- <xsl:apply-templates select="news"/>
- <xsl:apply-templates select="schedule"/>
- <xsl:apply-templates select="documents"/>
- <xsl:apply-templates select="deadlines"/>
- <xsl:apply-templates select="topics"/>
- <xsl:apply-templates select="content"/>
- <xsl:apply-templates select="literature"/>
- <xsl:apply-templates select="classification"/>
- <xsl:apply-templates select="prerequisites"/>
- <xsl:apply-templates select="query"/>
--->
- <xsl:apply-templates select="news|schedule|portal-login|documents|deadlines|topics|content|literature|classification|prerequisites|query|contact|section|recurrence|assessment|following"/>
-</xsl:template>
-
-
-<xsl:template match="news">
- <xsl:if test="$lang='de'">
- <h3>Aktuelles</h3>
- </xsl:if>
- <xsl:if test="$lang='en'">
- <h3>News</h3>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="item">
- <ul><xsl:apply-templates/></ul>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates />
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template match="schedule">
- <xsl:if test="name(..)='course'">
- <xsl:if test="$lang='de'">
- <h3>Termine</h3>
- </xsl:if>
- <xsl:if test="$lang='en'">
- <h3>Schedule</h3>
- </xsl:if>
- <table class="showgrid">
- <thead>
- <tr>
- <th>Art</th>
- <th colspan="4">Termin</th>
- <th>Ort</th>
- <th> </th>
- <th>Veranstalter</th>
- </tr>
- </thead>
- <tbody>
- <xsl:apply-templates select="lecture"/>
- <xsl:apply-templates select="exercise"/>
- <xsl:apply-templates select="tutorial"/>
- </tbody>
- </table>
- </xsl:if>
-
- <xsl:if test="name(..)='seminar'">
- <xsl:if test="$lang='de'">
- <h3>Programm</h3>
- </xsl:if>
- <xsl:if test="$lang='en'">
- <h3>Schedule</h3>
- </xsl:if>
- <table class="seminar-schedule">
- <tbody>
- <xsl:for-each select="day">
- <tr><td colspan="5" class="heading"><strong><xsl:value-of select="@date"/></strong></td></tr>
- <xsl:for-each select="talk">
- <xsl:choose>
- <xsl:when test="@type='break'">
- <tr class="separator">
- <xsl:apply-templates select="."/>
- </tr>
- </xsl:when>
- <xsl:otherwise>
- <tr>
- <xsl:apply-templates select="."/>
- </tr>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:for-each>
- </tbody>
- </table>
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="talk">
- <td><xsl:value-of select="begin"/></td>
- <td>–</td>
- <td><xsl:value-of select="end"/></td>
-
- <xsl:choose>
- <xsl:when test="speaker">
- <td><xsl:value-of select="speaker"/></td>
- <td><xsl:value-of select="topic"/></td>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="id" select="topicid"/>
- <td><xsl:value-of select="../../../topics/topic[@id=$id]/student"/></td>
- <td><xsl:value-of select="../../../topics/topic[@id=$id]/title"/></td>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template match="lecture|exercise|tutorial">
- <tr>
- <xsl:variable name="type" select="name()"/>
- <xsl:if test="not(preceding-sibling::*[name()=$type])">
- <xsl:variable name="number" select="count(../*[name()=$type])"/>
- <xsl:variable name="amount" select="sum(../*[name()=$type]/@amount)"/>
- <td rowspan="{$number}">
- <xsl:if test="name(.)='lecture'">V</xsl:if>
- <xsl:if test="name(.)='exercise' or name(.)='tutorial'">Ü</xsl:if>
- <xsl:if test="name(.)='lecture' or name(.)='exercise'">
- <xsl:value-of select="$amount"/>
- </xsl:if>
- <xsl:if test="name(.)='tutorial'">
- <xsl:value-of select="@amount"/>
- </xsl:if>
- </td>
- </xsl:if>
- <!-- <td class="datetime {datetime/@changed}"><xsl:copy-of select="datetime/*"/></td>-->
- <!-- <td class="datetime {datetime/@changed}"><xsl:apply-templates select="datetime"/></td>-->
- <xsl:apply-templates select="datetime"/>
- <td class="{hall/@changed}"><xsl:value-of select="hall"/></td>
- <td><xsl:value-of select="info"/></td>
- <td><xsl:value-of select="lecturer"/></td>
- </tr>
-</xsl:template>
-
-
-<xsl:template match="datetime">
- <xsl:choose>
- <xsl:when test="dow">
- <!-- <span><xsl:value-of select="dow"/></span>
- <span><xsl:value-of select="begin"/></span>
- <span>–</span>
- <span><xsl:value-of select="end"/></span>
- <span> </span>-->
- <td class="dow"><xsl:value-of select="dow"/></td>
- <td><xsl:value-of select="begin"/></td>
- <td>–</td>
- <td><xsl:value-of select="end"/></td>
- </xsl:when>
- <xsl:otherwise>
- <td class="datetime" colspan="4"><xsl:value-of select="."/></td>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<!--
-<xsl:template match="datetime|hall|info|lecturer">
- <xsl:choose>
- <xsl:when test="@changed">
- <td ></td>
- </xsl:if>
-
- </xsl:choose>
-</xsl:template>
--->
-
-<xsl:template match="deadlines">
- <xsl:if test="$lang='de'">
- <h3>Zeitplan</h3>
- </xsl:if>
- <xsl:if test="$lang='en'">
- <h3>Deadlines</h3>
- </xsl:if>
-
- <table class="showgrid">
- <tbody>
- <xsl:apply-templates/>
- </tbody>
- </table>
-</xsl:template>
-
-
-<xsl:template match="deadline">
- <tr>
- <td><xsl:value-of select="@date"/></td>
- <td><xsl:value-of select="."/></td>
- </tr>
-</xsl:template>
-
-
-<xsl:template match="documents">
- <!-- Check whether there are any exercise sheets -->
- <xsl:if test="exercise-sheet">
- <xsl:if test="$lang='de'">
- <h3>Übungen</h3>
- </xsl:if>
- <xsl:if test="$lang='en'">
- <h3>Coursework</h3>
- </xsl:if>
- <ul>
- <xsl:for-each select="exercise-sheet">
- <xsl:sort select="boolean(@no)" data-type="text" order="descending"/>
- <xsl:sort select="@no" data-type="number"/>
-
- <xsl:variable name="no" select="@no"/>
- <xsl:if test="not(preceding-sibling::exercise-sheet[@no=$no])">
- <!-- Process all exercise sheets with this number -->
- <li>
- <xsl:apply-templates select="."/>
- <xsl:for-each select="following-sibling::exercise-sheet[@no=$no]">
- <xsl:text>, </xsl:text>
- <xsl:apply-templates select="."/>
- </xsl:for-each>
- </li>
- </xsl:if>
- </xsl:for-each>
- </ul>
- </xsl:if>
- <xsl:if test="lecture-supplement">
- <xsl:if test="$lang='de'">
- <h3>Materialien</h3>
- </xsl:if>
- <xsl:if test="$lang='en'">
- <h3>Supplements</h3>
- </xsl:if>
- <ul>
- <xsl:apply-templates select="lecture-supplement"/>
- </ul>
- </xsl:if>
- <xsl:if test="lecture-notes">
- <xsl:if test="$lang='de'">
- <h3>Skript <xsl:value-of select="@subtitle"/></h3>
- </xsl:if>
- <xsl:if test="$lang='en'">
- <h3>Lecture Notes <xsl:value-of select="@subtitle"/></h3>
- </xsl:if>
- <ul>
- <xsl:apply-templates select="lecture-notes">
- ...
[truncated message content] |