c3d2-web/xsl/datenspuren/xhtml.xsl

206 lines
7.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="xsl">
<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 xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de">
<xsl:call-template name="htmlhead">
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<body>
<img src="images/datenspuren.png" id="logo" width="118" height="117"
alt="Datenspuren" title="Datenspuren"/>
<xsl:call-template name="heading">
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<div id="bodyText">
<xsl:apply-templates/>
</div>
<xsl:call-template name="ending"/>
</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 xmlns:xhtml="http://www.w3.org/1999/xhtml" match="/xhtml:html">
<xsl:variable name="title">Programm</xsl:variable>
<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de">
<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="bodyText">
<table cellpadding="4" cellspacing="6" class="schedule">
<xsl:for-each select="xhtml:body/xhtml:div/xhtml:div/xhtml:table">
<thead><tr>
<td align="center" colspan="3" class="scheduledate">
<xsl:choose>
<xsl:when test="position()=1">13. Mai</xsl:when>
<xsl:when test="position()=2">14. Mai</xsl:when>
</xsl:choose>
</td>
</tr></thead>
<thead><tr>
<xsl:for-each select="xhtml:thead/xhtml:tr/xhtml:th">
<th>
<xsl:if test="xhtml:strong">
<xsl:attribute name="class">schedulehead</xsl:attribute>
<xsl:value-of select="."/>
</xsl:if>
</th>
</xsl:for-each>
</tr></thead>
<tbody>
<xsl:for-each select="xhtml:tbody/xhtml:tr">
<tr>
<xsl:for-each select="xhtml:td">
<xsl:if test="@class">
<td>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="@class='time'">scheduletime</xsl:when>
<xsl:when test="@class='room event '">scheduleevent</xsl:when>
<xsl:otherwise>scheduleempty</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="rowspan">
<xsl:value-of select="@rowspan"/>
</xsl:attribute>
<xsl:choose>
<xsl:when test='count(*)=0'>
<!-- Zeit oder leer -->
<xsl:value-of select="."/>
</xsl:when>
<xsl:otherwise>
<!-- Event -->
<xsl:value-of select="xhtml:p[@class='title']"/>
<ul>
<xsl:for-each select="xhtml:ul[@class='speakers']/xhtml:li/xhtml:a">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
</xsl:otherwise>
</xsl:choose>
</td>
</xsl:if>
</xsl:for-each>
</tr>
</xsl:for-each>
</tbody>
</xsl:for-each>
</table>
</div>
<xsl:call-template name="ending"/>
</body>
</html>
</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, 08.05.2005, 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" />
<meta name="robots" content="index,follow" />
<meta name="language" content="German" />
<link rel="stylesheet" type="text/css" href="style/style.css" />
<link rel="stylesheet" type="text/css" href="style/schedule.css" />
<title>
<xsl:text>Datenspuren 2006 - </xsl:text>
<xsl:value-of select="$title" />
</title>
</head>
</xsl:template>
<xsl:template name="heading">
<div id="header">
<h1>Datenspuren 2006</h1>
<h2>Privatsphäre war gestern</h2>
</div>
<div class="leftSideBar">
<div class="sideBarTitle">Termin</div>
<span>
Samstag &amp; Sonntag,<br />
13. &amp; 14. Mai 2006<br />
<br />
</span>
<div class="sideBarTitle">Ort</div>
<a href="http://www.scheune.org/">Kulturzentrum Scheune</a>
<span>
Alaunstr. 36-40<br />
01099 Dresden<br />
<a href="veranstaltungsort.html">[mehr...]</a>
<br />
</span>
<div class="sideBarTitle">Symposium</div>
<a href="index.html">Home</a>
<a href="info.html">Info</a>
<a href="vortraege.html">Vorträge</a>
<a href="presse.html">Presse</a>
<a href="cfp.html">Call for Papers</a>
<a href="mitschnitte.html">Mitschnitte</a>
<!--<a href="flyer_ds_2005.pdf">Flyer</a-->
<br />
<br />
<a href="http://datenspuren.dresden.ccc.de/2004/">2004</a>
<a href="http://datenspuren.dresden.ccc.de/2005/">2005</a>
<br />
</div>
</xsl:template>
<xsl:template name="ending">
<div id="footer">
<div>
Copyleft 2006, <a href="http://dresden.ccc.de/">Chaos Computer Club Dresden</a> |
<a href="mailto:datenspuren@cccv.de" title="eMail webmaster">datenspuren@cccv.de</a></div>
</div>
</xsl:template>
</xsl:stylesheet>