Display upcoming events in a separate column beside latest news.
svn path=/trunk/; revision=4108
This commit is contained in:
parent
2462585d31
commit
2c5eeb7e40
@ -1,11 +1,10 @@
|
||||
<?xml version="1.0" encoding="iso-8859-2" ?>
|
||||
<html lang="cs">
|
||||
<html>
|
||||
<head>
|
||||
<title>FSF Europe - Evropská Nadace pro svobodný software</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Begin page content -->
|
||||
<center>
|
||||
<h1>Evropská Nadace pro svobodný software</h1>
|
||||
<table width="70%">
|
||||
@ -43,21 +42,18 @@
|
||||
svobodného software také poskytuje místo pro dialog mezi
|
||||
politiky, právníky a novináři.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
<text id="more">Více...</text>
|
||||
|
||||
<timestamp>
|
||||
Poslední aktualizace:
|
||||
<!-- timestamp start -->
|
||||
$Date$ $Author$
|
||||
<!-- timestamp end -->
|
||||
</timestamp>
|
||||
<!-- I had no translation for this. If somebody can speak Czech, please
|
||||
translate. Thanks, Reinhard -->
|
||||
<text id="news">Latest news</text>
|
||||
<text id="events">Upcoming events</text>
|
||||
<text id="more">Více...</text>
|
||||
<text id="morenews">More news...</text>
|
||||
<text id="moreevents">More events...</text>
|
||||
</html>
|
||||
<!--
|
||||
Local Variables: ***
|
||||
mode: xml ***
|
||||
End: ***
|
||||
-->
|
||||
|
||||
|
||||
|
@ -1,10 +1,9 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||
<html lang="de">
|
||||
<html>
|
||||
<head>
|
||||
<title>FSF Europe - Free Software Foundation Europe</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Begin page content -->
|
||||
<center>
|
||||
<h1>Free Software Foundation Europe</h1>
|
||||
<table width="80%">
|
||||
@ -37,16 +36,13 @@
|
||||
Verfügung, um die juristische, politische und gesellschaftliche
|
||||
Zukunft Freier Software zu gewährleisten.
|
||||
</p>
|
||||
</body>
|
||||
|
||||
</body>
|
||||
<text id="more">Mehr...</text>
|
||||
|
||||
<timestamp>
|
||||
Letzte Aktualisierung:
|
||||
<!-- timestamp start -->
|
||||
$Date$ $Author$
|
||||
<!-- timestamp end -->
|
||||
</timestamp>
|
||||
<text id="news">Letzte Meldungen</text>
|
||||
<text id="events">Nächste Veranstaltungen</text>
|
||||
<text id="more">Mehr...</text>
|
||||
<text id="morenews">Weitere Meldungen...</text>
|
||||
<text id="moreevents">Weitere Veranstaltungen...</text>
|
||||
</html>
|
||||
<!--
|
||||
Local Variables: ***
|
||||
|
@ -6,7 +6,6 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Begin page content -->
|
||||
<center>
|
||||
<h1>Ευρωπαϊκό Ίδρυμα Ελεύθερου Λογισμικού</h1>
|
||||
<h2>"Free όπως στην Ελευθερία"</h2>
|
||||
@ -44,22 +43,18 @@
|
||||
πολιτικούς, δικηγόρους και δημοσιογράφους ώστε να εξασφαλίσουμε το νομικό,
|
||||
πολιτικό και κοινωνικό μέλλον του Ελεύθερου Λογισμικού.
|
||||
</p>
|
||||
|
||||
<!-- End page content -->
|
||||
|
||||
</body>
|
||||
|
||||
<!-- Didn't have a translation for these texts. Please translate them if you
|
||||
can write Greek. Thanks, Reinhard -->
|
||||
<text id="news">Latest news</text>
|
||||
<text id="events">Upcoming events</text>
|
||||
<text id="more">Διαβάστε περισσότερα...</text>
|
||||
<timestamp>
|
||||
Ôåëåõôáßá áíáèåþñçóç:
|
||||
<!-- timestamp start -->
|
||||
$Date$ $Author$
|
||||
<!-- timestamp end -->
|
||||
</timestamp>
|
||||
<text id="morenews">More news...</text>
|
||||
<text id="moreevents">More events...</text>
|
||||
</html>
|
||||
<!--
|
||||
Local Variables: ***
|
||||
mode: xml ***
|
||||
End: ***
|
||||
-->
|
||||
|
||||
|
||||
|
@ -1,65 +1,53 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>FSF Europe - Free Software Foundation Europe</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Begin page content -->
|
||||
<center>
|
||||
<h1>Free Software Foundation Europe</h1>
|
||||
<h2>"Free as in Freedom"</h2>
|
||||
<table width="70%">
|
||||
<tr>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="documents/whyweexist.html">Why do we exist?</a>
|
||||
</li>
|
||||
<li><a href="help/help.html">How can you help us?</a></li>
|
||||
<li><a href="documents/freesoftware.html">What is Free
|
||||
Software?</a></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="documents/whatwedo.html">What do we do?</a></li>
|
||||
<li><a href="help/thankgnus.html">Who would we like to
|
||||
thank?</a></li>
|
||||
<li><a href="documents/gnuproject.html">What is the GNU
|
||||
Project?</a></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<p>
|
||||
Welcome to the home page of the Free Software Foundation Europe. The
|
||||
FSF Europe was launched on March 10th 2001 and supports all European
|
||||
aspects of Free Software; especially the <a
|
||||
href="documents/gnuproject.html">GNU Project</a>. We are actively
|
||||
supporting development of Free Software and furthering GNU-based
|
||||
Operating Systems such as GNU/Linux. Also, we provide an assistance centre for
|
||||
politicians, lawyers and journalists in order to secure the legal,
|
||||
political and social future of Free Software.
|
||||
</p>
|
||||
|
||||
<!-- End page content -->
|
||||
<html>
|
||||
<head>
|
||||
<title>FSF Europe - Free Software Foundation Europe</title>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<h1>Free Software Foundation Europe</h1>
|
||||
<h2>"Free as in Freedom"</h2>
|
||||
<table width="70%">
|
||||
<tr>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="documents/whyweexist.html">Why do we exist?</a></li>
|
||||
<li><a href="help/help.html">How can you help us?</a></li>
|
||||
<li><a href="documents/freesoftware.html">What is Free Software?</a></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="documents/whatwedo.html">What do we do?</a></li>
|
||||
<li><a href="help/thankgnus.html">Who would we like to thank?</a></li>
|
||||
<li><a href="documents/gnuproject.html">What is the GNU Project?</a></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<p>
|
||||
Welcome to the home page of the Free Software Foundation Europe. The FSF
|
||||
Europe was launched on March 10th 2001 and supports all European aspects
|
||||
of Free Software; especially the
|
||||
<a href="documents/gnuproject.html">GNU Project</a>. We are actively
|
||||
supporting development of Free Software and furthering GNU-based
|
||||
Operating Systems such as GNU/Linux. Also, we provide an assistance
|
||||
centre for politicians, lawyers and journalists in order to secure the
|
||||
legal, political and social future of Free Software.
|
||||
</p>
|
||||
</body>
|
||||
|
||||
<text id="news">Latest news</text>
|
||||
<text id="events">Upcoming events</text>
|
||||
<text id="more">Read more...</text>
|
||||
<timestamp>
|
||||
Last update:
|
||||
<!-- timestamp start -->
|
||||
$Date$ $Author$
|
||||
<!-- timestamp end -->
|
||||
</timestamp>
|
||||
<text id="morenews">More news...</text>
|
||||
<text id="moreevents">More events...</text>
|
||||
</html>
|
||||
<!--
|
||||
Local Variables: ***
|
||||
mode: xml ***
|
||||
End: ***
|
||||
-->
|
||||
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Comienzo del contenido de la página -->
|
||||
<center>
|
||||
<h1>Free Software Foundation Europa</h1>
|
||||
<table width="80%">
|
||||
@ -34,18 +33,15 @@
|
||||
periodistas, para garantizar el futuro legal, político y social del
|
||||
Software Libre.
|
||||
</p>
|
||||
|
||||
<!-- End page content -->
|
||||
|
||||
</body>
|
||||
<text id="more">Mas información...</text>
|
||||
|
||||
<timestamp>
|
||||
Ultima actualización:
|
||||
<!-- Marca de fecha (no tocarla!) -->
|
||||
$Date$ $Author$
|
||||
<!-- fin de la marca de fecha -->
|
||||
</timestamp>
|
||||
<!-- Didn't have a translation for these texts. Please translate them if
|
||||
you can write Spanish. Thanks, Reinhard -->
|
||||
<text id="news">Latest news</text>
|
||||
<text id="events">Upcoming events</text>
|
||||
<text id="more">Mas información...</text>
|
||||
<text id="morenews">More news...</text>
|
||||
<text id="moreevents">More events...</text>
|
||||
</html>
|
||||
<!--
|
||||
Local Variables: ***
|
||||
|
@ -36,7 +36,12 @@
|
||||
légal, politique et social du Logiciel Libre.
|
||||
</p>
|
||||
</body>
|
||||
|
||||
<text id="news">Dernières nouvelles</text>
|
||||
<text id="events">Prochains évènements</text>
|
||||
<text id="more">La suite...</text>
|
||||
<text id="morenews">Autres nouvelles</text>
|
||||
<text id="moreevents">Autres évènements</text>
|
||||
</html>
|
||||
<!--
|
||||
Local Variables: ***
|
||||
|
@ -5,7 +5,6 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Begin page content -->
|
||||
<center>
|
||||
<h1>Free Software Foundation Europe</h1>
|
||||
<table width="80%">
|
||||
@ -30,20 +29,16 @@
|
||||
progresso dei sistemi operativi basati su GNU, come GNU/Linux. Inoltre
|
||||
forniamo assistenza a politici, avvocati e giornalisti, con l'obiettivo di
|
||||
assicurare un futuro legale, politico e sociale al Software Libero.</p>
|
||||
</body>
|
||||
|
||||
</body>
|
||||
<text id="more">Maggiori informazioni..</text>
|
||||
<timestamp>
|
||||
Last update:
|
||||
<!-- timestamp start -->
|
||||
$Date$ $Author$
|
||||
<!-- timestamp end -->
|
||||
</timestamp>
|
||||
<text id="news">Ultime notizie</text>
|
||||
<text id="events">Prossimi eventi</text>
|
||||
<text id="more">Maggiori informazioni..</text>
|
||||
<text id="morenews">Altre notizie...</text>
|
||||
<text id="moreevents">Altri eventi...</text>
|
||||
</html>
|
||||
<!--
|
||||
Local Variables: ***
|
||||
mode: xml ***
|
||||
End: ***
|
||||
-->
|
||||
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Begin page content -->
|
||||
<center>
|
||||
<h1>Free Software Foundation Europe</h1>
|
||||
<h2>"Free as in Freedom"</h2>
|
||||
@ -46,22 +45,16 @@
|
||||
Vrije Software veilig te stellen bieden we ook een plaats waar
|
||||
politici, advocaten en journalisten vragen kunnen stellen.
|
||||
</p>
|
||||
|
||||
<!-- End page content -->
|
||||
|
||||
</body>
|
||||
|
||||
<text id="news">Laatste nieuws</text>
|
||||
<text id="events">Aankomende evenementen</text>
|
||||
<text id="more">Lees meer...</text>
|
||||
<timestamp>
|
||||
Laatste aanpassing:
|
||||
<!-- timestamp start -->
|
||||
$Date$ $Author$
|
||||
<!-- timestamp end -->
|
||||
</timestamp>
|
||||
<text id="morenews">Meer nieuws</text>
|
||||
<text id="moreevents">Meer gebeurtenissen</text>
|
||||
</html>
|
||||
<!--
|
||||
Local Variables: ***
|
||||
mode: xml ***
|
||||
End: ***
|
||||
-->
|
||||
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Begin page content -->
|
||||
<center>
|
||||
<h1>Free Software Foundation Europa</h1>
|
||||
<table width="80%">
|
||||
@ -34,17 +33,15 @@
|
||||
jornalistas, para garantir o futuro legal, político e social do
|
||||
Software Livre.
|
||||
</p>
|
||||
</body>
|
||||
|
||||
<!-- End page content -->
|
||||
|
||||
</body>
|
||||
<text id="more">Mais informação...</text>
|
||||
<timestamp>
|
||||
Actualizado em:
|
||||
<!-- timestamp start -->
|
||||
$Date$ $Author$
|
||||
<!-- timestamp end -->
|
||||
</timestamp>
|
||||
<!-- I had no translation for this. If somebody speaks Portugese please
|
||||
translate. Thanks, Reinhard -->
|
||||
<text id="news">Latest news</text>
|
||||
<text id="events">Upcoming events</text>
|
||||
<text id="more">Mais informação...</text>
|
||||
<text id="morenews">More news...</text>
|
||||
<text id="moreevents">More events...</text>
|
||||
</html>
|
||||
<!--
|
||||
Local Variables: ***
|
||||
|
@ -1,6 +1,11 @@
|
||||
news/*/news:global
|
||||
news/nl/nl:global
|
||||
se/news/*/news:se
|
||||
fr/news/*/news:fr
|
||||
de/news/*/news:de
|
||||
fr/news/*/news:fr
|
||||
it/news/*/news:it
|
||||
se/news/*/news:se
|
||||
events/*/event:global
|
||||
de/events/*/event:de
|
||||
fr/events/*/event:fr
|
||||
it/events/*/event:it
|
||||
se/events/*/event:se
|
||||
|
@ -6,7 +6,6 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Begin page content -->
|
||||
<center>
|
||||
<h1>Free Software Foundation Europe</h1>
|
||||
<h2>"Fri som i Frihet"</h2>
|
||||
@ -42,22 +41,18 @@
|
||||
arbetar FSF Europe även för att säkra den juridiska, politiska och sociala
|
||||
framtiden för Fri Programvara.
|
||||
</p>
|
||||
|
||||
<!-- End page content -->
|
||||
|
||||
</body>
|
||||
|
||||
<!-- I had no translation for this. If somebody can speak Swedish, please
|
||||
translate. Thanks, Reinhard -->
|
||||
<text id="news">Latest news</text>
|
||||
<text id="events">Upcoming events</text>
|
||||
<text id="more">Läs mer...</text>
|
||||
<timestamp>
|
||||
Last update:
|
||||
<!-- timestamp start -->
|
||||
$Date$ $Author$
|
||||
<!-- timestamp end -->
|
||||
</timestamp>
|
||||
<text id="morenews">More news...</text>
|
||||
<text id="moreevents">More events...</text>
|
||||
</html>
|
||||
<!--
|
||||
Local Variables: ***
|
||||
mode: xml ***
|
||||
End: ***
|
||||
-->
|
||||
|
||||
|
||||
|
126
index.xsl
126
index.xsl
@ -1,54 +1,122 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output method="xml"
|
||||
encoding="ISO-8859-1"
|
||||
indent="yes"
|
||||
/>
|
||||
<xsl:output method="xml" encoding="ISO-8859-1" indent="yes" />
|
||||
|
||||
<!-- $today = current date (given as <html date="...">) -->
|
||||
<xsl:variable name="today">
|
||||
<xsl:value-of select="/html/@date" />
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Basically, copy everything -->
|
||||
<xsl:template match="/">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@*|node()" />
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/html/text" />
|
||||
<!-- Show a single news item -->
|
||||
<xsl:template name="news">
|
||||
<tr>
|
||||
<td class="newstitle"><xsl:value-of select="title" /></td>
|
||||
<td class="newsdate"><xsl:value-of select="@date" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="newsbody">
|
||||
<xsl:apply-templates select="body/node()" />
|
||||
<xsl:variable name="link"><xsl:value-of select="link" /></xsl:variable>
|
||||
<xsl:if test="$link!=''">
|
||||
[<a href="{link}"><xsl:value-of select="/html/text[@id='more']" /></a>]
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr height="15"><td colspan="2"></td></tr>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Show a single event -->
|
||||
<xsl:template name="event">
|
||||
<xsl:variable name="start"><xsl:value-of select="@start" /></xsl:variable>
|
||||
<xsl:variable name="end"><xsl:value-of select="@end" /></xsl:variable>
|
||||
<xsl:variable name="link"><xsl:value-of select="link" /></xsl:variable>
|
||||
<tr>
|
||||
<td class="newstitle"><xsl:value-of select="title" /></td>
|
||||
<td class="newsdate">
|
||||
<xsl:value-of select="@start" />
|
||||
<xsl:if test="$start != $end">
|
||||
<br />
|
||||
<xsl:value-of select="@end" />
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="newsbody">
|
||||
<xsl:apply-templates select="body/node()" />
|
||||
<xsl:if test="$link!=''">
|
||||
[<a href="{link}"><xsl:value-of select="/html/text[@id='more']" /></a>]
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr height="15"><td colspan="2"></td></tr>
|
||||
</xsl:template>
|
||||
|
||||
<!-- In /html/body node, append dynamic content -->
|
||||
<xsl:template match="/html/body">
|
||||
<body>
|
||||
<xsl:apply-templates />
|
||||
<table class="news">
|
||||
<xsl:for-each select="/html/set/news">
|
||||
<xsl:sort select="@date" order="descending" />
|
||||
<xsl:if test="position() < 6">
|
||||
<tr>
|
||||
<td class="newstitle"><xsl:value-of select="title" /></td>
|
||||
<td class="newsdate"><xsl:value-of select="@date" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="newsbody">
|
||||
<xsl:apply-templates select="body/node()" />
|
||||
<xsl:variable name="link"><xsl:value-of select="link" /></xsl:variable>
|
||||
<xsl:if test="$link!=''">
|
||||
[<a href="{link}"><xsl:value-of select="/html/text[@id='more']" /></a>]
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr height="15"><td colspan="2"></td></tr>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<table>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<center>
|
||||
<h2><xsl:value-of select="/html/text[@id='news']" /></h2>
|
||||
</center>
|
||||
<table class="news">
|
||||
<xsl:for-each select="/html/set/news">
|
||||
<xsl:sort select="@date" order="descending" />
|
||||
<xsl:if test="position() < 6">
|
||||
<xsl:call-template name="news" />
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
<center>
|
||||
<a href="news/news.html">
|
||||
<xsl:value-of select="/html/text[@id='morenews']" />
|
||||
</a>
|
||||
</center>
|
||||
</td>
|
||||
<td valign="top">
|
||||
<center>
|
||||
<h2><xsl:value-of select="/html/text[@id='events']" /></h2>
|
||||
</center>
|
||||
<table class="news">
|
||||
<xsl:for-each select="/html/set/event
|
||||
[translate (@end, '-', '') > translate ($today, '-', '')]">
|
||||
<xsl:sort select="@start" />
|
||||
<xsl:if test="position() < 6">
|
||||
<xsl:call-template name="event" />
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
<center>
|
||||
<a href="events/events.html">
|
||||
<xsl:value-of select="/html/text[@id='moreevents']" />
|
||||
</a>
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Do not copy <set> and <text> to output at all -->
|
||||
<xsl:template match="/html/text" />
|
||||
<xsl:template match="set" />
|
||||
|
||||
<!-- For all other nodes, copy verbatim -->
|
||||
<xsl:template match="@*|node()" priority="-1">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@*|node()"/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="set" />
|
||||
</xsl:stylesheet>
|
||||
|
||||
|
53
sbs.en.xhtml
53
sbs.en.xhtml
@ -1,53 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>FSF Europe - Free Software Foundation Europe</title>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<h1>Free Software Foundation Europe</h1>
|
||||
<h2>"Free as in Freedom"</h2>
|
||||
<table width="70%">
|
||||
<tr>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="documents/whyweexist.html">Why do we exist?</a></li>
|
||||
<li><a href="help/help.html">How can you help us?</a></li>
|
||||
<li><a href="documents/freesoftware.html">What is Free Software?</a></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="documents/whatwedo.html">What do we do?</a></li>
|
||||
<li><a href="help/thankgnus.html">Who would we like to thank?</a></li>
|
||||
<li><a href="documents/gnuproject.html">What is the GNU Project?</a></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<p>
|
||||
Welcome to the home page of the Free Software Foundation Europe. The FSF
|
||||
Europe was launched on March 10th 2001 and supports all European aspects
|
||||
of Free Software; especially the
|
||||
<a href="documents/gnuproject.html">GNU Project</a>. We are actively
|
||||
supporting development of Free Software and furthering GNU-based
|
||||
Operating Systems such as GNU/Linux. Also, we provide an assistance
|
||||
centre for politicians, lawyers and journalists in order to secure the
|
||||
legal, political and social future of Free Software.
|
||||
</p>
|
||||
</body>
|
||||
|
||||
<text id="news">Latest news</text>
|
||||
<text id="events">Upcoming events</text>
|
||||
<text id="more">Read more...</text>
|
||||
<text id="morenews">More news...</text>
|
||||
<text id="moreevents">More events...</text>
|
||||
</html>
|
||||
<!--
|
||||
Local Variables: ***
|
||||
mode: xml ***
|
||||
End: ***
|
||||
-->
|
11
sbs.sources
11
sbs.sources
@ -1,11 +0,0 @@
|
||||
news/*/news:global
|
||||
news/nl/nl:global
|
||||
se/news/*/news:se
|
||||
fr/news/*/news:fr
|
||||
de/news/*/news:de
|
||||
it/news/*/news:it
|
||||
events/*/event:global
|
||||
se/events/*/event:se
|
||||
fr/events/*/event:fr
|
||||
de/events/*/event:de
|
||||
it/events/*/event:it
|
123
sbs.xsl
123
sbs.xsl
@ -1,123 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output method="xml" encoding="ISO-8859-1" indent="yes" />
|
||||
|
||||
<!-- $today = current date (given as <html date="...">) -->
|
||||
<xsl:variable name="today">
|
||||
<xsl:value-of select="/html/@date" />
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Basically, copy everything -->
|
||||
<xsl:template match="/">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@*|node()" />
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Show a single news item -->
|
||||
<xsl:template name="news">
|
||||
<tr>
|
||||
<td class="newstitle"><xsl:value-of select="title" /></td>
|
||||
<td class="newsdate"><xsl:value-of select="@date" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="newsbody">
|
||||
<xsl:apply-templates select="body/node()" />
|
||||
<xsl:variable name="link"><xsl:value-of select="link" /></xsl:variable>
|
||||
<xsl:if test="$link!=''">
|
||||
[<a href="{link}"><xsl:value-of select="/html/text[@id='more']" /></a>]
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr height="15"><td colspan="2"></td></tr>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Show a single event -->
|
||||
<xsl:template name="event">
|
||||
<xsl:variable name="start"><xsl:value-of select="@start" /></xsl:variable>
|
||||
<xsl:variable name="end"><xsl:value-of select="@end" /></xsl:variable>
|
||||
<xsl:variable name="link"><xsl:value-of select="link" /></xsl:variable>
|
||||
<tr>
|
||||
<td class="newstitle"><xsl:value-of select="title" /></td>
|
||||
<td class="newsdate">
|
||||
<xsl:value-of select="@start" />
|
||||
<xsl:if test="$start != $end">
|
||||
<br />
|
||||
<xsl:value-of select="@end" />
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="newsbody">
|
||||
<xsl:apply-templates select="body/node()" />
|
||||
<xsl:if test="$link!=''">
|
||||
[<a href="{link}"><xsl:value-of select="/html/text[@id='more']" /></a>]
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr height="15"><td colspan="2"></td></tr>
|
||||
</xsl:template>
|
||||
|
||||
<!-- In /html/body node, append dynamic content -->
|
||||
<xsl:template match="/html/body">
|
||||
<body>
|
||||
<xsl:apply-templates />
|
||||
<table>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<center>
|
||||
<h2><xsl:value-of select="/html/text[@id='news']" /></h2>
|
||||
</center>
|
||||
<table class="news">
|
||||
<xsl:for-each select="/html/set/news">
|
||||
<xsl:sort select="@date" order="descending" />
|
||||
<xsl:if test="position() < 6">
|
||||
<xsl:call-template name="news" />
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
<center>
|
||||
<a href="news/news.html">
|
||||
<xsl:value-of select="/html/text[@id='morenews']" />
|
||||
</a>
|
||||
</center>
|
||||
</td>
|
||||
<td valign="top">
|
||||
<center>
|
||||
<h2><xsl:value-of select="/html/text[@id='events']" /></h2>
|
||||
</center>
|
||||
<table class="news">
|
||||
<xsl:for-each select="/html/set/event
|
||||
[translate (@end, '-', '') > translate ($today, '-', '')]">
|
||||
<xsl:sort select="@start" />
|
||||
<xsl:if test="position() < 6">
|
||||
<xsl:call-template name="event" />
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
<center>
|
||||
<a href="events/events.html">
|
||||
<xsl:value-of select="/html/text[@id='moreevents']" />
|
||||
</a>
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Do not copy <set> and <text> to output at all -->
|
||||
<xsl:template match="/html/text" />
|
||||
<xsl:template match="set" />
|
||||
|
||||
<!-- For all other nodes, copy verbatim -->
|
||||
<xsl:template match="@*|node()" priority="-1">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@*|node()"/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
Loading…
x
Reference in New Issue
Block a user