Datenspuren: Fahrplanintegration in www.datenspuren.de/fahrplan.html

git-svn-id: svn://svn.c3d2.de/c3d2-web/trunk@1853 31f61c52-7bfb-0310-b897-fc00f8a278f0
This commit is contained in:
astro 2009-10-02 22:25:42 +00:00
parent 51be75d00a
commit b9303170a3
6 changed files with 104 additions and 84 deletions

View File

@ -172,8 +172,6 @@ build/cgi-bin/search.html: content/cgi-bin/search.xml $(STYLE) $(NAVIGATION) $(D
build/datenspuren/%html : STYLE=$(DS_STYLE)
build/datenspuren/%.html: content/datenspuren/%.xml $(DS_STYLE) news.xml
$(call xml_process)
build/datenspuren/schedule.html : VFLAGS_IN=$(VFLAGS) --schema xsd/xhtml1-strict.xsd
build/datenspuren/schedule.html : NOVALID_IGNORE:=true
#content/datenspuren/schedule.xml: content/static/datenspuren/fahrplan/days.de.html
# cp $< $@

View File

@ -2,6 +2,6 @@
<!DOCTYPE page SYSTEM "http://www.c3d2.de/dtd/c3d2web.dtd">
<page title="Fahrplan">
<p><link href="/2009/index.de.html">Fahrplan</link></p>
<p> Um vom Fahrplan auf die Hauptseite zurück zu gelangen, bitte auf das Logo oben links klicken!</p>
<include-pentabarf-schedule src="../../content/static/datenspuren/2009/day_2009-10-03.de.html"/>
<include-pentabarf-schedule src="../../content/static/datenspuren/2009/day_2009-10-04.de.html"/>
</page>

View File

@ -0,0 +1,21 @@
table.schedule {
margin-top: 0.2em;
margin-bottom: 1em;
}
table.schedule tr th {
background-color: #eee;
}
table.schedule tr td.odd {
background-color: #eee;
}
table.schedule tr td.event {
background-color: #eee;
padding: 0 0.2em;
}
table.schedule tr td.event ul {
list-style-type: none;
font-size: 50%;
}
table.schedule tr td.event ul li {
display: inline-block;
}

View File

@ -1,4 +1,5 @@
@import "reset.css";
@import "reset_ie.css";
@import "structure.css";
@import "type.css";
@import "type.css";
@import "fahrplan.css";

View File

@ -84,6 +84,7 @@
<xs:element ref="ol"/>
<xs:element ref="news-list"/>
<xs:element ref="form" xmlns="http://www.w3.org/1999/xhtml"/>
<xs:element ref="include-pentabarf-schedule"/>
</xs:choice>
</xs:group>
<xs:complexType name="Block" mixed="true">
@ -194,4 +195,10 @@
</xs:complexType>
</xs:element>
<xs:element name="include-pentabarf-schedule">
<xs:complexType>
<xs:attribute name="src" type="xs:anyURI" use="required"/>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@ -61,93 +61,86 @@
wird hier überall manuell durchiteriert.
Vorgehensweise klar? -~~~~ -->
<xsl:template match="/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>
<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:attribute name="rowspan">
<xsl:value-of select="@rowspan"/>
</xsl:attribute>
<div id="bodyText">
<table cellpadding="4" cellspacing="6" class="schedule">
<xsl:for-each select="body/div/div/table">
<tr>
<th align="center" colspan="3" class="scheduledate">
<xsl:choose>
<xsl:when test="position()=1">5. Mai</xsl:when>
<xsl:when test="position()=2">6. Mai</xsl:when>
</xsl:choose>
</th>
</tr>
<tr>
<xsl:for-each select="thead/tr/th">
<th>
<xsl:if test="strong">
<xsl:attribute name="class">schedulehead</xsl:attribute>
<xsl:value-of select="."/>
</xsl:if>
</th>
</xsl:for-each>
</tr>
<xsl:for-each select="tbody/tr">
<tr>
<xsl:for-each select="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: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='count(*)=0'>
<!-- Zeit oder leer -->
<xsl:value-of select="."/>
<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:otherwise>
<!-- Event -->
<a>
<xsl:attribute name="class">event</xsl:attribute>
<xsl:attribute name="href"><xsl:value-of select="concat('http://www.datenspuren.de', p[@class='title']/a/@href)"/></xsl:attribute>
<xsl:value-of select="p[@class='title']"/>
</a>
<ul>
<xsl:for-each select="ul[@class='speakers']/li/a">
<li>
<a>
<xsl:attribute name="href"><xsl:value-of select="concat('http://www.datenspuren.de', @href)"/></xsl:attribute>
<xsl:value-of select="."/>
</a>
</li>
</xsl:for-each>
</ul>
</xsl:otherwise>
</xsl:choose>
</td>
</xsl:if>
</xsl:for-each>
</tr>
</xsl:for-each>
</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>
</table>
</div>
</tr>
</xsl:for-each>
<xsl:call-template name="ending"/>
</body>
</html>
</table>
</xsl:for-each>
</xsl:template>
<xsl:template name="htmlhead">