250 lines
9.8 KiB
XML
250 lines
9.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<xsl:stylesheet version="1.0"
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:date="http://exslt.org/dates-and-times"
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
exclude-result-prefixes="xsl date">
|
|
|
|
<xsl:include href="../common.xsl" />
|
|
|
|
<xsl:output method="xml"
|
|
version="1.0"
|
|
encoding="utf-8"
|
|
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
doctype-system="DTD/xhtml1-strict.dtd"
|
|
indent="yes"/>
|
|
<xsl:strip-space elements="p ul td"/>
|
|
|
|
<xsl:template match="/page">
|
|
|
|
<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>
|
|
<html lang="de" xml:lang="de" dir="ltr">
|
|
<xsl:call-template name="htmlhead">
|
|
<xsl:with-param name="title" select="$title"/>
|
|
</xsl:call-template>
|
|
<body>
|
|
<xsl:call-template name="heading">
|
|
<xsl:with-param name="title" select="$title"/>
|
|
</xsl:call-template>
|
|
<div id="container" class="clearfix">
|
|
<div id="main">
|
|
<xsl:apply-templates/>
|
|
</div>
|
|
<xsl:call-template name="ending"/>
|
|
</div>
|
|
<xsl:call-template name="footer"/>
|
|
</body>
|
|
</html>
|
|
</xsl:template>
|
|
|
|
<!-- Parse XHTML schedule generated by Pentabarf[tm] -->
|
|
|
|
<!-- Da ich hier nicht lange frickeln wollte, wird xhtml nochmal als
|
|
extra NS behandelt, also jegliche Elemente in XPath mit xhtml:
|
|
prefixen
|
|
|
|
Weiterhin ist Pentabarf-Output XHTML und kein schicker XML-Dialekt.
|
|
Dafür haben wir da drin aber schon eine schicke Tabellenstruktur. Für
|
|
die <td/>s usw. extra Templates anzulegen war mir zu unsauber, deshalb
|
|
wird hier überall manuell durchiteriert.
|
|
|
|
Vorgehensweise klar? -~~~~ -->
|
|
<xsl:template match="include-pentabarf-schedule" xmlns:x="http://www.w3.org/1999/xhtml">
|
|
<xsl:for-each select="document(@src)//x:div[@id='schedule']">
|
|
<h2>
|
|
<xsl:value-of select="x:h1"/>
|
|
</h2>
|
|
|
|
<table cellpadding="4" cellspacing="6" class="schedule">
|
|
<tr>
|
|
<xsl:for-each select="x:table/x:thead/x:tr/x:th">
|
|
<th>
|
|
<xsl:if test="x:strong">
|
|
<xsl:attribute name="class">schedulehead</xsl:attribute>
|
|
<xsl:value-of select="x:strong"/>
|
|
</xsl:if>
|
|
</th>
|
|
</xsl:for-each>
|
|
</tr>
|
|
|
|
<xsl:for-each select="x:table/x:tbody/x:tr">
|
|
<tr>
|
|
<xsl:for-each select="x:td">
|
|
<xsl:if test="@class">
|
|
<td>
|
|
<xsl:if test="normalize-space(@rowspan) != ''">
|
|
<xsl:attribute name="rowspan">
|
|
<xsl:value-of select="@rowspan"/>
|
|
</xsl:attribute>
|
|
</xsl:if>
|
|
|
|
<xsl:choose>
|
|
<xsl:when test='count(x:*)=0'>
|
|
<!-- Zeit oder leer -->
|
|
<xsl:variable name="time"
|
|
select="normalize-space(.)"/>
|
|
|
|
<xsl:attribute name="class">
|
|
<xsl:text>timeslot</xsl:text>
|
|
<xsl:choose>
|
|
<xsl:when test="substring($time, string-length($time)) = '0'">
|
|
<xsl:text> even</xsl:text>
|
|
</xsl:when>
|
|
<xsl:when test="substring($time, string-length($time)) = '5'">
|
|
<xsl:text> odd</xsl:text>
|
|
</xsl:when>
|
|
</xsl:choose>
|
|
</xsl:attribute>
|
|
|
|
<xsl:value-of select="$time"/>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<!-- Event -->
|
|
<xsl:attribute name="class">event</xsl:attribute>
|
|
<a>
|
|
<xsl:attribute name="class">event</xsl:attribute>
|
|
<xsl:attribute name="href"><xsl:value-of select="concat('2009/', x:p[@class='title']/x:a/@href)"/></xsl:attribute>
|
|
<xsl:value-of select="x:p[@class='title']"/>
|
|
</a>
|
|
<xsl:if test="x:ul[@class='speakers']/x:li/x:a">
|
|
<ul>
|
|
<xsl:for-each select="x:ul[@class='speakers']/x:li/x:a">
|
|
<li>
|
|
<a>
|
|
<xsl:attribute name="href">
|
|
<xsl:value-of select="concat('2009/',
|
|
@href)"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="."/>
|
|
</a>
|
|
</li>
|
|
</xsl:for-each>
|
|
</ul>
|
|
</xsl:if>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</td>
|
|
</xsl:if>
|
|
</xsl:for-each>
|
|
</tr>
|
|
</xsl:for-each>
|
|
|
|
</table>
|
|
</xsl:for-each>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="htmlhead">
|
|
<xsl:param name="title"/>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="description" content="Symposium Datenspuren - Privatsphäre war gestern, 2009, Kulturzentrum Scheune, veranstaltet vom Chaos Computer Club Dresden" />
|
|
<meta name="keywords" content="Symposium Datenspuren,c3d2,Chaos Computer Club,CCC,Dresden,Datenschutz,Privatsphäre,Anonymität,informationelle Selbstbestimmung,Überwachung,Data Mining,ETSI,RFID,Mautsystem,Remailer,TCPA,TCG,Bundestrojaner,Vorratsdatenspeicherung,Biometrie" />
|
|
<meta name="robots" content="index,follow" />
|
|
<meta name="language" content="German" />
|
|
<link rel="stylesheet" type="text/css" href="css/general.css" />
|
|
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="news-rss.xml" />
|
|
<link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="news-atom.xml" />
|
|
<title>
|
|
<xsl:text>Datenspuren 2009 — </xsl:text>
|
|
<xsl:value-of select="$title" />
|
|
</title>
|
|
</head>
|
|
</xsl:template>
|
|
<xsl:template name="heading">
|
|
<div id="header">
|
|
<a href="index.html" title="Datenspuren 2009 — Hands Off, Privacy On.">
|
|
<img src="images/hopo_logo.png" alt="Datenspuren 2009 — Hands Off, Privacy On." />
|
|
</a>
|
|
<h1>Datenspuren 2009 - 3./4. Oktober</h1>
|
|
</div>
|
|
</xsl:template>
|
|
|
|
|
|
<xsl:template name="ending">
|
|
<div id="right">
|
|
<div id="navigation">
|
|
<xsl:call-template name="navigation-link">
|
|
<xsl:with-param name="page">index</xsl:with-param>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="navigation-link">
|
|
<xsl:with-param name="page">info</xsl:with-param>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="navigation-link">
|
|
<xsl:with-param name="page">ort</xsl:with-param>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="navigation-link">
|
|
<xsl:with-param name="page">fahrplan</xsl:with-param>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="navigation-link">
|
|
<xsl:with-param name="page">mitschnitte</xsl:with-param>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="navigation-link">
|
|
<xsl:with-param name="page">wikis</xsl:with-param>
|
|
</xsl:call-template>
|
|
</div>
|
|
</div>
|
|
</xsl:template>
|
|
<xsl:template name="navigation-link">
|
|
<xsl:param name="page"/>
|
|
<xsl:variable name="title"
|
|
select="document(concat('../../content/datenspuren/', $page, '.xml'))/page/@title"/>
|
|
<a href="{$page}.html">
|
|
<xsl:if test="$title = /page/@title">
|
|
<xsl:attribute name="id">active</xsl:attribute>
|
|
</xsl:if>
|
|
<xsl:value-of select="$title"/>
|
|
</a>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="footer">
|
|
<div id="cccdd_logo">
|
|
<a href="https://www.c3d2.de/">
|
|
<img src="images/cccdd_logo.png" alt="Computer Chaos Club Dresden" />
|
|
</a>
|
|
</div>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="news-list">
|
|
<xsl:variable name="prefix" select="@prefix"/>
|
|
<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($prefix) = 0) or starts-with($newsfile, concat('content/news/', $prefix))) and (($details != 'resources-only') or (count(resource) > 0))">
|
|
|
|
<h3 class="summary">
|
|
<a href="https://www.c3d2.de/{substring-before(substring-after($newsfile, 'content/'), '.xml')}.html" class="url">
|
|
<xsl:value-of select="@title"/>
|
|
</a>
|
|
<span class="date">
|
|
<xsl:call-template name="get-short-datestring">
|
|
<xsl:with-param name="date" select="@date"/>
|
|
</xsl:call-template>
|
|
</span>
|
|
</h3>
|
|
|
|
<!-- Diese Elemente entsprechen Block.class aus xsd/c3d2web.xsd -->
|
|
<xsl:apply-templates select=".//*[name() = 'dl' or name() = 'p' or name() = 'ul' or name() = 'ol' or name() = 'pre']"/>
|
|
|
|
</xsl:if>
|
|
</xsl:for-each>
|
|
</xsl:for-each>
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|