2005-12-18 21:20:23 +01:00
<?xml version="1.0" encoding="utf-8"?>
2006-01-10 22:53:19 +01:00
<xsl:stylesheet version= "1.0"
2006-08-03 16:45:22 +02:00
xmlns="http://www.w3.org/1999/xhtml"
2006-01-10 22:53:19 +01:00
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rss="http://purl.org/rss/1.0/"
2005-12-18 21:20:23 +01:00
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
2006-01-02 20:29:12 +01:00
xmlns:date="http://exslt.org/dates-and-times"
2005-12-18 21:20:23 +01:00
exclude-result-prefixes="xsl rss rdf">
2006-01-03 14:10:40 +01:00
2006-04-22 13:54:30 +02:00
2006-01-06 19:51:03 +01:00
<xsl:include href= "common.xsl" />
2006-01-03 09:57:12 +01:00
<xsl:include href= "header.xsl" />
<xsl:include href= "footer.xsl" />
2005-12-21 02:19:46 +01:00
2006-01-10 22:53:19 +01:00
<xsl:output method= "xml"
version="1.0"
encoding="utf-8"
2005-12-18 21:20:23 +01:00
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="DTD/xhtml1-strict.dtd"
indent="yes"/>
2006-06-06 21:46:00 +02:00
<xsl:template match= "/page" >
2006-01-12 11:38:33 +01:00
<xsl:variable name= "title" >
<xsl:choose >
<xsl:when test= "/page/@pagetitle" >
<xsl:value-of select= "/page/@pagetitle" />
</xsl:when>
<xsl:when test= "/page/@title" >
<xsl:value-of select= "/page/@title" />
</xsl:when>
<xsl:otherwise >
<xsl:comment > <xsl:text > missing title </xsl:text> </xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name= "body" >
<xsl:with-param name= "title" select= "$title" />
</xsl:call-template>
</xsl:template>
<xsl:template match= "/item" >
<xsl:variable name= "title" >
<xsl:value-of select= "/item/@title" />
</xsl:variable>
<xsl:call-template name= "body" >
<xsl:with-param name= "title" select= "$title" />
</xsl:call-template>
</xsl:template>
<xsl:template name= "body" >
<xsl:param name= "title" />
2006-06-08 14:51:44 +02:00
<xsl:variable name= "issearchpage" select= "$title = 'Suche'" />
2005-12-18 21:20:23 +01:00
<xsl:element name= "html" >
<!-- xsl:attribute name="xmlns">http://www.w3.org/1999/xhtml</xsl:attribute -->
<xsl:attribute name= "lang" > de</xsl:attribute>
<xsl:attribute name= "xml:lang" > de</xsl:attribute>
2006-01-03 09:57:12 +01:00
<xsl:element name= "head" >
<xsl:call-template name= "header" />
2006-01-12 11:38:33 +01:00
<title >
<xsl:text > < < < /> > Chaos Computer Club Dresden | c3d2 - </xsl:text>
<xsl:value-of select= "$title" />
</title>
2006-01-03 09:57:12 +01:00
</xsl:element>
2005-12-18 21:20:23 +01:00
2006-01-03 09:57:12 +01:00
<xsl:element name= "body" >
2005-12-18 21:20:23 +01:00
<div id= "page" >
2006-01-03 09:57:12 +01:00
<!-- ### Logo ### -->
2005-12-18 21:20:23 +01:00
<xsl:comment >
2006-01-03 09:57:12 +01:00
<xsl:text > ### Logo ### </xsl:text>
2005-12-18 21:20:23 +01:00
</xsl:comment>
<div id= "logo" >
2006-05-26 23:22:44 +02:00
<h1 > < < < /> > Chaos Computer Club Dresden | c3d2</h1>
2005-12-18 21:20:23 +01:00
</div>
2006-01-03 09:57:12 +01:00
2005-12-18 21:20:23 +01:00
<div id= "body" >
2006-01-10 22:53:19 +01:00
<!-- ### Navigation ### -->
2006-01-03 09:57:12 +01:00
<xsl:comment >
<xsl:text > ### Navigation ### </xsl:text>
</xsl:comment>
<div id= "navigation" >
2005-12-18 21:20:23 +01:00
2006-06-08 14:51:44 +02:00
<xsl:if test= "not($issearchpage)" >
2006-06-08 13:20:14 +02:00
<!-- ### Search ### -->
<xsl:comment >
<xsl:text > ### Search ### </xsl:text>
</xsl:comment>
<form action= "/cgi-bin/estseek.cgi" method= "get" >
<p >
<input type= "text" name= "phrase" size= "20" value= "c3d2" />
<input type= "submit" name= "submit" value= "Suchen!" />
<a href= "{$baseurl}cgi-bin/estseek.cgi" > <small > Hilfe</small> </a>
</p>
</form>
</xsl:if>
2006-01-03 09:57:12 +01:00
2006-01-11 19:12:08 +01:00
<xsl:call-template name= "navitems" />
2006-06-08 01:04:30 +02:00
2006-01-03 09:57:12 +01:00
</div> <!-- id="navigation" -->
2006-01-03 14:10:40 +01:00
2006-01-03 09:57:12 +01:00
<!-- ### Content ### -->
<xsl:comment >
<xsl:text > ### Content ### </xsl:text>
</xsl:comment>
2006-06-06 21:46:00 +02:00
2006-06-08 13:20:14 +02:00
<xsl:choose >
2006-06-08 14:51:44 +02:00
<xsl:when test= "$issearchpage" >
2006-06-09 03:47:50 +02:00
<div id= "content" class= "search" >
2006-06-09 03:29:17 +02:00
<h2 > Suche</h2>
2006-06-08 14:51:44 +02:00
<xsl:comment > ESTFORM</xsl:comment>
<xsl:comment > ESTRESULT</xsl:comment>
<xsl:comment > ESTINFO</xsl:comment>
</div> <!-- id="search" -->
</xsl:when>
<xsl:otherwise > <!-- normale Seite -->
2006-06-08 13:20:14 +02:00
<div id= "content" >
2006-07-26 03:36:40 +02:00
<xsl:if test= "event" >
<xsl:attribute name= "class" > vevent</xsl:attribute>
</xsl:if>
2006-06-08 13:20:14 +02:00
<h2 >
<xsl:if test= "name(.) = 'item'" >
<xsl:attribute name= "class" > news</xsl:attribute>
</xsl:if>
<xsl:value-of select= "$title" />
</h2>
2006-06-08 14:51:44 +02:00
<!-- Für Seiten, die nur ein Newsitem beinhalten,
Newsmetadaten anzeigen
-->
<xsl:if test= "name(.) = 'item'" >
<xsl:call-template name= "news-meta" />
</xsl:if>
2006-06-08 13:20:14 +02:00
2006-06-08 14:51:44 +02:00
<xsl:apply-templates />
2006-07-04 01:28:48 +02:00
<xsl:call-template name= "include-resources" >
<xsl:with-param name= "include-hidden" > yes</xsl:with-param>
</xsl:call-template>
2006-06-08 13:20:14 +02:00
</div> <!-- id="content" -->
2006-01-03 09:57:12 +01:00
2006-06-08 14:51:44 +02:00
<!-- ### News ### -->
<xsl:comment >
<xsl:text > ### News ### </xsl:text>
</xsl:comment>
<xsl:call-template name= "chaosupdates" />
2006-01-11 19:12:08 +01:00
2006-06-08 14:51:44 +02:00
</xsl:otherwise>
</xsl:choose>
2006-01-03 14:10:40 +01:00
2006-01-03 09:57:12 +01:00
</div> <!-- id="body" -->
<!-- ### Footer ### -->
<xsl:comment >
<xsl:text > ### Footer ### </xsl:text>
</xsl:comment>
<div id= "footer" >
<xsl:call-template name= "footer" />
2005-12-18 21:20:23 +01:00
<!-- <p id="update">
<strong > last update:</strong> 02/08/2005 15:15 CEST
</p> -->
2006-01-03 09:57:12 +01:00
</div> <!-- id="footer" -->
2005-12-18 21:20:23 +01:00
<small class= "hidden" >
Cover, Concealment, Camouflage, Denial and Deception
</small>
2006-01-03 09:57:12 +01:00
</div> <!-- id="page" -->
</xsl:element> <!-- name="body" -->
</xsl:element> <!-- name="html" -->
2005-12-18 21:20:23 +01:00
</xsl:template>
2006-05-24 02:19:45 +02:00
<xsl:template match= "/page/news" >
<xsl:for-each select= "newsfile" >
2006-05-31 19:45:57 +02:00
<xsl:sort select= "date:seconds(document(concat('../', .))/item/@date)" data-type= "number" order= "descending" />
2006-07-27 02:01:48 +02:00
<xsl:if test= "position() <= 10" >
2006-07-25 21:56:13 +02:00
<xsl:variable name= "newsfile" > <xsl:value-of select= "." /> </xsl:variable>
<xsl:variable name= "itemposition" select= "position()" />
<xsl:for-each select= "document(concat('../', $newsfile))/item" >
2006-07-25 23:24:59 +02:00
2006-07-26 03:36:40 +02:00
<div >
<xsl:if test= "event" >
<xsl:attribute name= "class" > vevent</xsl:attribute>
</xsl:if>
<h3 class= "news summary" >
2006-07-26 16:07:34 +02:00
<a href= "{substring-before(substring-after($newsfile, 'content/'), '.xml')}.html" class= "url" >
2006-07-26 03:36:40 +02:00
<xsl:value-of select= "@title" />
</a>
</h3>
2006-07-25 23:24:59 +02:00
2006-07-26 03:36:40 +02:00
<xsl:call-template name= "news-meta" />
2006-07-25 23:24:59 +02:00
2006-07-26 03:36:40 +02:00
<div class= "news" >
<xsl:apply-templates >
<xsl:with-param name= "itemposition" select= "$itemposition" />
</xsl:apply-templates>
<xsl:call-template name= "include-resources" >
<xsl:with-param name= "include-hidden" > no</xsl:with-param>
</xsl:call-template>
<xsl:if test= "//addendum" >
<p >
<a href= "{substring-before(substring-after($newsfile, 'content/'), '.xml')}.html" >
Weiterlesen...
</a>
</p>
</xsl:if>
</div>
<hr class= "news" />
</div>
2006-07-25 21:56:13 +02:00
</xsl:for-each>
</xsl:if>
2005-12-18 21:20:23 +01:00
</xsl:for-each>
2006-07-25 23:24:59 +02:00
<p >
2006-07-28 17:22:29 +02:00
Die Neuigkeiten des C3D2 sind auch als <a href= "{$baseurl}news-atom.xml" > ATOM</a> und <a href= "{$baseurl}news-rss.xml" > RSS</a> , die Veranstaltungen als <a href= "{$baseurl}xcal.xml" > XCal</a> abrufbar.
2006-07-25 23:24:59 +02:00
Mehr News gibts im <a href= "{$baseurl}news-archiv.html" > Archiv</a> .
</p>
2005-12-18 21:20:23 +01:00
</xsl:template>
2006-06-06 21:46:00 +02:00
<xsl:template name= "news-meta" >
<small class= "news_author" >
<xsl:value-of select= "@author" />
</small>
2006-07-27 02:01:48 +02:00
<small class= "news_date" >
@
2006-06-06 21:46:00 +02:00
<xsl:call-template name= "get-datestring" >
<xsl:with-param name= "date" select= "@date" />
</xsl:call-template>
2006-07-27 02:01:48 +02:00
</small>
2006-06-06 21:46:00 +02:00
</xsl:template>
2006-07-04 01:28:48 +02:00
<xsl:template name= "include-resources" >
<xsl:param name= "include-hidden" />
<xsl:choose >
<xsl:when test= "$include-hidden='yes'" >
<xsl:if test= "resource" >
<ul >
<xsl:for-each select= "resource" >
<li >
2006-08-03 16:59:15 +02:00
<a href= "{replace(., ' ', '+'}" type= "{@type}" >
2006-07-04 01:28:48 +02:00
<xsl:choose >
<xsl:when test= "@title" > <xsl:value-of select= "@title" /> </xsl:when>
<xsl:otherwise > <xsl:value-of select= "." /> </xsl:otherwise>
</xsl:choose>
</a>
</li>
</xsl:for-each>
</ul>
</xsl:if>
</xsl:when>
<xsl:otherwise >
<xsl:if test= "resource[not(@hide='yes')]" >
<ul >
<xsl:for-each select= "resource[not(@hide='yes')]" >
<li >
2006-08-03 16:59:15 +02:00
<a href= "{replace(., ' ', '+')}" type= "{@type}" >
2006-07-04 01:28:48 +02:00
<xsl:choose >
<xsl:when test= "@title" > <xsl:value-of select= "@title" /> </xsl:when>
<xsl:otherwise > <xsl:value-of select= "." /> </xsl:otherwise>
</xsl:choose>
</a>
</li>
</xsl:for-each>
</ul>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
2005-12-18 21:20:23 +01:00
2006-01-03 14:10:40 +01:00
<xsl:template match= "item/image" >
2006-06-06 21:01:44 +02:00
<xsl:param name= "itemposition" />
<img >
<xsl:choose >
<xsl:when test= "contains(., '://')" >
<xsl:attribute name= "src" > <xsl:value-of select= "." /> </xsl:attribute>
</xsl:when>
<xsl:otherwise >
2006-06-06 21:14:04 +02:00
<xsl:attribute name= "src" > <xsl:value-of select= "concat($baseurl, 'images/news/', .)" /> </xsl:attribute>
2006-06-06 21:01:44 +02:00
</xsl:otherwise>
</xsl:choose>
<xsl:attribute name= "title" > <xsl:value-of select= "@title" /> </xsl:attribute>
<xsl:attribute name= "alt" > <xsl:value-of select= "title" /> </xsl:attribute>
<!-- News - Items haben ihre Bilder abwechselnd rechts und links... -->
<xsl:attribute name= "class" >
<xsl:choose >
2006-06-06 22:40:13 +02:00
<xsl:when test= "$itemposition mod 2 = 1" >
2006-06-06 21:01:44 +02:00
<xsl:text > left</xsl:text>
</xsl:when>
<xsl:otherwise >
<xsl:text > right</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</img>
2006-01-03 14:10:40 +01:00
</xsl:template>
2006-07-27 02:01:48 +02:00
<xsl:template match= "news-list" >
<xsl:variable name= "category" select= "@category" />
<xsl:variable name= "details" select= "@details" />
<xsl:for-each select= "document('../news.xml')/page/news/newsfile" >
<xsl:sort select= "date:seconds(document(concat('../', .))/item/@date)" data-type= "number" order= "descending" />
<xsl:variable name= "newsfile" select= "." />
<xsl:for-each select= "document(concat('../', $newsfile))/item" >
<xsl:if test= "(string-length($category) = 0) or ($category = @category)" >
2006-07-28 16:23:00 +02:00
<div >
<xsl:if test= "($details = 'event') and event" >
<xsl:attribute name= "class" > vevent</xsl:attribute>
</xsl:if>
<h3 class= "summary" >
<a href= "{substring-before(substring-after($newsfile, 'content/'), '.xml')}.html" class= "url" >
<xsl:value-of select= "@title" />
</a>
</h3>
<xsl:choose >
<xsl:when test= "$details = 'news'" >
<xsl:call-template name= "news-meta" />
</xsl:when>
<xsl:when test= "($details = 'event') and event" >
<ul class= "details_event" >
<li >
<abbr class= "dtstart" >
<xsl:attribute name= "title" >
<xsl:call-template name= "date-to-hevent" >
<xsl:with-param name= "date" select= "event/start" />
</xsl:call-template>
</xsl:attribute>
<xsl:call-template name= "get-datestring" >
<xsl:with-param name= "date" select= "event/start" />
</xsl:call-template>
</abbr>
</li>
<li class= "location" >
<xsl:value-of select= "event/location" />
</li>
</ul>
</xsl:when>
</xsl:choose>
</div>
2006-07-27 02:01:48 +02:00
</xsl:if>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
2005-12-18 21:20:23 +01:00
</xsl:stylesheet>